Everything to know before HashiCorp Terraform Associate (003): exam format and scope, who it’s for, skills measured (workflow, state/backends, variables/modules, providers/auth, import/replace/refresh-only, workspaces, policy awareness), a 2–4 week plan, and exam-day tactics.
Study funnel: Read this Overview → work the Syllabus objective-by-objective → keep the Cheatsheet open for commands/workflows → validate with Practice.
1) Core workflowinit → fmt/validate → plan → apply → destroy
, plans vs binary plan files, review practices.
2) State & backends
What state is, why it’s sensitive, local vs remote, locking (e.g., S3+DynamoDB), reconfigure with -backend-config
, state CLI for surgical moves.
3) Variables, outputs & expressions
Types/validation, sensitive
, var precedence, locals, for_each
vs count
, dynamic blocks, common functions.
4) Modules & versioning
Module structure, pinning module/provider versions, composition, registry usage and documentation.
5) Providers & authentication
Provider config and constraints, multiple providers/aliases, common auth flows (env/CLI profiles/ADC).
6) Change management-replace
for intentional recreate, refresh-only plans for drift, judicious use of -target
, lifecycle meta-args (create_before_destroy, ignore_changes, prevent_destroy).
7) Workspaces & environments
When workspaces are enough vs when to use separate states/backends for real isolation.
8) Policy awareness & CI
Plan review, least-privilege credentials, remote runs/state, Sentinel/OPA awareness.
locals
, and mark sensitive
.for_each
over count
when stable addressing is needed.-replace
.plan -refresh-only
and decide next steps.If fewer than ~6 boxes are checked, spend two extra days with the Cheatsheet + targeted drills.
Week 1 — Workflow & State
state mv/rm/show
)Week 2 — Variables/Modules/Providers
Week 3 — Changes, Import & Environments
-replace
, lifecycle meta-args, refresh-onlyWeek 4 (optional) — Polish & Mocks
Daily cadence: 30–45 min reading → 20–25 question drill → convert misses into two bullets (why wrong / why right) → re-drill within 24–48h.
Safe change flow
Make change → fmt
/validate
→ plan -out=plan.bin
→ review → apply plan.bin
.
Import flow
Add HCL for the resource → import block (or terraform import
) → plan
→ apply
.
Intentional recreateplan -replace=addr
→ apply -replace=addr
(prefer over taint).
Drift detectionplan -refresh-only
→ decide remediate vs tolerate (possibly ignore_changes
).
Stable fan-out
Prefer for_each
with meaningful keys; avoid index churn from count
.
lifecycle.create_before_destroy = true
.lifecycle.ignore_changes = [that_field]
.provider =
on resources/modules.-target
sparingly; favor architectural fixes or staged applies.