Terraform Operational Traps
Avoid the operational traps in Terraform provisioners, multi-environment isolation, and zero-to-deployment reliability — provisioner failures, snapshot cross-contamination, and post-apply container issues.
Terraform makes infrastructure reproducible until a provisioner silently fails or two environments share a snapshot. This playbook encodes the hard-won fixes for the traps that bite in production.
Who it's for: DevOps engineers, platform engineers, SREs
Example
"My container is unhealthy after terraform apply" → Claude isolates whether it's the provisioner, cloud-init, or compose config and walks through the fix
CLAUDE.md Template
New here? 3-minute setup guide → | Already set up? Copy the template below.
npx ccplaybooks add terraform-skill# Terraform Operational Traps
Failure patterns from real deployments. Every item caused an incident. Organized as: **exact error → root cause → copy-paste fix**.
## Provisioner traps (symptom → fix)
### `docker: not found` in remote-exec
cloud-init still installing Docker when provisioner SSHs in.
```hcl
provisioner "remote-exec" {Get new playbooks like this one
One email a week with new Claude Code workflows. Free, like everything here.
No spam. Unsubscribe anytime.
What This Does
Avoid the operational traps in Terraform provisioners, multi-environment isolation, and zero-to-deployment reliability — provisioner failures, snapshot cross-contamination, and post-apply container issues.
What's Inside
The template covers:
- Provisioner traps (symptom → fix)
- Multi-environment isolation
- Pre-deploy validation
- Zero-to-deployment
Quick Start
Step 1: Create a Project Folder
Make a dedicated folder for this workflow and open it in Claude Code.
Step 2: Download the Template
Click Download above to save the template, then drop it into your project as CLAUDE.md (or paste it into your existing one).
Step 3: Start Working
Tell Claude what you need in plain language — it will follow the template's workflow automatically. For example:
My container is unhealthy after terraform apply
Claude reads the template and runs the steps for you.