Terraform Operational Traps
A battle-tested playbook mapping real Terraform provisioner, multi-environment, and first-deploy failures to copy-paste fixes.
Dev & CodingAdvanced★ 1,323⑂ 212AI score 7/10Last updated: Aug 8, 2026
What it does
This skill encodes real infrastructure incidents as exact error → root cause → copy-paste fix. Claude Code pulls it in automatically when you write Terraform code or debug a failing terraform apply.
Coverage highlights:
- Provisioner traps:
docker: not foundwhen cloud-init is still running, rsync connection drops in local-exec, cloud-init hanging on debconf prompts,set -ehiding diagnostic logs - Container failures: volume ownership (EACCES, uid 1001), Restarting loops from missing databases/migrations, compose build args that only work from
.env - TLS & domains: why Caddy DNS-01 ACME needs a Cloudflare API Token (
cfut_) instead of a Global API Key; parameterizing hardcoded domains with{$VAR}/${VAR:?required} - Multi-environment isolation: table of globally unique resources, duplicate DNS A records sending ~50% of traffic to the wrong instance, snapshot cross-contamination
- Pre-deploy validation: a 7-point local checklist to run before
terraform apply
Who it's for
- Engineers configuring remote hosts with remote-exec/local-exec/file provisioners
- Teams running staging and production from one Terraform codebase
- Operators deploying Docker Compose + Caddy gateway + Cloudflare DNS stacks
- DevOps folks trying to kill the deploy → discover → fix → redeploy loop
Examples
terraform applyfails withdocker: not foundin remote-exec → Claude suggests a provisioner block gated bycloud-init status --wait.- TLS works in production but fails in staging → it walks through hardcoded domains in the Caddyfile and verifies the Cloudflare credential format.
- Before spinning up a second environment → it greps
.tffiles for globally unique names (SSH keys, log projects, DNS records) and renames them with an${env}-prefix.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the terraform-skill folder from the GitHub repo daymade/claude-code-skills into my ~/.claude/skills/terraform-skill/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/daymade/claude-code-skills.git && mkdir -p ~/.claude/skills && cp -r claude-code-skills/terraform-skill ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and move to a scratch directory:
cd ~/Downloads - Clone the repository:
git clone https://github.com/daymade/claude-code-skills.git - Create the skills directory if needed:
mkdir -p ~/.claude/skills - Copy the skill folder:
cp -r claude-code-skills/terraform-skill ~/.claude/skills/ - Confirm the
references/docs came along:ls ~/.claude/skills/terraform-skill - Restart Claude Code, then ask something like "my terraform remote-exec fails with docker: not found" to trigger the skill.
View source on GitHub ↗License: MIT