/ Verzeichnis / Playground / terraform-skill
● Community antonbabenko ⚡ Sofort

terraform-skill

von antonbabenko · antonbabenko/terraform-skill

Maintained by Anton Babenko — Terraform and OpenTofu patterns from terraform-best-practices.com and terraform-aws-modules, with when-and-why decision frameworks.

A Claude agent skill for Terraform/OpenTofu work. Teaches Claude to choose between native Terraform tests (1.6+) and Terratest, structure modules like terraform-aws-modules, wire up GitHub Actions / GitLab CI with cost estimation and security scanning, and apply production patterns. Explains not just 'what' but 'when and why'.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

terraform-skill.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "terraform-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/antonbabenko/terraform-skill",
        "~/.claude/skills/terraform-skill"
      ],
      "_inferred": true
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "terraform-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/antonbabenko/terraform-skill",
        "~/.claude/skills/terraform-skill"
      ],
      "_inferred": true
    }
  }
}

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "terraform-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/antonbabenko/terraform-skill",
        "~/.claude/skills/terraform-skill"
      ],
      "_inferred": true
    }
  }
}

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "terraform-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/antonbabenko/terraform-skill",
        "~/.claude/skills/terraform-skill"
      ],
      "_inferred": true
    }
  }
}

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "terraform-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/antonbabenko/terraform-skill",
        "~/.claude/skills/terraform-skill"
      ]
    }
  ]
}

Continue nutzt ein Array von Serverobjekten statt einer Map.

~/.config/zed/settings.json
{
  "context_servers": {
    "terraform-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/antonbabenko/terraform-skill",
          "~/.claude/skills/terraform-skill"
        ]
      }
    }
  }
}

In context_servers hinzufügen. Zed lädt beim Speichern neu.

claude mcp add terraform-skill -- git clone https://github.com/antonbabenko/terraform-skill ~/.claude/skills/terraform-skill

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: terraform-skill

Scaffold a new Terraform module the idiomatic way

👤 Platform engineers publishing a reusable module ⏱ ~45 min intermediate

Wann einsetzen: You're splitting out a module for internal or public reuse and want the structure right the first time.

Ablauf
  1. State the module's purpose
    Use the terraform-skill. Scaffold a module for an AWS ECS service with optional ALB and CloudWatch alarms.✓ Kopiert
    → Structure follows terraform-aws-modules conventions — main.tf, variables.tf, outputs.tf, versions.tf, README.md, examples/
  2. Add tests
    Recommend tests — native or Terratest? Apply the decision framework.✓ Kopiert
    → Reasoned choice and scaffolded test files

Ergebnis: A module that passes review on the first PR.

Fallstricke
  • Versioning too loose (~> vs specific) — Skill defaults to pinned minors for required_providers
Kombinieren mit: github

Add a hardened CI pipeline to an existing Terraform repo

👤 DevOps / platform engineers ⏱ ~40 min advanced

Wann einsetzen: Your repo lacks plan-on-PR, cost checks, or security scans.

Voraussetzungen
  • GitHub or GitLab hosting — For the respective pipeline template
Ablauf
  1. Request the pipeline
    Use terraform-skill. Add GitHub Actions for plan-on-PR, Infracost, tfsec, and gated apply on main.✓ Kopiert
    → Workflow files with concurrency guards, OIDC auth, status checks
  2. Security tune
    Which Checkov / tfsec rules should we fail on vs warn?✓ Kopiert
    → Opinionated list with rationale

Ergebnis: A pipeline that blocks risky changes without slowing everyone down.

Fallstricke
  • Pipeline uses long-lived AWS keys — Skill prefers OIDC/role assumption, not static keys
Kombinieren mit: github

Design a multi-environment layout without state explosions

👤 Teams scaling from dev/prod to dev/staging/prod/per-tenant ⏱ ~60 min advanced

Wann einsetzen: You feel the pain of copy-pasted env folders or a monolith state.

Ablauf
  1. Describe the envs
    Use terraform-skill. We need dev/staging/prod plus per-tenant envs. What layout scales?✓ Kopiert
    → Recommendation with tradeoffs (workspaces vs dirs vs Terragrunt)
  2. Plan the migration
    We're currently on a single state. Sketch the migration.✓ Kopiert
    → State-move plan with risk callouts

Ergebnis: A layout you can defend in an ADR.

Fallstricke
  • Moving state without imports/breakdowns can destroy resources — The skill insists on terraform state mv / import steps, not delete-and-recreate

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

terraform-skill + github

Skill produces module + workflow; GitHub MCP opens the PR

Scaffold the module, add the workflow, open a PR into our platform repo.✓ Kopiert
terraform-skill + aws

Cross-check the Terraform plan against live AWS state

Show me the plan, then diff against actual resources via the AWS MCP.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
Module scaffolding module purpose + provider Starting a new module 0
Test strategy advisor module scope Adding test coverage 0
CI pipeline templates (GHA / GitLab) hosting choice Setting up CI for a repo 0
Pattern compare a snippet Reviewing existing code 0

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
None
Tokens pro Aufruf
2-6k per session — moderate
Kosten in €
Free — skill is local
Tipp
Ask one focused question (testing / CI / layout) at a time.

Sicherheit

Rechte, Secrets, Reichweite

Credential-Speicherung: No credentials in the skill. Any provider creds belong in your env, not the generated code.
Datenabfluss: None from the skill itself

Fehlerbehebung

Häufige Fehler und Lösungen

Skill's suggestion conflicts with your org's style

Provide your .terraform-docs config and existing module as style anchors.

Recommended OIDC setup fails on assume-role

Check the trust policy's sub condition matches your branch/env.

Alternativen

terraform-skill vs. andere

AlternativeWann stattdessenKompromiss
Terragrunt-first skillsYou're committed to TerragruntLess coverage here; Terragrunt workflows differ substantially
Cloud-provider-native IaC skills (aws-cdk, pulumi)You're not on Terraform/OpenTofuDifferent tool, different patterns

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen