Describe the issue
Suppression comments for Resource blocks that use for_each or count are not evaluated and will show as failed not skipped. This is for Terraform Plan frameworks with the --repo-root-for-plan-enrichment enabled.
Examples
locals {
hosted_zone_names = [
"example.com",
"example2.eu",
]
}
resource "aws_route53_zone" "example" {
for_each = toset(local.hosted_zone_names)
checkov:skip=CKV2_AWS_38
name = each.value
}
Expected aws_route53_zone.example["example2.eu"] and aws_route53_zone.example["example.com"] to be SKIPPED and got FAILED
Version (please complete the following information):
Additional context