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

Add default cluster configuration option for clean plan #125

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

georgepstaylor
Copy link
Member

@georgepstaylor georgepstaylor commented Apr 22, 2024

When a cluster is imported to this module, the default configuration results in the following recurring changes to a TF Plan:

      - configuration {
          - execute_command_configuration {
              - logging    = "DEFAULT" -> null
                # (1 unchanged attribute hidden)
            }
        }

@georgepstaylor georgepstaylor requested a review from a team as a code owner April 22, 2024 13:36
Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:
.


Running TFSEC in .
Excluding the following checks: aws-cloudwatch-log-group-customer-key, aws-iam-no-policy-wildcards, aws-vpc-no-public-egress-sgr, aws-iam-block-kms-policy-wildcard, aws-vpc-add-description-to-security-group

======================================================
tfsec is joining the Trivy family

tfsec will continue to remain available
for the time being, although our engineering
attention will be directed at Trivy going forward.

You can read more here:
aquasecurity/tfsec#1994

timings
──────────────────────────────────────────
disk i/o 196.239µs
parsing 3.442939ms
adaptation 152.247µs
checks 15.733861ms
total 19.525286ms

counts
──────────────────────────────────────────
modules downloaded 0
modules processed 3
blocks processed 50
files read 10

results
──────────────────────────────────────────
passed 1
ignored 0
critical 0
high 0
medium 0
low 0

No problems detected!

tfsec_exitcode=0

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

```hcl

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

Checkov will check the following folders:
.

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

Running Checkov in .
Excluding the following checks: CKV_GIT_1
terraform scan results:

Passed checks: 15, Failed checks: 1, Skipped checks: 3

Check: CKV_AWS_224: "Ensure ECS Cluster logging uses CMK"
	FAILED for resource: module.unit_test.aws_ecs_cluster.this
	File: /cluster/main.tf:1-14
	Calling File: /test/unit-test/main.tf:1-6
	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-aws-cluster-logging-is-encrypted-using-a-customer-managed-key-cmk

		1  | resource "aws_ecs_cluster" "this" {
		2  |   name = var.name
		3  |   tags = var.tags
		4  |   setting {
		5  |     name  = "containerInsights"
		6  |     value = var.enable_container_insights
		7  |   }
		8  | 
		9  |   configuration {
		10 |     execute_command_configuration {
		11 |       logging = "DEFAULT"
		12 |     }
		13 |   }
		14 | }

github_actions scan results:

Passed checks: 208, Failed checks: 0, Skipped checks: 0


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.5.0)
tflint will check the following folders:
.

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

Running tflint in .
tflint_exitcode=0

Trivy Scan

Show Output

@georgepstaylor georgepstaylor merged commit 31c7c83 into main Apr 22, 2024
6 of 7 checks passed
@georgepstaylor georgepstaylor deleted the cluster-options branch April 22, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants