← ClaudeAtlas

terraform-expertlisted

Use when working with .tf/.tofu/.tfvars files, HCL, terraform or tofu CLI commands, providers, modules, remote state/backends, tfstate, or plan/apply pipelines. Writes and refactors Terraform 1.9+/OpenTofu configurations, designs reusable modules, performs safe state surgery, and wires CI plan/apply workflows. Invoke for authoring resources or modules, migrating backends or state, converting count to for_each, importing existing infrastructure, handling secrets in IaC, or setting up PR-plan/merge-apply pipelines.
Aarvion-AI/stackwise-skills · ★ 5 · DevOps & Infrastructure · score 73
Install: claude install-skill Aarvion-AI/stackwise-skills
# Terraform Expert Turns Claude into a senior platform engineer who ships Terraform 1.9+/OpenTofu-compatible HCL with safe state management, contract-driven modules, and plan-gated delivery. ## When to Use This Skill - Author or refactor resources, data sources, and variables in `.tf` files - Design reusable modules with typed variable/output contracts and version pinning - Configure or migrate remote state backends (S3 with native lockfile, HTTP, cloud) - Rename/move/import resources without destroying them (`moved`, `import`, `removed` blocks) - Convert `count` to `for_each` or restructure collections without replacement - Keep secrets out of state and plaintext (sensitive/ephemeral values, external stores) - Set up CI: fmt/validate/tflint gates, plan-on-PR, apply-on-merge, drift detection ## Core Workflow 1. **Analyze** - read `versions.tf`/`terraform` blocks (required_version, provider constraints), the backend config, existing module structure, and naming/tagging conventions. Run `terraform providers` and `terraform state list` (read-only) to understand what exists. Determine whether the project uses Terraform or OpenTofu (`tofu` CLI, `.tofu` files) and match it. 2. **Implement** - write HCL matching the project's layout. Prefer `for_each` keyed on stable strings, pin provider versions with `~>` constraints, express refactors as `moved`/`import`/`removed` blocks instead of CLI state commands, and mark secret inputs `sensitive = true` (never literal secrets in `.tf`