terraform-style-guide

Generates Terraform HCL code according to HashiCorp's style conventions and best practices.

567|82|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/pedronauck/skills --skill terraform-style-guide-pedronauck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-style-guide
Source: https://github.com/pedronauck/skills/tree/main/skills/terraform-style-guide
Command: npx skills add https://github.com/pedronauck/skills --skill terraform-style-guide-pedronauck

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures your Terraform HCL code adheres to official style conventions and best practices, leading to more maintainable, readable, and error-free infrastructure as code.

Core Features & Use Cases

  • Code Generation: Generates Terraform HCL following HashiCorp's style guide.
  • Best Practices: Enforces consistent indentation, naming conventions, and file organization.
  • Security: Highlights security best practices for resource configuration.
  • Use Case: When starting a new Terraform project or reviewing existing configurations, use this Skill to ensure all code follows established standards for clarity and consistency.

Quick Start

Use the terraform-style-guide skill to generate a basic Terraform configuration for an AWS VPC.

Frequently Asked Questions about terraform-style-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format Terraform HCL code to follow HashiCorp style conventions?

To format Terraform HCL code, apply HashiCorp's official style conventions for consistent indentation, naming, and file organization. This ensures your infrastructure as code remains maintainable, readable, and error-free.

What are the best practices for writing clean Terraform configurations?

Best practices for clean Terraform configurations include using consistent naming conventions, proper file organization, and security hardening for resource definitions. Following official style guidelines makes your infrastructure code easier to review and refactor.

How do I generate a Terraform configuration for an AWS VPC following style guidelines?

Generate Terraform configurations by adhering to HashiCorp's style guide for provider configuration and resource definition. This produces clean, standardized HCL code for your AWS VPC or other infrastructure components.

What security best practices should I apply when defining Terraform resources?

Security best practices for Terraform resources involve highlighting security configurations during resource definition. Applying official style conventions ensures your infrastructure as code includes necessary security hardening measures.

Can I use a style guide to refactor existing Terraform infrastructure code?

Yes, you can use a Terraform style guide to refactor existing infrastructure configurations. It enforces consistent indentation, naming conventions, and file organization to improve code clarity and maintainability.

What is the best way to ensure consistent naming conventions in Terraform HCL files?

The best way to ensure consistent naming conventions in Terraform HCL files is to apply HashiCorp's official style guide. This enforces uniform naming and file organization across all your infrastructure as code.