Home
cd ../playbooks
Developer ToolsAdvanced

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.

20 minutes
By daymadeSource
#terraform#iac#devops#provisioners#infrastructure

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.

Or install from your terminal:
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.

README.md

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.

$Related Playbooks

Developer Tools

Telegram Bot Builder

Telegram bot development - chatbots, notifications, AI assistants, and group automation

10 minutes
Advanced
Developer Tools

Tool Interface Design for Agents

Design agent-facing tools as contracts an agent must infer entirely from the description alone — the consolidation principle over narrow overlapping tools, architectural reduction toward primitives, actionable error-recovery messages, and an 8-point audit checklist.

10 minutes
Advanced
Developer Tools

PR Queue Triage

Clear a backlog of open pull requests before a release by classifying every PR into an evidence-based disposition — never by title — with a real git merge-tree test against the actual release branch, not the platform's often-wrong mergeable flag.

10 minutes
Intermediate
Developer Tools

Reproducible Database Lookup

A methodology for querying public database APIs — scientific, regulatory, financial, or otherwise — so another agent or human can repeat exactly what you did: bounded calls, count reconciliation, identifier-conversion tracking, and untrusted-data handling for every response.

10 minutes
Advanced
Developer Tools

Semantic Prompt Compression

Re-encode verbose system prompts, tool descriptions, and skill bodies into a dense telegraphic register — punctuation as connectives, label frames, verbless assertions — via re-encoding, not word deletion, with a density gate and a declared-loss verification pass.

5 minutes
Advanced
Developer Tools

Simplified Technical English for Docs

Write or rewrite technical documentation with the ASD-STE100 Simplified Technical English discipline — the aerospace maintenance-manual standard adapted for READMEs, runbooks, error messages, incident reports, and agent instructions.

10 minutes
Intermediate
Developer Tools

Project Graveyard: Autopsy Your Abandoned Side Projects

Scan local repos for dead side projects, autopsy each one from its git history, surface your personal death patterns, and pick the one corpse most worth resurrecting — then help ship it.

10 minutes
Intermediate
Developer Tools

Secure Coding Practices

A threat-model-first secure coding reference — trust-boundary mapping, a STRIDE quick-pass, a three-tier always/ask-first/never boundary system, and copy-paste prevention patterns for injection, XSS, broken access control, and SSRF.

10 minutes
Intermediate
Developer Tools

PR Review Toolkit

Six specialist reviewers — comments, tests, error handling, type design, general quality, and simplification — each triggered by name or automatically based on what changed in the diff.

5 minutes
Intermediate
Developer Tools

Security Guidance Review

Three-layer continuous security review for AI-generated code — instant regex warnings on edit, an LLM diff review at end of turn, and an agentic commit-time reviewer that traces data flow across files.

10 minutes
Advanced
Developer Tools

Vercel Analytics & Speed Insights Setup

Wire up Vercel Analytics, Speed Insights, and SPA routing rewrites into a React/Vite project in one pass — including the routing fix most people miss.

5 minutes
Beginner
Developer Tools

Shannon: Autonomous Pentesting for Your Own Apps

An operating guide for driving Keygraph's Shannon CLI: scope a white-box pentest against an app you own, run it, and turn the proven findings into fix tasks

15 minutes
Advanced

Browse all Developer Tools playbooks →