/ Annuaire / Playground / terraform-skill
● Communauté antonbabenko ⚡ Instantané

terraform-skill

par 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'.

Pourquoi l'utiliser

Fonctionnalités clés

Démo en direct

Aperçu en pratique

terraform-skill.replay ▶ prêt
0/0

Installer

Choisissez votre 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
    }
  }
}

Ouvrez Claude Desktop → Settings → Developer → Edit Config. Redémarrez après avoir enregistré.

~/.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 utilise le même schéma mcpServers que Claude Desktop. La config projet l'emporte sur la 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
    }
  }
}

Cliquez sur l'icône MCP Servers dans la barre latérale Cline, puis "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
    }
  }
}

Même format que Claude Desktop. Redémarrez Windsurf pour appliquer.

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

Continue utilise un tableau d'objets serveur plutôt qu'une map.

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

Ajoutez dans context_servers. Zed recharge à chaud à la sauvegarde.

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

Une seule ligne. Vérifiez avec claude mcp list. Supprimez avec claude mcp remove.

Cas d'usage

Usages concrets : terraform-skill

Scaffold a new Terraform module the idiomatic way

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

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

Déroulement
  1. State the module's purpose
    Use the terraform-skill. Scaffold a module for an AWS ECS service with optional ALB and CloudWatch alarms.✓ Copié
    → 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.✓ Copié
    → Reasoned choice and scaffolded test files

Résultat : A module that passes review on the first PR.

Pièges
  • Versioning too loose (~> vs specific) — Skill defaults to pinned minors for required_providers
Combiner avec : github

Add a hardened CI pipeline to an existing Terraform repo

👤 DevOps / platform engineers ⏱ ~40 min advanced

Quand l'utiliser : Your repo lacks plan-on-PR, cost checks, or security scans.

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

Résultat : A pipeline that blocks risky changes without slowing everyone down.

Pièges
  • Pipeline uses long-lived AWS keys — Skill prefers OIDC/role assumption, not static keys
Combiner avec : github

Design a multi-environment layout without state explosions

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

Quand l'utiliser : You feel the pain of copy-pasted env folders or a monolith state.

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

Résultat : A layout you can defend in an ADR.

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

Combinaisons

Associez-le à d'autres MCPs pour un effet X10

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.✓ Copié
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.✓ Copié

Outils

Ce que ce MCP expose

OutilEntréesQuand appelerCoût
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

Coût et limites

Coût d'exécution

Quota d'API
None
Tokens par appel
2-6k per session — moderate
Monétaire
Free — skill is local
Astuce
Ask one focused question (testing / CI / layout) at a time.

Sécurité

Permissions, secrets, portée

Stockage des identifiants : No credentials in the skill. Any provider creds belong in your env, not the generated code.
Sortie de données : None from the skill itself

Dépannage

Erreurs courantes et correctifs

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.

Alternatives

terraform-skill vs autres

AlternativeQuand l'utiliserCompromis
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

Plus

Ressources

📖 Lire le README officiel sur GitHub

🐙 Voir les issues ouvertes

🔍 Parcourir les 400+ serveurs MCP et Skills