no-unused-module-outputs
Ban Terraform module outputs without a reachable consumer or exact external contract.
Why
Unused exports duplicate an infrastructure interface and obscure which resources own values. A file-local search cannot establish non-use: unchanged parents, other roots and nested value flows matter.
Fix
Trace parent and nested modules, root re-exports, remote state, scripts, CI and external users. Remove a proven-unused export while preserving its resource and safety dependencies. Preserve uncertain external users with an exact module/output/reason/evidence record in iac.no-unused-module-outputs.external_outputs. Do not fabricate consumers or visualization references.
Examples
[iac.no-unused-module-outputs]internal_modules = ["child"]output "unused" { value = true }module "child" { source = "./child" }[iac.no-unused-module-outputs]internal_modules = ["child"]output "used" { value = true }module "child" { source = "./child" }output "public" { value = module.child.used }