terraform-style-guide

Generate Terraform HCL code following HashiCorp style conventions.

5|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/lidge-jun/cli-jaw-skills --skill terraform-style-guide-lidge-jun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-style-guide
Source: https://github.com/lidge-jun/cli-jaw-skills/tree/main/terraform/code-generation/skills/terraform-style-guide
Command: npx skills add https://github.com/lidge-jun/cli-jaw-skills --skill terraform-style-guide-lidge-jun

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps ensure your Terraform HCL code adheres to HashiCorp's official style conventions and best practices, improving readability, maintainability, and consistency across your infrastructure as code.

Core Features & Use Cases

  • Code Generation Guidance: Provides clear rules and examples for structuring Terraform files, formatting code, and naming conventions.
  • Best Practice Enforcement: Details recommendations for variable and output definitions, dynamic resource creation, security, and version pinning.
  • Use Case: When starting a new Terraform project or reviewing existing configurations, use this Skill to generate a well-structured and compliant starting point or to identify areas for improvement in current code.

Quick Start

Generate a Terraform HCL configuration file for an AWS VPC following best practices.

Frequently Asked Questions about terraform-style-guide

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

FAQPage Schema
What are the best practices for Terraform HCL file organization and naming conventions?

Terraform HCL best practices involve structuring files logically, applying consistent code formatting, and following standard naming conventions to ensure maintainable and readable infrastructure as code configurations.

How do I generate Terraform code that adheres to HashiCorp's official style conventions?

Generate Terraform code compliant with HashiCorp style conventions by following rules for variable and output definitions, dynamic resource creation, security hardening, and version pinning to ensure high code quality.

Does this style guide cover security hardening and version pinning for infrastructure as code?

Yes, this style guide covers security hardening and version pinning for infrastructure as code, providing specific recommendations to enforce Terraform code quality and maintain stable configurations.

Can I use this to review existing Terraform configurations for code quality improvements?

Yes, you can review existing Terraform configurations to identify areas for improvement, applying rules for code formatting, file organization, and dynamic resource creation to enforce overall code quality.

What is the best way to structure variables and outputs in Terraform HCL?

The best way to structure Terraform HCL variables and outputs is to follow detailed best practice definitions, ensuring clear code generation, readability, and maintainable infrastructure as code.