#terraform#hcl#infrastructure-as-code#iac#hashicorp

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

Claude CodeOpenAI CodexCursorGitHub Copilot

Frequently asked questions

What does the Terraform Style Guide skill check?
It checks and generates Terraform HCL using HashiCorp conventions for structure, naming, variables, outputs, providers and maintainability.
Does it replace terraform fmt or terraform validate?
No. Formatting and validation commands remain important; the skill adds higher-level style and organization guidance around the HCL.
← Back to Skills Directory