Overview
Review the existing Terraform linting and testing rules in Ballast to ensure they align with current best practices for managing a Terraform project.
Current State
Ballast ships the following Terraform rules:
.claude/rules/terraform/terraform-linting.md — linting with tfenv, terraform fmt, terraform validate, tflint, and tfsec/trivy
.claude/rules/terraform/terraform-testing.md — validation pipeline with syntax, lint, and security checks
.claude/rules/terraform/terraform-logging.md — plan/apply output safety and auditability
.claude/rules/terraform/terraform-git-hooks.md — pre-commit hooks with Terraform-specific checks
Review Areas
Linting
Testing
CI/CD Integration
OpenTofu Compatibility
Acceptance Criteria
References
Overview
Review the existing Terraform linting and testing rules in Ballast to ensure they align with current best practices for managing a Terraform project.
Current State
Ballast ships the following Terraform rules:
.claude/rules/terraform/terraform-linting.md— linting withtfenv,terraform fmt,terraform validate,tflint, andtfsec/trivy.claude/rules/terraform/terraform-testing.md— validation pipeline with syntax, lint, and security checks.claude/rules/terraform/terraform-logging.md— plan/apply output safety and auditability.claude/rules/terraform/terraform-git-hooks.md—pre-commithooks with Terraform-specific checksReview Areas
Linting
tfenv+.terraform-versionis still the recommended version pinning approach vs alternatives (e.g.asdf,mise)tflintconfiguration guidance is up to date with current plugin modeltfsecortrivy configis preferred for security scanning (tfsec is merging into trivy)terraform fmt -check -recursiveis the right CI gate or iftofu fmtsupport should be notedmain.tf,variables.tf,outputs.tf,providers.tf,versions.tf) against current community conventionsgolangci-lintor similar is not mistakenly referenced in Terraform contextTesting
terraform validate+tflint+tfsecis a sufficient baseline or if Terratest/terraform test(native, added in Terraform 1.6) should be recommendedterraform testframework as an alternative to Terratest for module authorsterraform init -backend=falseis the correct smoke-test initialization approach for CICI/CD Integration
concurrencyblock aligned with the Ballast CI/CD rulesOpenTofu Compatibility
Acceptance Criteria
terraform testalongside TerratestconcurrencyblocksReferences