Cloud Custodian provider for evaluating Terraform plan/state files against custodian policies. Version 0.1.35, requires Python 3.9-3.12. Part of Cloud Custodian suite, but released separately on PyPI. This is a community-maintained provider with limited updates.
pip install c7n-terraformNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Example: parse a Terraform plan file and run a custodian policy to find S3 buckets without encryption.
Ensure you generate a plan file with 'terraform plan -out=plan.tfplan' and then convert to JSON with 'terraform show -json plan.tfplan > plan.json'.
Check the resource type mapping in the c7n-terraform source or test with your Terraform config. Use 'terraform.aws_*' naming convention.
Consider using the built-in 'terraform' provider that was added to c7n core in 0.9.41.0. Import from 'c7n.providers.terraform' if using c7n>=0.9.41.