terraform-validate
Skill1 starsChanged 7 months agoMITView on GitHub
Validate Terraform modules and configurations across CP infrastructure repos. Use when checking Terraform code, reviewing infrastructure changes, or verifying module consistency.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- RoninForge/roninforge-terraformtheir own version, first seen May 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- RoninForge/roninforge-terraform★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-contract-checkSkill
- architecture-designSkill
- context-scaffoldSkill
- context-service-guideSkill
- cpp-test-authoringSkill
- dependency-auditSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- pipeline-debugSkill
- review-prSkill
- springboot-api-from-templateSkill
- springboot-service-from-templateSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Every Terraform repo should have:
- Very specific: line 86
Read all vars/*.tfvars files
- Distinctive: line 87
Verify each environment defines the same set of variables
- Distinctive: line 89
Check that production values are appropriately different from non-prod (e.g., larger SKUs, more replicas)
- Very specific: line 95
Check module blocks for source references
- Very specific: line 96
Verify module versions are pinned (not ref=main)
- Distinctive: line 97
Check if newer versions of consumed modules are available
- Distinctive: line 98
Verify required input variables are provided
- Very specific: line 139
Read-only user for reporting (pgreadonly)
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Terraform Validate
Validates Terraform modules and configurations across CP infrastructure repositories for consistency, security, and best practices.
When to Use
- User asks to "validate terraform", "check this module", "review infrastructure changes"
- User is modifying a
cpp-terraform-*orcpp-module-terraform-*repo - User wants to verify state backend configuration
- User wants to check variable naming conventions across modules
Process
Step 1: Identify Module Type
| Prefix | Type | Purpose |
cpp-module-terraform-azurerm-* | Reusable module | Shared building blocks consumed by other Terraform repos |
cpp-terraform-azurerm-* | Root module | Environment-specific infrastructure provisioning |
cpp-terraform-network | Network | VNet, subnet, NSG, peering configuration |
cpp-automation-terraform | Automation | Terraform automation and orchestration |
Step 2: Validate Structure
Every Terraform repo should have:
├── main.tf # Primary resource definitions
├── variables.tf # Input variable declarations
├── outputs.tf # Output value declarations
├── versions.tf # Provider and Terraform version constraints
├── README.md # Auto-generated by terraform-docs
├── .pre-commit-config.yaml # Pre-commit hooks
├── .terraform-version # tfversion pinning
└── vars/ # Environment-specific tfvars (root modules only)
├── dev.tfvars
├── sit.tfvars
├── ste.tfvars
├── nft.tfvars
├── prp.tfvars
└── prd.tfvarsStep 3: Validation Checks
Variable Declarations
- All variables have
descriptionfield - All variables have
typeconstraint - Sensitive variables marked with
sensitive = true - Default values only for optional variables
- Variable names use snake_case
Resource Configuration
- All resources have consistent tagging (environment, team, service)
- Resource names follow CP naming convention:
{resource-type}-{env}-{purpose} - No hardcoded values that should be variables
- Lifecycle rules specified where appropriate (prevent_destroy for stateful resources)
State Backend
- Backend configuration uses Azure Storage Account
- Non-live state:
samdvshared01inRG-MDV-SHARED-01 - Live state:
sampdshared01inRG-MPD-SHARED-01 - State container names are unique per workspace
Security
- No secrets in
.tffiles or.tfvars(use Key Vault references) - NSG rules follow least-privilege principle
- Private endpoints used for Azure PaaS services
- Managed identities preferred over service principals
- No
*in RBAC role assignments
Pre-commit Hooks
.pre-commit-config.yamlpresent- Hooks include: terraform-fmt, terraform-validate, terraform-docs, tflint
- Hook versions are current
Step 4: Environment Consistency
For root modules with per-environment tfvars:
- Read all
vars/*.tfvarsfiles - Verify each environment defines the same set of variables
- Flag any environment-specific variables missing from other environments
- Check that production values are appropriately different from non-prod (e.g., larger SKUs, more replicas)
Step 5: Module Dependency Check
For root modules that consume reusable modules:
- Check
moduleblocks for source references - Verify module versions are pinned (not
ref=main) - Check if newer versions of consumed modules are available
- Verify required input variables are provided
Step 6: Generate Report
## Terraform Validation Report: [module-name]
### Structure
- [✅/❌] Standard file layout
- [✅/❌] Pre-commit hooks configured
- [✅/❌] README auto-generated
### Variables
| Name | Type | Description | Sensitive | Default | Status |
|------|------|-------------|-----------|---------|--------|
### Security
- [✅/❌] No hardcoded secrets
- [✅/❌] Private endpoints used
- [✅/❌] Managed identities preferred
### Environment Consistency
| Variable | dev | sit | ste | nft | prp | prd |
|----------|-----|-----|-----|-----|-----|-----|
### Issues
- [severity] [description] — suggested fixCP-Specific Infrastructure Patterns
AKS Clusters
- System + Worker + Prometheus node pools
- Azure CNI networking with Calico network policy
- OIDC issuer enabled for workload identity
- Cluster naming:
{env}-cs{stack}cl{cluster}
PostgreSQL
- Flexible Server (not single server)
- Per-context databases (hearing_db, resulting_db, etc.)
- Admin credentials from Key Vault
- Read-only user for reporting (
pgreadonly)
Service Bus
- Per-environment namespace
- Topics per bounded context
- Dead-letter queues configured
- Max delivery count and TTL set per subscription
Key Vault
- Per-environment vaults
- CSI driver for pod secret injection
- Secret rotation enabled
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

