Terraform Style Guide
Independent PiSkill directory guide. The original skill remains hosted by HashiCorp Agent Skills.
What is Terraform Style Guide?
Generates and reviews Terraform HCL using HashiCorp's official style conventions, recommended file organization, variables, outputs, providers, and maintainable infrastructure patterns.
What does Terraform Style Guide do?
Terraform Style Guide is a HashiCorp Agent Skill for generating and reviewing Terraform HCL according to HashiCorp's official conventions. It covers file organization, naming, provider constraints, variables, outputs, dependency order and maintainability practices so infrastructure code stays consistent across modules and teams.
Who is Terraform Style Guide best for?
- Infrastructure teams standardizing Terraform repositories
- Developers generating new Terraform modules
- Code reviewers checking HCL consistency
- AI coding agents writing Terraform for shared environments
Common use cases
- Create a clean Terraform module structure
- Review resource and variable naming
- Add provider and version constraints
- Improve variables, outputs and dependency organization
How does Terraform Style Guide work?
The skill starts from provider configuration and builds configuration in dependency order, placing data sources and resources where they are easiest to understand. It applies naming, formatting, variable, output and security-oriented conventions while keeping the HCL aligned with the official Terraform style guide.
Key benefits
- Applies HashiCorp conventions consistently
- Improves readability and maintainability of HCL
- Useful for both generation and review
- Encourages explicit variables, outputs and provider constraints
Things to know
- Style consistency does not validate infrastructure behavior
- Cloud-specific security and architecture still require domain expertise
- Terraform plans must still be reviewed before applying changes
Compatible tools
Frequently asked questions
What does the Terraform Style Guide skill check?
Does it replace terraform fmt or terraform validate?
Related skills
Terraform Search and Import
Discovers existing cloud resources with Terraform Search and brings unmanaged infrastructure under Terraform using bulk import and generated configuration workflows.
Terraform Stacks
Helps structure and orchestrate Terraform deployments across multiple environments or regions using Terraform Stacks and reusable infrastructure components.
Terraform Test
Guides Terraform's built-in testing framework with .tftest.hcl files, run blocks, assertions, mock providers, CI workflows, and safe validation of infrastructure behavior.
AWS CDK
Supports authoring, deploying, refactoring, and troubleshooting AWS CDK infrastructure in TypeScript or Python, including stack design, constructs, drift, imports, and safe deployment workflows.
AWS CloudFormation
Guides infrastructure-as-code work with AWS CloudFormation, including template authoring, deployment, troubleshooting, stack behavior, dependencies, and production-safe infrastructure changes.
New Terraform Provider
Scaffolds a new Terraform provider using the Terraform Plugin Framework, including Go module setup, provider server entrypoint, schema, configuration, build, and tests.