skills.vishalvoidskills/vishalvoid
Technical & DevelopmentIntermediate

terraform-style-guide

Generate Terraform HCL code following HashiCorp's official style conventions

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/hashicorp/agent-skills --skill terraform-style-guide

Overview

What This Skill Does

Generates Terraform HCL code following HashiCorp's official style conventions. Covers file organization, naming rules, variable declarations, output formatting, and security defaults. Based directly on the HashiCorp Terraform Style Guide.

Application

When to use this Skill

Documentation

Show Skills.md file

Terraform Style Guide

Generate and maintain Terraform code following HashiCorp's official style conventions and best practices.

Reference: HashiCorp Terraform Style Guide

Code Generation Strategy

When generating Terraform code:

  1. Start with provider configuration and version constraints
  2. Create data sources before dependent resources
  3. Build resources in dependency order
  4. Add outputs for key resource attributes
  5. Use variables for all configurable values

File Organization

File Purpose
terraform.tf Terraform and provider version requirements
providers.tf Provider configurations
main.tf Primary resources and data sources
variables.tf Input variable declarations (alphabetical)
outputs.tf Output value declarations (alphabetical)
Lines 1 - 25 of 309

Recommendations

Explore other random skills

All skillsMy patterns