Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚚 Migrate Analytical Platform to Observability Platform Production #8793

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

jacobwoffenden
Copy link
Member

This pull request:

Signed-off-by: Jacob Woffenden [email protected]

@jacobwoffenden jacobwoffenden self-assigned this Nov 25, 2024
@jacobwoffenden jacobwoffenden requested review from a team as code owners November 25, 2024 21:09
@github-actions github-actions bot added the environments-repository Used to exclude PRs from this repo in our Slack PR update label Nov 25, 2024
@jacobwoffenden jacobwoffenden had a problem deploying to analytical-platform-ingestion-development November 25, 2024 21:10 — with GitHub Actions Failure
@jacobwoffenden jacobwoffenden had a problem deploying to analytical-platform-compute-development November 25, 2024 21:11 — with GitHub Actions Failure
Copy link
Contributor

Trivy Scan Failed

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/analytical-platform-compute
terraform/environments/analytical-platform-ingestion


Running Trivy in terraform/environments/analytical-platform-compute
2024-11-25T21:11:26Z INFO [vulndb] Need to update DB
2024-11-25T21:11:26Z INFO [vulndb] Downloading vulnerability DB...
2024-11-25T21:11:26Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T21:11:28Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T21:11:28Z INFO [vuln] Vulnerability scanning is enabled
2024-11-25T21:11:28Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-25T21:11:28Z INFO [misconfig] Need to update the built-in checks
2024-11-25T21:11:28Z INFO [misconfig] Downloading the built-in checks...
160.25 KiB / 160.25 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-11-25T21:11:28Z INFO [secret] Secret scanning is enabled
2024-11-25T21:11:28Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T21:11:28Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T21:11:31Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-25T21:11:31Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-25T21:11:31Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.transit_gateway_routes" value="cty.NilVal"
2024-11-25T21:11:36Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.aws_ec2_tag.cluster_primary_security_group" value="cty.NilVal"
2024-11-25T21:11:36Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="2 errors occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:36Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="2 errors occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:36Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:36Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.module.eks_managed_node_group["general"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["general"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["general"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks_cluster_logs_kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement.content.dynamic.condition block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks_cluster_logs_kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement.content.dynamic.condition block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.module.eks_managed_node_group["general"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["general"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["general"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:38Z INFO [terraform executor] Ignore finding rule="aws-eks-no-public-cluster-access-to-cidr" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/main.tf:52"
2024-11-25T21:11:38Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/node_groups.tf:247"
2024-11-25T21:11:38Z INFO [terraform executor] Ignore finding rule="aws-eks-no-public-cluster-access" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/main.tf:51"
2024-11-25T21:11:38Z INFO Number of language-specific files num=0
2024-11-25T21:11:38Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-25T21:11:38Z INFO [vuln] Vulnerability scanning is enabled
2024-11-25T21:11:38Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-25T21:11:38Z INFO [secret] Secret scanning is enabled
2024-11-25T21:11:38Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T21:11:38Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T21:11:39Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-25T21:11:39Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-25T21:11:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-25T21:11:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-25T21:11:39Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-25T21:11:42Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:42Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:44Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-25T21:11:44Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-25T21:11:44Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T21:11:44Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T21:11:44Z INFO Number of language-specific files num=0
2024-11-25T21:11:44Z INFO Detected config files num=7

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:47
via git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81 (aws_lb.this[0])
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 resource "aws_lb" "this" {
..
47 [ internal = var.internal
..
81 }
────────────────────────────────────────

git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=1

</details> #### `Checkov Scan` Failed
<details><summary>Show Output</summary>

```hcl

*****************************

Checkov will check the following folders:
terraform/environments/analytical-platform-compute
terraform/environments/analytical-platform-ingestion

*****************************

Running Checkov in terraform/environments/analytical-platform-compute
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-25 21:11:47,099 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,100 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,100 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/eks/aws:20.29.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,100 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/eks/aws//modules/karpenter:20.29.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,100 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,100 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/zones:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,100 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,101 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.2.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,101 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/rds/aws:6.10.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,101 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.15.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,101 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/eks-pod-identity/aws:1.7.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,101 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.15.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,101 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/managed-service-prometheus/aws:3.0.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,102 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,102 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-github-oidc-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,102 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,102 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:47,102 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:48,982 [MainThread  ] [WARNI]  Failed updating attribute for key: zones.${local.environment_configuration.route53_zone} and value {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'} forvertex attributes {'__end_line__': 16, '__resolved__': [], '__start_line__': 1, 'source': ['terraform-aws-modules/route53/aws//modules/zones'], 'tags': ['${merge(jsondecode(data.http.environments_file.response_body).tags,{\'is-production\': ${substr(terraform.workspace,length(analytical-platform-compute),length(terraform.workspace)) == "-production"}},{\'environment-name\': \'${terraform.workspace}\'},{\'source-code\': \'https://github.com/ministryofjustice/modernisation-platform-environments\'})}'], 'version': ['4.1.0'], 'zones': {'${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}}, 'zones.${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}, 'zones.${local.environment_configuration.route53_zone}.comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}. Falling back to explicitly setting it.Exception - Parse error at 1:7 near token $ ($)
2024-11-25 21:11:49,134 [MainThread  ] [WARNI]  Failed updating attribute for key: zones.${local.environment_configuration.route53_zone} and value {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'} forvertex attributes {'__end_line__': 16, '__resolved__': [], '__start_line__': 1, 'source': ['terraform-aws-modules/route53/aws//modules/zones'], 'tags': ['${merge(jsondecode(data.http.environments_file.response_body).tags,{\'is-production\': ${substr(terraform.workspace,length(analytical-platform-compute),length(terraform.workspace)) == "-production"}},{\'environment-name\': \'${terraform.workspace}\'},{\'source-code\': \'https://github.com/ministryofjustice/modernisation-platform-environments\'})}'], 'version': ['4.1.0'], 'zones': {'${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}}, 'zones.${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}, 'zones.${local.environment_configuration.route53_zone}.comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}. Falling back to explicitly setting it.Exception - Parse error at 1:7 near token $ ($)
2024-11-25 21:11:49,269 [MainThread  ] [WARNI]  Failed updating attribute for key: zones.${local.environment_configuration.route53_zone} and value {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'} forvertex attributes {'__end_line__': 16, '__resolved__': [], '__start_line__': 1, 'source': ['terraform-aws-modules/route53/aws//modules/zones'], 'tags': ['${merge(jsondecode(data.http.environments_file.response_body).tags,{\'is-production\': ${substr(terraform.workspace,length(analytical-platform-compute),length(terraform.workspace)) == "-production"}},{\'environment-name\': \'${terraform.workspace}\'},{\'source-code\': \'https://github.com/ministryofjustice/modernisation-platform-environments\'})}'], 'version': ['4.1.0'], 'zones': {'${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}}, 'zones.${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}, 'zones.${local.environment_configuration.route53_zone}.comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}. Falling back to explicitly setting it.Exception - Parse error at 1:7 near token $ ($)
terraform scan results:

Passed checks: 154, Failed checks: 0, Skipped checks: 153


checkov_exitcode=0

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-25 21:11:51,839 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,839 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,839 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,839 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,840 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,840 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,840 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,840 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,840 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,840 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,840 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.44.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,841 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,841 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,841 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,841 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,841 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.44.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:51,841 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:11:52,855 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:52,872 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.egress_bucket_kms_key}', 'statement.0.resources.1': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:52,891 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'1': 'module.s3_landing_kms.key_arn'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:52,982 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:53,000 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.egress_bucket_kms_key}', 'statement.0.resources.1': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:53,018 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'1': 'module.s3_landing_kms.key_arn'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:53,103 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:53,120 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.egress_bucket_kms_key}', 'statement.0.resources.1': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:53,139 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'1': 'module.s3_landing_kms.key_arn'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:53,249 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:53,266 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': ['${var.egress_bucket_kms_key}', '${var.landing_bucket_kms_key}'], 'statement.0.resources.0': '${var.egress_bucket_kms_key}', 'statement.0.resources.1': '${var.landing_bucket_kms_key}', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:11:53,304 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'1': 'module.s3_landing_kms.key_arn'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
terraform scan results:

Passed checks: 198, Failed checks: 2, Skipped checks: 74

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_route53_resolver_associations
	File: /route53-resolver-associations.tf:1-13
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_route53_resolver_associations" {
		2  | 
		3  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-rule-associations"
		4  |   version = "4.1.0"
		5  | 
		6  |   vpc_id = module.connected_vpc.vpc_id
		7  | 
		8  |   resolver_rule_associations = {
		9  |     mojo-dns-resolver-dom1-infra-int = {
		10 |       resolver_rule_id = aws_route53_resolver_rule.mojo_dns_resolver_dom1_infra_int.id
		11 |     }
		12 |   }
		13 | }

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: connected_vpc_outbound_route53_resolver_endpoint
	File: /route53-resolver-endpoints.tf:1-27
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/supply-chain-policies/terraform-policies/ensure-terraform-module-sources-use-git-url-with-commit-hash-revision

		1  | module "connected_vpc_outbound_route53_resolver_endpoint" {
		2  |   source  = "terraform-aws-modules/route53/aws//modules/resolver-endpoints"
		3  |   version = "4.1.0"
		4  | 
		5  |   name      = "connected-vpc-outbound"
		6  |   vpc_id    = module.connected_vpc.vpc_id
		7  |   direction = "OUTBOUND"
		8  |   protocols = ["Do53"]
		9  | 
		10 |   ip_address = [
		11 |     {
		12 |       subnet_id = module.connected_vpc.private_subnets[0]
		13 |     },
		14 |     {
		15 |       subnet_id = module.connected_vpc.private_subnets[1]
		16 |     }
		17 |   ]
		18 | 
		19 |   security_group_ingress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
		20 |   security_group_egress_cidr_blocks = [
		21 |     /* MoJO DNS Resolver Service */
		22 |     "10.180.80.5/32",
		23 |     "10.180.81.5/32"
		24 |   ]
		25 | 
		26 |   tags = local.tags
		27 | }

checkov_exitcode=1

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing "terraform" plugin...
Installed "terraform" (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.9.1)
tflint will check the following folders:
terraform/environments/analytical-platform-compute
terraform/environments/analytical-platform-ingestion

*****************************

Running tflint in terraform/environments/analytical-platform-compute
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Failed

Show Output
*****************************

Trivy will check the following folders:
terraform/environments/analytical-platform-compute
terraform/environments/analytical-platform-ingestion

*****************************

Running Trivy in terraform/environments/analytical-platform-compute
2024-11-25T21:11:26Z	INFO	[vulndb] Need to update DB
2024-11-25T21:11:26Z	INFO	[vulndb] Downloading vulnerability DB...
2024-11-25T21:11:26Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T21:11:28Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T21:11:28Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-25T21:11:28Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-25T21:11:28Z	INFO	[misconfig] Need to update the built-in checks
2024-11-25T21:11:28Z	INFO	[misconfig] Downloading the built-in checks...
160.25 KiB / 160.25 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-11-25T21:11:28Z	INFO	[secret] Secret scanning is enabled
2024-11-25T21:11:28Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T21:11:28Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T21:11:31Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-25T21:11:31Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-25T21:11:31Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.transit_gateway_routes" value="cty.NilVal"
2024-11-25T21:11:36Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.aws_ec2_tag.cluster_primary_security_group" value="cty.NilVal"
2024-11-25T21:11:36Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="2 errors occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:36Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="2 errors occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:36Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:36Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks_cluster_logs_kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement.content.dynamic.condition block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks_cluster_logs_kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement.content.dynamic.condition block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:37Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:38Z	INFO	[terraform executor] Ignore finding	rule="aws-eks-no-public-cluster-access-to-cidr" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/main.tf:52"
2024-11-25T21:11:38Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/node_groups.tf:247"
2024-11-25T21:11:38Z	INFO	[terraform executor] Ignore finding	rule="aws-eks-no-public-cluster-access" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/main.tf:51"
2024-11-25T21:11:38Z	INFO	Number of language-specific files	num=0
2024-11-25T21:11:38Z	INFO	Detected config files	num=14
trivy_exitcode=0

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-25T21:11:38Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-25T21:11:38Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-25T21:11:38Z	INFO	[secret] Secret scanning is enabled
2024-11-25T21:11:38Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T21:11:38Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T21:11:39Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-25T21:11:39Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-25T21:11:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-25T21:11:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-25T21:11:39Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-25T21:11:42Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:42Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:43Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:11:44Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-25T21:11:44Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-25T21:11:44Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T21:11:44Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T21:11:44Z	INFO	Number of language-specific files	num=0
2024-11-25T21:11:44Z	INFO	Detected config files	num=7

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)
===============================================================================================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:47
   via git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81 (aws_lb.this[0])
    via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12   resource "aws_lb" "this" {
  ..   
  47 [   internal                                                     = var.internal
  ..   
  81   }
────────────────────────────────────────



git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)
===============================================================================================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=1

@jacobwoffenden jacobwoffenden had a problem deploying to analytical-platform-compute-test November 25, 2024 21:12 — with GitHub Actions Failure
Signed-off-by: Jacob Woffenden <[email protected]>
@jacobwoffenden jacobwoffenden temporarily deployed to analytical-platform-ingestion-development November 25, 2024 21:16 — with GitHub Actions Inactive
Copy link
Contributor

Trivy Scan Failed

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/analytical-platform-compute
terraform/environments/analytical-platform-ingestion


Running Trivy in terraform/environments/analytical-platform-compute
2024-11-25T21:17:04Z INFO [vulndb] Need to update DB
2024-11-25T21:17:04Z INFO [vulndb] Downloading vulnerability DB...
2024-11-25T21:17:04Z INFO [vulndb] Downloading artifact... repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T21:17:06Z INFO [vulndb] Artifact successfully downloaded repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T21:17:06Z INFO [vuln] Vulnerability scanning is enabled
2024-11-25T21:17:06Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-25T21:17:06Z INFO [misconfig] Need to update the built-in checks
2024-11-25T21:17:06Z INFO [misconfig] Downloading the built-in checks...
2024-11-25T21:17:07Z ERROR [misconfig] Falling back to embedded checks err="failed to download built-in policies: download error: oci download error: failed to fetch the layer: GET https://ghcr.io/v2/aquasecurity/trivy-checks/blobs/sha256:16442a4593a0395452e678ef699a880eec94d9211dfc887d52574beb78b95030: TOOMANYREQUESTS: retry-after: 417.441µs, allowed: 44000/minute"
2024-11-25T21:17:07Z INFO [secret] Secret scanning is enabled
2024-11-25T21:17:07Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T21:17:07Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T21:17:08Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-25T21:17:08Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-25T21:17:08Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.transit_gateway_routes" value="cty.NilVal"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.aws_ec2_tag.cluster_primary_security_group" value="cty.NilVal"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="2 errors occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="2 errors occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.module.eks_managed_node_group["general"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["general"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["general"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks_cluster_logs_kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement.content.dynamic.condition block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks_cluster_logs_kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement.content.dynamic.condition block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["airflow-high-memory"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.eks.module.eks_managed_node_group["general"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["general"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.eks.module.eks_managed_node_group["general"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:15Z INFO [terraform executor] Ignore finding rule="aws-eks-no-public-cluster-access-to-cidr" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/main.tf:52"
2024-11-25T21:17:15Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/node_groups.tf:247"
2024-11-25T21:17:15Z INFO [terraform executor] Ignore finding rule="aws-eks-no-public-cluster-access" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/main.tf:51"
2024-11-25T21:17:15Z INFO Number of language-specific files num=0
2024-11-25T21:17:15Z INFO Detected config files num=14
trivy_exitcode=0


Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-25T21:17:15Z INFO [vuln] Vulnerability scanning is enabled
2024-11-25T21:17:15Z INFO [misconfig] Misconfiguration scanning is enabled
2024-11-25T21:17:15Z INFO [misconfig] Need to update the built-in checks
2024-11-25T21:17:15Z INFO [misconfig] Downloading the built-in checks...
160.25 KiB / 160.25 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-11-25T21:17:16Z INFO [secret] Secret scanning is enabled
2024-11-25T21:17:16Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T21:17:16Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T21:17:17Z INFO [terraform scanner] Scanning root module file_path="."
2024-11-25T21:17:17Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="networking"
2024-11-25T21:17:17Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-25T21:17:17Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users" value="cty.NilVal"
2024-11-25T21:17:17Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-25T21:17:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z ERROR [terraform evaluator] Failed to expand dynamic block. block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:22Z INFO [terraform executor] Ignore finding rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T21:17:22Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-25T21:17:22Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-25T21:17:22Z INFO [terraform executor] Ignore finding rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T21:17:22Z INFO Number of language-specific files num=0
2024-11-25T21:17:22Z INFO Detected config files num=7

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)

Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.

See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:47
via git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81 (aws_lb.this[0])
via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
12 resource "aws_lb" "this" {
..
47 [ internal = var.internal
..
81 }
────────────────────────────────────────

git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)

Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
328 resource "aws_network_acl_rule" "private_outbound" {
...
340 [ protocol = var.private_outbound_acl_rules[count.index]["protocol"]
...
343 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
311 resource "aws_network_acl_rule" "private_inbound" {
...
323 [ protocol = var.private_inbound_acl_rules[count.index]["protocol"]
...
326 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
209 resource "aws_network_acl_rule" "public_outbound" {
...
221 [ protocol = var.public_outbound_acl_rules[count.index]["protocol"]
...
224 }
────────────────────────────────────────

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.

See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
192 resource "aws_network_acl_rule" "public_inbound" {
...
204 [ protocol = var.public_inbound_acl_rules[count.index]["protocol"]
...
207 }
────────────────────────────────────────

trivy_exitcode=1

</details> #### `Checkov Scan` Success
<details><summary>Show Output</summary>

```hcl

*****************************

Checkov will check the following folders:
terraform/environments/analytical-platform-compute
terraform/environments/analytical-platform-ingestion

*****************************

Running Checkov in terraform/environments/analytical-platform-compute
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-25 21:17:25,015 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,015 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,016 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/eks/aws:20.29.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,016 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/eks/aws//modules/karpenter:20.29.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,016 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,016 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/zones:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,016 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,016 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.2.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,016 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/rds/aws:6.10.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,016 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.15.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,017 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/eks-pod-identity/aws:1.7.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,017 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.15.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,017 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/managed-service-prometheus/aws:3.0.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,017 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,017 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-github-oidc-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,017 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,017 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:25,018 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.48.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:26,898 [MainThread  ] [WARNI]  Failed updating attribute for key: zones.${local.environment_configuration.route53_zone} and value {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'} forvertex attributes {'__end_line__': 16, '__resolved__': [], '__start_line__': 1, 'source': ['terraform-aws-modules/route53/aws//modules/zones'], 'tags': ['${merge(jsondecode(data.http.environments_file.response_body).tags,{\'is-production\': ${substr(terraform.workspace,length(analytical-platform-compute),length(terraform.workspace)) == "-production"}},{\'environment-name\': \'${terraform.workspace}\'},{\'source-code\': \'https://github.com/ministryofjustice/modernisation-platform-environments\'})}'], 'version': ['4.1.0'], 'zones': {'${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}}, 'zones.${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}, 'zones.${local.environment_configuration.route53_zone}.comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}. Falling back to explicitly setting it.Exception - Parse error at 1:7 near token $ ($)
2024-11-25 21:17:27,065 [MainThread  ] [WARNI]  Failed updating attribute for key: zones.${local.environment_configuration.route53_zone} and value {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'} forvertex attributes {'__end_line__': 16, '__resolved__': [], '__start_line__': 1, 'source': ['terraform-aws-modules/route53/aws//modules/zones'], 'tags': ['${merge(jsondecode(data.http.environments_file.response_body).tags,{\'is-production\': ${substr(terraform.workspace,length(analytical-platform-compute),length(terraform.workspace)) == "-production"}},{\'environment-name\': \'${terraform.workspace}\'},{\'source-code\': \'https://github.com/ministryofjustice/modernisation-platform-environments\'})}'], 'version': ['4.1.0'], 'zones': {'${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}}, 'zones.${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}, 'zones.${local.environment_configuration.route53_zone}.comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}. Falling back to explicitly setting it.Exception - Parse error at 1:7 near token $ ($)
2024-11-25 21:17:27,197 [MainThread  ] [WARNI]  Failed updating attribute for key: zones.${local.environment_configuration.route53_zone} and value {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'} forvertex attributes {'__end_line__': 16, '__resolved__': [], '__start_line__': 1, 'source': ['terraform-aws-modules/route53/aws//modules/zones'], 'tags': ['${merge(jsondecode(data.http.environments_file.response_body).tags,{\'is-production\': ${substr(terraform.workspace,length(analytical-platform-compute),length(terraform.workspace)) == "-production"}},{\'environment-name\': \'${terraform.workspace}\'},{\'source-code\': \'https://github.com/ministryofjustice/modernisation-platform-environments\'})}'], 'version': ['4.1.0'], 'zones': {'${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}}, 'zones.${local.environment_configuration.route53_zone}': {'comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}, 'zones.${local.environment_configuration.route53_zone}.comment': '${trimprefix(terraform.workspace,"${var.networking[0].application}-")}_configurations[${trimprefix(terraform.workspace,"${var.networking[0].application}-")}]'}. Falling back to explicitly setting it.Exception - Parse error at 1:7 near token $ ($)
terraform scan results:

Passed checks: 154, Failed checks: 0, Skipped checks: 153


checkov_exitcode=0

*****************************

Running Checkov in terraform/environments/analytical-platform-ingestion
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-11-25 21:17:29,430 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/cloudwatch/aws//modules/log-group:5.6.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,430 [MainThread  ] [WARNI]  Failed to download module ministryofjustice/observability-platform-tenant/aws:1.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,430 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/kms/aws:3.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,430 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-rule-associations:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,430 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/secrets-manager/aws:1.3.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,431 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/sns/aws:6.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,431 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws//modules/vpc-endpoints:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,431 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/route53/aws//modules/resolver-endpoints:4.1.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,431 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/lambda/aws:7.9.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,431 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/vpc/aws:5.13.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,431 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-assumable-role:5.44.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,431 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,432 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/security-group/aws:5.2.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,432 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/alb/aws:9.11.0 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,432 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/s3-bucket/aws//modules/notification:4.1.2 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,432 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-policy:5.44.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:29,432 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/ec2-instance/aws:5.7.1 (for external modules, the --download-external-modules flag is required)
2024-11-25 21:17:30,407 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,425 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'1': 'module.s3_landing_kms.key_arn'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'statement.1.resources.0': 'arn:aws:s3:::${var.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${var.landing_bucket}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'statement.3.resources.0': 'arn:aws:s3:::${var.egress_bucket}/${var.name}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,458 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${each.value.egress_bucket}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,549 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,566 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'1': 'module.s3_landing_kms.key_arn'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'statement.1.resources.0': 'arn:aws:s3:::${var.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${var.landing_bucket}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'statement.3.resources.0': 'arn:aws:s3:::${var.egress_bucket}/${var.name}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,584 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${each.value.egress_bucket}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,670 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,687 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'1': 'module.s3_landing_kms.key_arn'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'statement.1.resources.0': 'arn:aws:s3:::${var.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${var.landing_bucket}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'statement.3.resources.0': 'arn:aws:s3:::${var.egress_bucket}/${var.name}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,704 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${each.value.egress_bucket}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,826 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'} forvertex attributes {'__end_line__': 31, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.1.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,844 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.0.resources and value {'1': 'module.s3_landing_kms.key_arn'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'0': 'each.value.egress_bucket_kms_key'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': ['arn:aws:s3:::${var.egress_bucket}', 'arn:aws:s3:::${var.landing_bucket}'], 'statement.1.resources.0': 'arn:aws:s3:::${var.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${var.landing_bucket}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': ['arn:aws:s3:::${var.egress_bucket}/${var.name}/*'], 'statement.3.resources.0': 'arn:aws:s3:::${var.egress_bucket}/${var.name}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
2024-11-25 21:17:30,864 [MainThread  ] [WARNI]  Failed updating attribute for key: statement.1.resources and value {'0': 'arn:aws:s3:::${each.value.egress_bucket}'} forvertex attributes {'__end_line__': 44, '__start_line__': 3, 'statement': [{'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}], 'statement.0': {'actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'effect': 'Allow', 'resources': ['each.value.egress_bucket_kms_key', 'module.s3_landing_kms.key_arn'], 'sid': 'AllowKMS'}, 'statement.0.actions': ['kms:Decrypt', 'kms:DescribeKey', 'kms:Encrypt', 'kms:GenerateDataKey*', 'kms:ReEncrypt*'], 'statement.0.actions.0': 'kms:Decrypt', 'statement.0.actions.1': 'kms:DescribeKey', 'statement.0.actions.2': 'kms:Encrypt', 'statement.0.actions.3': 'kms:GenerateDataKey*', 'statement.0.actions.4': 'kms:ReEncrypt*', 'statement.0.effect': 'Allow', 'statement.0.resources': {'1': 'module.s3_landing_kms.key_arn'}, 'statement.0.resources.0': 'each.value.egress_bucket_kms_key', 'statement.0.resources.1': 'module.s3_landing_kms.key_arn', 'statement.0.sid': 'AllowKMS', 'statement.1': {'actions': ['s3:ListBucket'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}', 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'], 'sid': 'AllowS3ListBucket'}, 'statement.1.actions': ['s3:ListBucket'], 'statement.1.actions.0': 's3:ListBucket', 'statement.1.effect': 'Allow', 'statement.1.resources': {'1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}'}, 'statement.1.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}', 'statement.1.resources.1': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}', 'statement.1.sid': 'AllowS3ListBucket', 'statement.2': {'actions': ['s3:PutObject'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'], 'sid': 'AllowS3LandingBucketObjectActions'}, 'statement.2.actions': ['s3:PutObject'], 'statement.2.actions.0': 's3:PutObject', 'statement.2.effect': 'Allow', 'statement.2.resources': {'0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*'}, 'statement.2.resources.0': 'arn:aws:s3:::${module.landing_bucket.s3_bucket_id}/${each.key}/*', 'statement.2.sid': 'AllowS3LandingBucketObjectActions', 'statement.3': {'actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'effect': 'Allow', 'resources': ['arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'], 'sid': 'AllowS3EgressBucketObjectActions'}, 'statement.3.actions': ['s3:GetObject', 's3:GetObjectAcl', 's3:GetObjectVersion'], 'statement.3.actions.0': 's3:GetObject', 'statement.3.actions.1': 's3:GetObjectAcl', 'statement.3.actions.2': 's3:GetObjectVersion', 'statement.3.effect': 'Allow', 'statement.3.resources': {'0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*'}, 'statement.3.resources.0': 'arn:aws:s3:::${each.value.egress_bucket}/${each.key}/*', 'statement.3.sid': 'AllowS3EgressBucketObjectActions'}. Falling back to explicitly setting it.Exception - Parse error at 1:14 near token resources (ID)
terraform scan results:

Passed checks: 198, Failed checks: 0, Skipped checks: 76


checkov_exitcode=0

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing "terraform" plugin...
Installed "terraform" (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.9.1)
tflint will check the following folders:
terraform/environments/analytical-platform-compute
terraform/environments/analytical-platform-ingestion

*****************************

Running tflint in terraform/environments/analytical-platform-compute
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/environments/analytical-platform-ingestion
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Failed

Show Output
*****************************

Trivy will check the following folders:
terraform/environments/analytical-platform-compute
terraform/environments/analytical-platform-ingestion

*****************************

Running Trivy in terraform/environments/analytical-platform-compute
2024-11-25T21:17:04Z	INFO	[vulndb] Need to update DB
2024-11-25T21:17:04Z	INFO	[vulndb] Downloading vulnerability DB...
2024-11-25T21:17:04Z	INFO	[vulndb] Downloading artifact...	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T21:17:06Z	INFO	[vulndb] Artifact successfully downloaded	repo="public.ecr.aws/aquasecurity/trivy-db:2"
2024-11-25T21:17:06Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-25T21:17:06Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-25T21:17:06Z	INFO	[misconfig] Need to update the built-in checks
2024-11-25T21:17:06Z	INFO	[misconfig] Downloading the built-in checks...
2024-11-25T21:17:07Z	ERROR	[misconfig] Falling back to embedded checks	err="failed to download built-in policies: download error: oci download error: failed to fetch the layer: GET https://ghcr.io/v2/aquasecurity/trivy-checks/blobs/sha256:16442a4593a0395452e678ef699a880eec94d9211dfc887d52574beb78b95030: TOOMANYREQUESTS: retry-after: 417.441µs, allowed: 44000/minute"
2024-11-25T21:17:07Z	INFO	[secret] Secret scanning is enabled
2024-11-25T21:17:07Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T21:17:07Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T21:17:08Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-25T21:17:08Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-25T21:17:08Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.transit_gateway_routes" value="cty.NilVal"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.aws_ec2_tag.cluster_primary_security_group" value="cty.NilVal"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="2 errors occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="2 errors occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:13Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks_cluster_logs_kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement.content.dynamic.condition block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks_cluster_logs_kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement.content.dynamic.condition block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.kms.data.aws_iam_policy_document.this[0]" err="1 error occurred:\n\t* invalid for-each in data.aws_iam_policy_document.this[0].dynamic.statement block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"airflow-high-memory\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_iam_role_policy_attachment.this" value="cty.NilVal"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:14Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.eks.module.eks_managed_node_group[\"general\"].aws_launch_template.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_launch_template.this[0].dynamic.block_device_mappings block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:15Z	INFO	[terraform executor] Ignore finding	rule="aws-eks-no-public-cluster-access-to-cidr" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/main.tf:52"
2024-11-25T21:17:15Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/node_groups.tf:247"
2024-11-25T21:17:15Z	INFO	[terraform executor] Ignore finding	rule="aws-eks-no-public-cluster-access" range="git::https:/github.com/terraform-aws-modules/terraform-aws-eks?ref=97a08c8aff5dbf51a86b4c8cd88a858336cd0208/main.tf:51"
2024-11-25T21:17:15Z	INFO	Number of language-specific files	num=0
2024-11-25T21:17:15Z	INFO	Detected config files	num=14
trivy_exitcode=0

*****************************

Running Trivy in terraform/environments/analytical-platform-ingestion
2024-11-25T21:17:15Z	INFO	[vuln] Vulnerability scanning is enabled
2024-11-25T21:17:15Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-25T21:17:15Z	INFO	[misconfig] Need to update the built-in checks
2024-11-25T21:17:15Z	INFO	[misconfig] Downloading the built-in checks...
160.25 KiB / 160.25 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2024-11-25T21:17:16Z	INFO	[secret] Secret scanning is enabled
2024-11-25T21:17:16Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-11-25T21:17:16Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection
2024-11-25T21:17:17Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-25T21:17:17Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="networking"
2024-11-25T21:17:17Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.connected_vpc_transit_gateway_routes" value="cty.NilVal"
2024-11-25T21:17:17Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users" value="cty.NilVal"
2024-11-25T21:17:17Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.sftp_users_with_egress" value="cty.NilVal"
2024-11-25T21:17:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.bold_egress_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:20Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_replication_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_replication_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.datasync_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definitions_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0]" err="1 error occurred:\n\t* invalid for-each in aws_s3_bucket_server_side_encryption_configuration.this[0].dynamic.rule block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:21Z	ERROR	[terraform evaluator] Failed to expand dynamic block.	block="module.definition_upload_lambda.aws_lambda_function.this[0]" err="2 errors occurred:\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.vpc_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\t* invalid for-each in aws_lambda_function.this[0].dynamic.logging_config block: cannot use a cty.NilVal value in for_each. An iterable collection is required\n\n"
2024-11-25T21:17:22Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-enable-bucket-encryption" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T21:17:22Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:533"
2024-11-25T21:17:22Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-egress-sgr" range="terraform-aws-modules/security-group/aws/main.tf:534"
2024-11-25T21:17:22Z	INFO	[terraform executor] Ignore finding	rule="aws-s3-encryption-customer-key" range="git::https:/github.com/terraform-aws-modules/terraform-aws-s3-bucket?ref=8a0b697adfbc673e6135c70246cff7f8052ad95a/main.tf:176-198"
2024-11-25T21:17:22Z	INFO	Number of language-specific files	num=0
2024-11-25T21:17:22Z	INFO	Detected config files	num=7

git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf (terraform)
===============================================================================================================================
Tests: 1 (SUCCESSES: 0, FAILURES: 1)
Failures: 1 (HIGH: 1, CRITICAL: 0)

AVD-AWS-0053 (HIGH): Load balancer is exposed publicly.
════════════════════════════════════════
There are many scenarios in which you would want to expose a load balancer to the wider internet, but this check exists as a warning to prevent accidental exposure of internal assets. You should ensure that this resource should be exposed publicly.


See https://avd.aquasec.com/misconfig/avd-aws-0053
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:47
   via git::https:/github.com/terraform-aws-modules/terraform-aws-alb?ref=349540d1a611cd98a6383cc64ef0d9bf08d88fb7/main.tf:12-81 (aws_lb.this[0])
    via network-load-balancers.tf:1-37 (module.datasync_activation_nlb)
────────────────────────────────────────
  12   resource "aws_lb" "this" {
  ..   
  47 [   internal                                                     = var.internal
  ..   
  81   }
────────────────────────────────────────



git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf (terraform)
===============================================================================================================================
Tests: 4 (SUCCESSES: 0, FAILURES: 4)
Failures: 4 (HIGH: 0, CRITICAL: 4)

AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:340
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:328-343 (aws_network_acl_rule.private_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 328   resource "aws_network_acl_rule" "private_outbound" {
 ...   
 340 [   protocol        = var.private_outbound_acl_rules[count.index]["protocol"]
 ...   
 343   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:323
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:311-326 (aws_network_acl_rule.private_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 311   resource "aws_network_acl_rule" "private_inbound" {
 ...   
 323 [   protocol        = var.private_inbound_acl_rules[count.index]["protocol"]
 ...   
 326   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:221
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:209-224 (aws_network_acl_rule.public_outbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 209   resource "aws_network_acl_rule" "public_outbound" {
 ...   
 221 [   protocol        = var.public_outbound_acl_rules[count.index]["protocol"]
 ...   
 224   }
────────────────────────────────────────


AVD-AWS-0102 (CRITICAL): Network ACL rule allows access using ALL ports.
════════════════════════════════════════
Ensure access to specific required ports is allowed, and nothing else.


See https://avd.aquasec.com/misconfig/aws-vpc-no-excessive-port-access
────────────────────────────────────────
 git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:204
   via git::https:/github.com/terraform-aws-modules/terraform-aws-vpc?ref=e226cc15a7b8f62fd0e108792fea66fa85bcb4b9/main.tf:192-207 (aws_network_acl_rule.public_inbound[0])
    via vpc.tf:1-23 (module.connected_vpc)
────────────────────────────────────────
 192   resource "aws_network_acl_rule" "public_inbound" {
 ...   
 204 [   protocol        = var.public_inbound_acl_rules[count.index]["protocol"]
 ...   
 207   }
────────────────────────────────────────


trivy_exitcode=1

Copy link
Contributor

@julialawrence julialawrence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@jacobwoffenden jacobwoffenden merged commit d01b22d into main Nov 26, 2024
19 of 20 checks passed
@jacobwoffenden jacobwoffenden deleted the chore/op-migrate branch November 26, 2024 08:48
matt-k1998 added a commit that referenced this pull request Nov 27, 2024
commit 76aa336
Author: Mateusz Kolakowski <[email protected]>
Date:   Wed Nov 27 12:14:22 2024 +0000

    Tribunals: Update some more route53 records to point at the old nginx LB (#8829)

commit bf7ddd2
Author: Mateusz Kolakowski <[email protected]>
Date:   Wed Nov 27 12:03:03 2024 +0000

    Tribunals: fix syntax error in route53 record (#8826)

commit 9ad043b
Author: Mateusz Kolakowski <[email protected]>
Date:   Wed Nov 27 11:56:24 2024 +0000

    Tribunals: point back some route53 records at the old ngninx LB (#8825)

commit 66991bf
Author: tom-ogle-moj <[email protected]>
Date:   Wed Nov 27 11:52:49 2024 +0000

    DPR2-1435: Make postgres_settings configuration block conditional on the engine type being postgres. (#8822)

    This avoids the terraform plan being polluted with changes to postgres settings for oracle sources that need reapplying on every terraform run.

commit fc4bdf6
Merge: 01b4ac1 07927cc
Author: madhu-k-sr2 <[email protected]>
Date:   Wed Nov 27 11:40:40 2024 +0000

    Merge pull request #8752 from ministryofjustice/ELM-3031_generate_partitioned_rowhash_values

    Glue Job added - 2211 - 1

commit 01b4ac1
Merge: 86efa22 6e373c2
Author: Nick Buckingham <[email protected]>
Date:   Wed Nov 27 09:33:27 2024 +0000

    Merge pull request #8819 from ministryofjustice/Update_271124_3

    Update_271124_3

commit 86efa22
Author: tom-ogle-moj <[email protected]>
Date:   Wed Nov 27 09:13:29 2024 +0000

    DPR2-1435: Default Postgres DMS source heartbeat frequency to 5 minutes. (#8799)

    * DPR2-1435: Default Postgres DMS source heartbeat frequency to 5 minutes.
    This is because terraform seems to default it to 0 instead of 5, which should be the default.

    * DPR2-1435: Remove unused fake data ingestor which sends data to kinesis

    * DPR2-1435: checkov skip

    * DPR2-1435: tflint changes

commit 6e373c2
Author: Buckingham <[email protected]>
Date:   Wed Nov 27 09:05:01 2024 +0000

    Update_271124_3

commit 6ed6ade
Merge: 6fd8bb9 52128a3
Author: Nick Buckingham <[email protected]>
Date:   Wed Nov 27 08:56:39 2024 +0000

    Merge pull request #8818 from ministryofjustice/Update_271124_2

    Update 271124 2

commit 52128a3
Author: Buckingham <[email protected]>
Date:   Wed Nov 27 08:49:41 2024 +0000

    Update_271124_2

commit bf844b2
Author: Buckingham <[email protected]>
Date:   Wed Nov 27 08:46:17 2024 +0000

    Update_271124_1

commit 6fd8bb9
Merge: 95b5f7d 5a2dcb0
Author: Nick Buckingham <[email protected]>
Date:   Tue Nov 26 15:08:32 2024 +0000

    Merge pull request #8815 from ministryofjustice/Update_261124_8

    Update_261124_8

commit 5a2dcb0
Author: Buckingham <[email protected]>
Date:   Tue Nov 26 15:03:34 2024 +0000

    Update_261124_8

commit 07927cc
Author: Madhu Kadiri <[email protected]>
Date:   Tue Nov 26 14:32:51 2024 +0000

    new GlueJob modified - 2611 - 3

commit 95b5f7d
Merge: dde030c 8dc073e
Author: Nick Buckingham <[email protected]>
Date:   Tue Nov 26 13:56:42 2024 +0000

    Merge pull request #8811 from ministryofjustice/Update_261124_7

    Update_261124_7

commit 8dc073e
Author: Buckingham <[email protected]>
Date:   Tue Nov 26 13:50:58 2024 +0000

    Update_261124_7

commit dde030c
Merge: 10c76a2 9eba396
Author: Nick Buckingham <[email protected]>
Date:   Tue Nov 26 13:40:35 2024 +0000

    Merge pull request #8809 from ministryofjustice/Update_261124_6

    Update_261124_6

commit 9eba396
Author: Buckingham <[email protected]>
Date:   Tue Nov 26 13:36:20 2024 +0000

    Update_261124_6

commit 10c76a2
Merge: 32a8024 8bc374a
Author: Jacob Woffenden <[email protected]>
Date:   Tue Nov 26 13:35:21 2024 +0000

    Merge pull request #8803 from ministryofjustice/fix/op-amp-region

    🔀 Fix a hardcoded region in APS string

commit 32a8024
Author: Dominic Robinson <[email protected]>
Date:   Tue Nov 26 13:32:42 2024 +0000

    TM-739: ncr: Add T1 BI secrets (#8806)

commit 2790748
Author: Madhu Kadiri <[email protected]>
Date:   Tue Nov 26 13:31:52 2024 +0000

    new GlueJob modified - 2611 - 2

commit 37865a8
Merge: 6d3de1d 690f3af
Author: Madhu Kadiri <[email protected]>
Date:   Tue Nov 26 13:30:08 2024 +0000

    Merge branch 'main' of https://github.com/ministryofjustice/modernisation-platform-environments into ELM-3031_generate_partitioned_rowhash_values

commit 690f3af
Merge: 458da09 fdf8ea7
Author: Nick Buckingham <[email protected]>
Date:   Tue Nov 26 13:28:31 2024 +0000

    Merge pull request #8808 from ministryofjustice/Update_261124_5

    Update 261124 5

commit fdf8ea7
Author: Buckingham <[email protected]>
Date:   Tue Nov 26 13:23:34 2024 +0000

    Update_261124_5

commit 8a86f3b
Author: Buckingham <[email protected]>
Date:   Tue Nov 26 13:22:06 2024 +0000

    Update_261124_4

commit 261ace7
Author: Buckingham <[email protected]>
Date:   Tue Nov 26 13:17:44 2024 +0000

    Update_261124_3

commit 458da09
Merge: 34c32fa 7b597f2
Author: Nick Buckingham <[email protected]>
Date:   Tue Nov 26 13:10:19 2024 +0000

    Merge pull request #8804 from ministryofjustice/Update_261124_2

    Update_261124_2

commit 7b597f2
Author: Buckingham <[email protected]>
Date:   Tue Nov 26 13:04:32 2024 +0000

    Update_261124_2

commit 8bc374a
Author: Jacob Woffenden <[email protected]>
Date:   Tue Nov 26 12:59:58 2024 +0000

    need to review this code, i dont to explicity set these

    Signed-off-by: Jacob Woffenden <[email protected]>

commit 34c32fa
Merge: 572828a 7f2e482
Author: Nick Buckingham <[email protected]>
Date:   Tue Nov 26 12:58:39 2024 +0000

    Merge pull request #8802 from ministryofjustice/Update_261124_1

    Update_261124_1

commit 9d057ed
Author: Jacob Woffenden <[email protected]>
Date:   Tue Nov 26 12:53:47 2024 +0000

    I missed this hardcoded region

    Signed-off-by: Jacob Woffenden <[email protected]>

commit 7f2e482
Author: Buckingham <[email protected]>
Date:   Tue Nov 26 12:53:26 2024 +0000

    Update_261124_1

commit 572828a
Merge: fc9c9aa 8af74ac
Author: Jacob Woffenden <[email protected]>
Date:   Tue Nov 26 12:33:27 2024 +0000

    Merge pull request #8798 from ministryofjustice/chore/amp-region

    🌐 Allow tenants to set AMP region

commit 6d3de1d
Author: Madhu Kadiri <[email protected]>
Date:   Tue Nov 26 12:00:45 2024 +0000

    new GlueJob modified - 2611 - 1

commit 9d988e4
Merge: 52a8b6d fc9c9aa
Author: Madhu Kadiri <[email protected]>
Date:   Tue Nov 26 11:54:03 2024 +0000

    Merge branch 'main' of https://github.com/ministryofjustice/modernisation-platform-environments into ELM-3031_generate_partitioned_rowhash_values

commit fc9c9aa
Author: Dominic Robinson <[email protected]>
Date:   Tue Nov 26 10:40:25 2024 +0000

    TM-720: fix schedule alarms (#8800)

    * TM-720: fix for schedule-alarms

    * add output

    * fix

commit 8af74ac
Merge: f686e3d b1793de
Author: Jacob Woffenden <[email protected]>
Date:   Tue Nov 26 10:01:31 2024 +0000

    Merge branch 'main' into chore/amp-region

commit f686e3d
Author: Jacob Woffenden <[email protected]>
Date:   Tue Nov 26 09:53:18 2024 +0000

    Testing optional AMP region

    Signed-off-by: Jacob Woffenden <[email protected]>

commit b1793de
Merge: 48392a9 63f7be3
Author: Aaron Robinson <[email protected]>
Date:   Tue Nov 26 09:49:19 2024 +0000

    Merge pull request #8794 from ministryofjustice/dependabot/github_actions/bridgecrewio/checkov-action-12.2920.0

    Bump bridgecrewio/checkov-action from 12.2918.0 to 12.2920.0

commit 48392a9
Author: Matthew Price <[email protected]>
Date:   Tue Nov 26 09:36:48 2024 +0000

    Temporarily remove mdss prod account details while testing (#8796)

commit 9971663
Merge: d01b22d d655ce3
Author: Jacob Woffenden <[email protected]>
Date:   Tue Nov 26 09:20:25 2024 +0000

    Merge pull request #8795 from ministryofjustice/feat/op-ap-de-onboarding

    🔭 Onboard Analytical Platform and Data Engineering accounts

commit d655ce3
Author: Jacob Woffenden <[email protected]>
Date:   Tue Nov 26 09:05:51 2024 +0000

    Onboard AP and DE accounts

    Signed-off-by: Jacob Woffenden <[email protected]>

commit d01b22d
Merge: a7716a8 0d1851e
Author: Jacob Woffenden <[email protected]>
Date:   Tue Nov 26 08:48:33 2024 +0000

    Merge pull request #8793 from ministryofjustice/chore/op-migrate

    Signed-off-by: Jacob Woffenden <[email protected]>

commit a7716a8
Merge: 4679202 50edcd2
Author: Khatraf <[email protected]>
Date:   Tue Nov 26 08:47:06 2024 +0000

    Merge pull request #8783 from ministryofjustice/feature/enable-guardduty-s3-malware-protection

    Add GuardDuty S3 malware protection for specified S3 buckets

commit 63f7be3
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Nov 26 00:05:31 2024 +0000

    Bump bridgecrewio/checkov-action from 12.2918.0 to 12.2920.0

    Bumps [bridgecrewio/checkov-action](https://github.com/bridgecrewio/checkov-action) from 12.2918.0 to 12.2920.0.
    - [Release notes](https://github.com/bridgecrewio/checkov-action/releases)
    - [Commits](bridgecrewio/checkov-action@05decb4...5ae57a8)

    ---
    updated-dependencies:
    - dependency-name: bridgecrewio/checkov-action
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>

commit 0d1851e
Author: Jacob Woffenden <[email protected]>
Date:   Mon Nov 25 21:14:52 2024 +0000

    Fix SCA in ingestion

    Signed-off-by: Jacob Woffenden <[email protected]>

commit b1dbfc6
Author: Jacob Woffenden <[email protected]>
Date:   Mon Nov 25 21:05:27 2024 +0000

    Update analytical-platform-ingestion

    Signed-off-by: Jacob Woffenden <[email protected]>

commit 69c7ae3
Author: Jacob Woffenden <[email protected]>
Date:   Mon Nov 25 21:04:30 2024 +0000

    Remove APC observability_platform local

    Signed-off-by: Jacob Woffenden <[email protected]>

commit 3813430
Author: Jacob Woffenden <[email protected]>
Date:   Mon Nov 25 21:04:04 2024 +0000

    Update analytical-platform-compute

    Signed-off-by: Jacob Woffenden <[email protected]>

commit 52a8b6d
Author: Madhu Kadiri <[email protected]>
Date:   Mon Nov 25 19:04:16 2024 +0000

    new GlueJob Added - 2511 - 1

commit 4679202
Author: Dominic Robinson <[email protected]>
Date:   Mon Nov 25 17:18:59 2024 +0000

    TM-720: endpoint monitoring improvements (#8792)

    * simplify code

    * use aws urls where possible

commit 315bef3
Merge: 21130b0 43261b0
Author: Madhu Kadiri <[email protected]>
Date:   Mon Nov 25 16:52:19 2024 +0000

    Merge branch 'main' of https://github.com/ministryofjustice/modernisation-platform-environments into ELM-3031_generate_partitioned_rowhash_values

commit 43261b0
Merge: 038d8a1 fe8d815
Author: Jacob Woffenden <[email protected]>
Date:   Mon Nov 25 16:35:00 2024 +0000

    Merge pull request #8789 from ministryofjustice/chore/op-migrate-tenant-config

    Signed-off-by: Jacob Woffenden <[email protected]>

commit 50edcd2
Author: khatraf <[email protected]>
Date:   Mon Nov 25 14:40:26 2024 +0000

    trigger pipeline

commit 038d8a1
Author: Matthew Price <[email protected]>
Date:   Mon Nov 25 15:50:05 2024 +0000

    Add kms key generation for use with landing bucket (#8755)

    * Add kms key generation for use with landing bucket

    * Change kms permission to use lambda role not lambda

    * Add cross account encyption grant

    * Add lambda decrypt

    * alternate lambda policy

    * Final tidy

    * Remove context as lamdba would need to use context also.

commit 251e298
Merge: 89fb79a f714700
Author: Rich Green <[email protected]>
Date:   Mon Nov 25 15:00:37 2024 +0000

    Merge pull request #8787 from ministryofjustice/panda-cyber-defect-dojo

    Updated associate_public_ip_address to true

commit fe8d815
Author: Jacob Woffenden <[email protected]>
Date:   Mon Nov 25 14:53:45 2024 +0000

    Migrate tenants

    Signed-off-by: Jacob Woffenden <[email protected]>

commit f714700
Merge: 7513bca 89fb79a
Author: jodiejones-moj <[email protected]>
Date:   Mon Nov 25 14:48:37 2024 +0000

    Merge branch 'main' into panda-cyber-defect-dojo

commit 89fb79a
Author: Dominic Robinson <[email protected]>
Date:   Mon Nov 25 14:47:52 2024 +0000

    TM-720: enable scheduled ssm command monitoring (#8785)

    * align main.tf across accounts

    * enable ssm monitoring and widgets

    * fix

    * fix

    * remove alarm

commit 7513bca
Author: jodiejones-moj <[email protected]>
Date:   Mon Nov 25 14:44:51 2024 +0000

    Updated associate_public_ip_address to true

commit 01df13f
Merge: d6b534d 4a68669
Author: jodiejones-moj <[email protected]>
Date:   Mon Nov 25 14:42:26 2024 +0000

    Merge branch 'main' into panda-cyber-defect-dojo

commit d6b534d
Merge: 08f7720 cc41b2b
Author: jodiejones-moj <[email protected]>
Date:   Mon Nov 25 14:36:31 2024 +0000

    Merge branch 'main' into panda-cyber-defect-dojo

commit 4a68669
Merge: cc41b2b e49c960
Author: bill-buchan <[email protected]>
Date:   Mon Nov 25 14:12:11 2024 +0000

    Merge pull request #8721 from ministryofjustice/DBA-740

    Add a transformation to remove the STAFF_ID column from USER_ data

commit 08f7720
Author: jodiejones-moj <[email protected]>
Date:   Mon Nov 25 13:59:56 2024 +0000

    Change assocaited_public_ip_address to true

commit ad08114
Author: khatraf <[email protected]>
Date:   Mon Nov 25 13:20:50 2024 +0000

    Add GuardDuty S3 malware protection for specified S3 buckets

commit cc41b2b
Author: Dominic Robinson <[email protected]>
Date:   Mon Nov 25 12:38:18 2024 +0000

    Remote deleted roles from secrets manager sharing (#8782)

commit e49c960
Merge: c36f540 e0ae86f
Author: George Taylor <[email protected]>
Date:   Mon Nov 25 11:10:53 2024 +0000

    Merge branch 'DBA-740' of https://github.com/ministryofjustice/modernisation-platform-environments into DBA-740

commit e0ae86f
Merge: 3bdf59e 55fb451
Author: Bill Buchan <[email protected]>
Date:   Mon Nov 25 09:02:24 2024 +0000

    Merge branch 'main' into DBA-740

commit 3bdf59e
Merge: aec7b9b b8119fc
Author: Bill Buchan <[email protected]>
Date:   Fri Nov 22 17:01:55 2024 +0000

    Merge branch 'main' into DBA-740

commit aec7b9b
Author: Bill Buchan <[email protected]>
Date:   Wed Nov 20 09:45:52 2024 +0000

    Add a transformation to remove the USER_ID column from USER_ data

commit 21130b0
Author: Madhu Kadiri <[email protected]>
Date:   Fri Nov 22 15:04:38 2024 +0000

    Glue Job added - 2211 - 3

commit cdfc6e3
Merge: 3f432de e354690
Author: Madhu Kadiri <[email protected]>
Date:   Fri Nov 22 15:03:25 2024 +0000

    Merge branch 'main' of https://github.com/ministryofjustice/modernisation-platform-environments into ELM-3031_generate_partitioned_rowhash_values

commit 3f432de
Author: Madhu Kadiri <[email protected]>
Date:   Fri Nov 22 12:23:15 2024 +0000

    Glue Job added - 2211 - 2

commit a8249de
Author: Madhu Kadiri <[email protected]>
Date:   Fri Nov 22 11:44:29 2024 +0000

    Glue Job added - 2211 - 1

commit c36f540
Merge: 3af4cef efaed94
Author: Bill Buchan <[email protected]>
Date:   Wed Nov 20 09:58:05 2024 +0000

    Merge branch 'main' into DBA-740

commit 3af4cef
Author: Bill Buchan <[email protected]>
Date:   Wed Nov 20 09:45:52 2024 +0000

    Add a transformation to remove the USER_ID column from USER_ data

commit baab6a0
Author: jodiejones-moj <[email protected]>
Date:   Fri Nov 8 16:07:54 2024 +0000

    Removed lifecycle code block

commit 42562bb
Author: jodiejones-moj <[email protected]>
Date:   Fri Nov 8 15:50:47 2024 +0000

    Set associate_public_ip_address to false and added lifecycle block

commit 0333241
Author: jodiejones-moj <[email protected]>
Date:   Fri Nov 8 15:00:54 2024 +0000

    Removed associate_public_ip_address

commit 65b7f24
Merge: 8817582 7aeab18
Author: jodiejones-moj <[email protected]>
Date:   Fri Nov 8 14:33:26 2024 +0000

    Rebased with main

commit 8817582
Author: jodiejones-moj <[email protected]>
Date:   Fri Nov 8 14:30:07 2024 +0000

    Removed installation of docker and cloning of defect dojo from user_data

commit ff85ff1
Author: jodiejones-moj <[email protected]>
Date:   Thu Oct 31 11:44:24 2024 +0000

    Added EC2 instance to host Defect Dojo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environments-repository Used to exclude PRs from this repo in our Slack PR update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants