terraform-style-guide — community terraform-provider-aap, community, ide skills

v1.0.0

À propos de ce Skill

Parfait pour les agents d'Infrastructure en tant que Code nécessitant des configurations Terraform standardisées et des conventions de style officielles de HashiCorp. Generate Terraform HCL code following HashiCorps official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.

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: 7/11

This page remains useful for operators, 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
7/11
Quality Score
46
Canonical Locale
en
Detected Body Locale
en

Parfait pour les agents d'Infrastructure en tant que Code nécessitant des configurations Terraform standardisées et des conventions de style officielles de HashiCorp. Generate Terraform HCL code following HashiCorps official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.

Pourquoi utiliser cette compétence

Permet aux agents de générer et de maintenir du code Terraform en suivant les meilleures pratiques, en utilisant des contraintes de version, des exigences de fournisseur et un ordre de dépendance, tout en respectant le guide de style officiel de HashiCorp pour une gestion d'infrastructure efficace.

Meilleur pour

Parfait pour les agents d'Infrastructure en tant que Code nécessitant des configurations Terraform standardisées et des conventions de style officielles de HashiCorp.

Cas d'utilisation exploitables for terraform-style-guide

Générer du code de module Terraform avec des contraintes de version et des exigences de fournisseur
Créer des sources de données avant les ressources dépendantes pour une configuration d'infrastructure efficace
Construire des ressources dans l'ordre de dépendance avec création conditionnelle pour une gestion d'infrastructure scalable

! Sécurité et Limitations

  • Nécessite une connaissance de Terraform de HashiCorp et de son écosystème
  • Limité à la gestion d'infrastructure en tant que code spécifique à 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?

Parfait pour les agents d'Infrastructure en tant que Code nécessitant des configurations Terraform standardisées et des conventions de style officielles de HashiCorp. Generate Terraform HCL code following HashiCorps official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.

How do I install terraform-style-guide?

Run the command: npx killer-skills add hashi-demo-lab/terraform-provider-aap. 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: Générer du code de module Terraform avec des contraintes de version et des exigences de fournisseur, Créer des sources de données avant les ressources dépendantes pour une configuration d'infrastructure efficace, Construire des ressources dans l'ordre de dépendance avec création conditionnelle pour une gestion d'infrastructure scalable.

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?

Nécessite une connaissance de Terraform de HashiCorp et de son écosystème. Limité à la gestion d'infrastructure en tant que code spécifique à 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. 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

Install terraform-style-guide, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

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

Compétences associées

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

Voir tout

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

widget-generator

Logo of f
f

Générez des plugins de widgets personnalisables pour le système de flux prompts.chat

flags

Logo of vercel
vercel

Le Cadre de Réaction

138.4k
0
Navigateur

pr-review

Logo of pytorch
pytorch

Tenseurs et réseaux neuronaux dynamiques en Python avec une forte accélération GPU

98.6k
0
Développeur