Module 3: Core Terraform Workflow

What Each Command Touches

Command Reads config Writes config Reads state Writes state Reads real infra Changes real infra
init ✓ — backend only¹ only with -migrate-state — —
fmt ✓ ✓ (whitespace) — — — —
validate ✓ — — — — —
plan ✓ — ✓ — ✓ (refresh) —
plan -refresh-only ✓ — ✓ — ✓ —
apply ✓ — ✓ ✓ ✓ ✓
apply -refresh-only ✓ — ✓ ✓ ✓ —
destroy ✓ — ✓ ✓ ✓ ✓
show, output, state list — — ✓ — — —

¹ init connects to the backend but doesn't change resource data.