Governance Transforms Terraform Remote State - Azure/az-prototype GitHub Wiki
Remove unused terraform_remote_state blocks and their associated variables
Domain: iac
| Check | Description |
|---|---|
| TFM-TF-001 | Remove terraform_remote_state data sources that are declared but never referenced elsewhere in the generated code |
Remove terraform_remote_state data sources that are declared but never referenced elsewhere in the generated code
Rationale: Unused remote state blocks add unnecessary upstream dependencies, clutter deploy.sh preflight checks, and confuse QA review. If a data source name does not appear outside its own block, it serves no purpose.
Agents: terraform-agent
All
Type: Structured
Search: 'unused terraform_remote_state'
Replace: 'removed'
Handler: remove_unused_remote_state