terraform-style-guide — for Claude Code terraform-provider-aap, community, for Claude Code, ide skills, versions.tf, Terraform, Generate, maintain, following, HashiCorp

v1.0.0

Sobre este Skill

Perfeito para Agentes de Infraestrutura como Código que necessitam de configurações de Terraform padronizadas e convenções de estilo oficiais da HashiCorp. Resumo localizado: Generate Terraform HCL code following HashiCorps official style conventions and best practices. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Recursos

Terraform Style Guide
Generate and maintain Terraform code following HashiCorp's official style conventions and best
Reference: HashiCorp Terraform Style Guide
Code Generation Strategy
When generating Terraform module code:

# Core Topics

hashi-demo-lab hashi-demo-lab
[0]
[0]
Updated: 3/11/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 8/11

This page remains useful for teams, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution
Review Score
8/11
Quality Score
46
Canonical Locale
en
Detected Body Locale
en

Perfeito para Agentes de Infraestrutura como Código que necessitam de configurações de Terraform padronizadas e convenções de estilo oficiais da HashiCorp. Resumo localizado: Generate Terraform HCL code following HashiCorps official style conventions and best practices. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Por que usar essa habilidade

Habilita os agentes a gerar e manter o código Terraform seguindo as melhores práticas, utilizando restrições de versão, requisitos de provedor e ordem de dependência, enquanto adere ao guia de estilo oficial da HashiCorp para gerenciamento de infraestrutura eficiente.

Melhor para

Perfeito para Agentes de Infraestrutura como Código que necessitam de configurações de Terraform padronizadas e convenções de estilo oficiais da HashiCorp.

Casos de Uso Práticos for terraform-style-guide

Gerar código de módulo Terraform com restrições de versão e requisitos de provedor
Criar fontes de dados antes de recursos dependentes para configuração de infraestrutura eficiente
Construir recursos em ordem de dependência com criação condicional para gerenciamento de infraestrutura escalável

! Segurança e Limitações

  • Requer conhecimento do Terraform da HashiCorp e seu ecossistema
  • Limitado ao gerenciamento de infraestrutura como código específico do Terraform

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is terraform-style-guide?

Perfeito para Agentes de Infraestrutura como Código que necessitam de configurações de Terraform padronizadas e convenções de estilo oficiais da HashiCorp. Resumo localizado: Generate Terraform HCL code following HashiCorps official style conventions and best practices. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

How do I install terraform-style-guide?

Run the command: npx killer-skills add hashi-demo-lab/terraform-provider-aap/terraform-style-guide. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for terraform-style-guide?

Key use cases include: Gerar código de módulo Terraform com restrições de versão e requisitos de provedor, Criar fontes de dados antes de recursos dependentes para configuração de infraestrutura eficiente, Construir recursos em ordem de dependência com criação condicional para gerenciamento de infraestrutura escalável.

Which IDEs are compatible with terraform-style-guide?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for terraform-style-guide?

Requer conhecimento do Terraform da HashiCorp e seu ecossistema. Limitado ao gerenciamento de infraestrutura como código específico do Terraform.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add hashi-demo-lab/terraform-provider-aap/terraform-style-guide. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use terraform-style-guide immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

terraform-style-guide

Resumo localizado: Generate Terraform HCL code following HashiCorps official style conventions and best practices. This AI agent skill supports Claude Code

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

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 module code:

  1. Start with version constraints and provider requirements in versions.tf
  2. Create data sources before dependent resources
  3. Build resources in dependency order with conditional creation (count or for_each)
  4. Add outputs for key resource attributes, using try() for conditional resources
  5. Use variables for all configurable values with secure defaults
  6. Use this as the primary resource name for single instances
  7. Prefer for_each over count for resource iteration (stable addresses)
  8. Provider configuration belongs in examples/, NOT the root module

File Organization

FilePurpose
versions.tfTerraform and provider version constraints (required_version + required_providers)
main.tfPrimary resources and data sources
variables.tfInput variable declarations (alphabetical)
outputs.tfOutput value declarations (alphabetical)
locals.tfLocal value declarations

Example Structure

hcl
1# versions.tf 2terraform { 3 required_version = ">= 1.7" 4 5 required_providers { 6 aws = { 7 source = "hashicorp/aws" 8 version = ">= 5.0" 9 } 10 } 11} 12 13# variables.tf 14variable "environment" { 15 description = "Target deployment environment" 16 type = string 17 18 validation { 19 condition = contains(["dev", "staging", "prod"], var.environment) 20 error_message = "Environment must be dev, staging, or prod." 21 } 22} 23 24# locals.tf 25locals { 26 common_tags = { 27 Environment = var.environment 28 ManagedBy = "Terraform" 29 } 30} 31 32# main.tf 33resource "aws_vpc" "main" { 34 cidr_block = var.vpc_cidr 35 enable_dns_hostnames = true 36 37 tags = merge(local.common_tags, { 38 Name = "${var.project_name}-${var.environment}-vpc" 39 }) 40} 41 42# outputs.tf 43output "vpc_id" { 44 description = "ID of the created VPC" 45 value = aws_vpc.main.id 46}

Code Formatting

Block Organization

Arguments precede blocks, with meta-arguments first:

hcl
1resource "aws_instance" "example" { 2 # Meta-arguments 3 count = 3 4 5 # Arguments 6 ami = "ami-0c55b159cbfafe1f0" 7 instance_type = "t2.micro" 8 9 # Blocks 10 root_block_device { 11 volume_size = 20 12 } 13 14 # Lifecycle last 15 lifecycle { 16 create_before_destroy = true 17 } 18}

Variables

Every variable must include type and description:

hcl
1variable "instance_type" { 2 description = "EC2 instance type for the web server" 3 type = string 4 default = "t2.micro" 5 6 validation { 7 condition = contains(["t2.micro", "t2.small", "t2.medium"], var.instance_type) 8 error_message = "Instance type must be t2.micro, t2.small, or t2.medium." 9 } 10} 11 12variable "database_password" { 13 description = "Password for the database admin user" 14 type = string 15 sensitive = true 16}

Outputs

Every output must include description:

hcl
1output "instance_id" { 2 description = "ID of the EC2 instance" 3 value = aws_instance.web.id 4} 5 6output "database_password" { 7 description = "Database administrator password" 8 value = aws_db_instance.main.password 9 sensitive = true 10}

Dynamic Resource Creation

Prefer for_each over count

hcl
1# Bad - count for multiple resources 2resource "aws_instance" "web" { 3 count = var.instance_count 4 tags = { Name = "web-${count.index}" } 5} 6 7# Good - for_each with named instances 8variable "instance_names" { 9 type = set(string) 10 default = ["web-1", "web-2", "web-3"] 11} 12 13resource "aws_instance" "web" { 14 for_each = var.instance_names 15 tags = { Name = each.key } 16}

count for Conditional Creation

hcl
1resource "aws_cloudwatch_metric_alarm" "cpu" { 2 count = var.enable_monitoring ? 1 : 0 3 4 alarm_name = "high-cpu-usage" 5 threshold = 80 6}

Security Best Practices

Apply secure defaults per tf-security-baselines skill.

Version Pinning

hcl
1terraform { 2 required_version = ">= 1.7" 3 4 required_providers { 5 aws = { 6 source = "hashicorp/aws" 7 version = ">= 5.0" # Minimum version supporting required features 8 } 9 } 10}

Code Review Checklist

  • Code formatted with terraform fmt
  • Configuration validated with terraform validate
  • Files organized according to standard structure
  • All variables have type and description
  • All outputs have descriptions
  • Resource names use descriptive nouns with underscores
  • Version constraints pinned explicitly
  • Sensitive values marked with sensitive = true
  • No hardcoded credentials or secrets
  • Security best practices applied

Based on: HashiCorp Terraform Style Guide

Habilidades Relacionadas

Looking for an alternative to terraform-style-guide or another community skill for your workflow? Explore these related open-source skills.

Ver tudo

openclaw-release-maintainer

Logo of openclaw
openclaw

Resumo localizado: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

widget-generator

Logo of f
f

Resumo localizado: Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat . It covers ai, artificial-intelligence, awesome-list workflows. This AI agent skill supports Claude Code, Cursor, and

flags

Logo of vercel
vercel

Resumo localizado: The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
Navegador

pr-review

Logo of pytorch
pytorch

Resumo localizado: Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review . It covers autograd, deep-learning, gpu workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
Desenvolvedor