-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(terraform): correctly evaluate CKV_AWS_37 when there's a dynamic … #6792
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
fix(terraform): correctly evaluate CKV_AWS_37 when there's a dynamic … #6792
Conversation
@Saarett I see you were active on my other PR, this one is ready for review if you have time please |
@Alex-Waring looks good, but can you fixe the flake8 errors? |
Hey @Alex-Waring, |
6883990
to
1f88271
Compare
@MaryArmaly can you please re-run the CI? |
checkov/terraform/checks/resource/aws/EKSControlPlaneLogging.py
Outdated
Show resolved
Hide resolved
checkov/terraform/checks/resource/aws/EKSControlPlaneLogging.py
Outdated
Show resolved
Hide resolved
Hi @tjwald, I no longer have the repo setup for local development here given the time it took for a review. If this is something you are interested in adding to the project then please feel free to commit to this pr. |
fix linting and access pattern
#6792) * fix(terraform): correctly evaluate CKV_AWS_37 when there's a dynamic block * Update EKSControlPlaneLogging.py fix linting and access pattern --------- Co-authored-by: Tj <52830708+tjwald@users.noreply.github.com>
User description
…block
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
For reasons that are beyond me,
enabled_cluster_log_types
is a list of strings normally, but when there's a dynamic block added to the resource it becomes a list of list of strings. This PR adds tests to confirm that this is indeed an issue (if you run the test file against the check in master then it fails onaws_eks_cluster.fully_enabled_with_dynamic_block
), and fixes the issue by checking the type before itterating.Checklist:
Generated description
Below is a concise technical summary of the changes proposed in this PR:
EKSControlPlaneLogging
check to handle dynamic blocks in AWS EKS cluster resourcesModified files (1)
Latest Contributors(2)
EKSControlPlaneLogging
check, including Terraform configurations and Python unit testsModified files (2)
Latest Contributors(2)