Skip to content

Commit

Permalink
https://github.com/andgineer/terraform-aws-cloudmap/issues/1
Browse files Browse the repository at this point in the history
chechov
  • Loading branch information
andgineer committed Oct 18, 2024
1 parent b69ba8e commit 9d9c8e4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions terraform/modules/ecs-ec2/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
resource "aws_cloudwatch_log_group" "this" { # tflint-ignore: terraform_required_providers # tfsec:ignore:aws-cloudwatch-log-group-customer-key
#checkov:skip=CKV_AWS_158: https://docs.bridgecrew.io/docs/ensure-that-cloudwatch-log-group-is-encrypted-by-kms
#checkov:skip=CKV_AWS_338: no need to retain groups
name = var.log_group_name
retention_in_days = 30

Expand Down
4 changes: 3 additions & 1 deletion terraform/modules/ecs-ec2/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ resource "aws_rds_cluster" "database" { # tfsec:ignore:aws-rds-encrypt-cluster-
}

# is necessary for serverless v2 only
resource "aws_rds_cluster_instance" "orthanc" { # tfsec:ignore:aws-rds-enable-performance-insights
resource "aws_rds_cluster_instance" "orthanc" { # tflint-ignore: terraform_required_providers # tfsec:ignore:aws-rds-enable-performance-insights
#checkov:skip=CKV_AWS_118: do not want to mess with monitoring ARN for the detailed monitoring
#checkov:skip=CKV_AWS_353: no need for performance insights
#checkov:skip=CKV_AWS_354: no encryption for performance insights
identifier = "${var.ecs_name}-db"
cluster_identifier = aws_rds_cluster.database.id
instance_class = "db.serverless" # serverless v2
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/ecs-ec2/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ resource "aws_iam_role" "ecs_task_execution" {
## ============================== ECS Container Role ==============================
data "aws_iam_policy_document" "ecs_instance" {
#checkov:skip=CKV_AWS_111:
#checkov:skip=CKV_AWS_356:Start resource is ok in Demo

# CloudWatch
statement {
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/ecs-fargate/balancer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ resource "aws_alb_listener" "this" {
}

resource "aws_lb_target_group" "this" { # tflint-ignore: terraform_required_providers
#checkov:skip=CKV_AWS_378:Ok without SSL for demo
name = var.ecs_name
port = 80
protocol = "HTTP"
Expand Down
3 changes: 2 additions & 1 deletion terraform/modules/ecs-fargate/cloudwatch.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#
# Cloudwatch logging group
#
resource "aws_cloudwatch_log_group" "this" { # tflint-ignore: terraform_required_providers # tfsec:ignore:aws-cloudwatch-log-group-customer-key
resource "aws_cloudwatch_log_group" "this" { #tfsec:ignore:aws-cloudwatch-log-group-customer-key
#checkov:skip=CKV_AWS_158: https://docs.bridgecrew.io/docs/ensure-that-cloudwatch-log-group-is-encrypted-by-kms
#checkov:skip=CKV_AWS_338: No need to retain groups
name = var.log_group_name
retention_in_days = 30

Expand Down
3 changes: 2 additions & 1 deletion terraform/modules/ecs-fargate/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ resource "aws_iam_role" "ecs_task_execution" {

## ============================== ECS Container Role ==============================
data "aws_iam_policy_document" "ecs_instance" {
#checkov:skip=CKV_AWS_111:
# checkov:skip=CKV_AWS_356:Start resource is ok in Demo
# checkov:skip=CKV_AWS_111:

# CloudWatch
statement {
Expand Down

0 comments on commit 9d9c8e4

Please sign in to comment.