Open Greg05000 opened 6 months ago
I have the same issue. Checks are failing even with terraform-aws-modules
It is probably only the checks which have a connection
type defined are failing here.
module "s3-bucket_example_complete" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "3.0.0"
lifecycle_rule = [
{
id = "log1"
enabled = true
abort_incomplete_multipart_upload_days = 7
noncurrent_version_transition = [
{
days = 90
storage_class = "GLACIER"
}
]
noncurrent_version_expiration = {
days = 300
}
}
]
}
This module is failing CKV2_AWS_61: "Ensure that an S3 bucket has a lifecycle configuration"
and CKV2_AWS_6: "Ensure that S3 bucket has a Public Access block"
which should obviously pass.
This issue exists with both terraform
and terraform_plan
framework
Describe the issue Hi, Some AWS checks failed when resource is created with for_each or count element in modules. Checks example :
Cmd :
checkov -f tfplan2.json --check "CKV2_AWS_6,CKV_AWS_145" --framework "terraform_plan" --repo-root-for-plan-enrichment .
Result :
Examples main.tf
or
../modules/aws-s3/main.tf
Desktop (please complete the following information):
Additional context Checks passed if i use module for one resource :
Checks failed with for_each/count :
TF Plan example :
Thanks