bridgecrewio / checkov

Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew.
https://www.checkov.io/
Apache License 2.0
6.72k stars 1.08k forks source link

feat(terraform): Support for count & for_each in data blocks #6359

Closed ChanochShayner closed 1 month ago

ChanochShayner commented 1 month ago

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Support for count & for_each in data blocks under CHECKOV_ENABLE_DATAS_FOREACH_HANDLING env var. Added UTs with examples.

Fixes # (issue)

New/Edited policies (Delete if not relevant)

Description

Include a description of what makes it a violation and any relevant external links.

Fix

How does someone fix the issue in code and/or in runtime?

Checklist: