Terraform Associate 004 study guide: exam domains, plan and common mistakes
Written and reviewed by the DevOpsCode Lab Team. Last updated 19 November 2026.
Terraform Associate 004 is the HashiCorp Certified: Terraform Associate exam. It checks that you can use Terraform to define, change and maintain infrastructure: write configuration in HCL, run the core workflow, work with providers, modules and state, and use HCP Terraform for team workflows.
What the exam tests
Most questions are short and precise. They ask what a command does, what happens to state after an
action, which block or meta-argument meets a requirement, or what a piece of HCL will produce.
Reading a configuration and predicting the plan is the core skill. Knowing the difference between
similar commands (plan and apply -refresh-only, state rm and destroy) earns many of the
marks.
Domains and how much each counts
| Domain | Weight | What to be able to do | Questions in our bank |
|---|---|---|---|
| Infrastructure as Code (IaC) with Terraform | 8% | Explain IaC benefits, declarative versus imperative tools, and how Terraform manages multiple clouds and services | 23 |
| Terraform Fundamentals | 12% | Install and pin providers, understand the provider plugin model, the dependency lock file and how Terraform builds its resource graph | 35 |
| Core Terraform Workflow | 17% | Run init, validate, fmt, plan, apply and destroy, read plan output and know what each step changes |
49 |
| Terraform Configuration | 22% | Resources, data sources, variables, outputs, locals, expressions and functions, count, for_each, dynamic blocks, lifecycle rules, validation and sensitive values |
64 |
| Terraform Modules | 10% | Call modules from the registry and local paths, pass inputs and read outputs, pin module versions | 29 |
| Terraform State Management | 11% | Local and remote backends, state locking, terraform state subcommands, drift and refresh-only plans |
32 |
| Maintain Infrastructure with Terraform | 8% | Import existing resources, refactor with moved blocks, replace resources, logging and troubleshooting |
23 |
| HCP Terraform | 12% | Workspaces, remote runs, variable sets, the private registry, policy checks and team access | 35 |
Configuration and the core workflow are close to 40% of the exam, and HCP Terraform weighs as much as fundamentals.
Exam format
Our practice tests use 62 questions in 60 minutes with a 70% pass mark. The real exam is online proctored and uses multiple choice and multiple answer style questions rather than hands-on tasks. Check the official HashiCorp exam page for the current format, price and objectives before you book.
Who should take it
- Cloud, platform and DevOps engineers who write or review Terraform at work.
- Administrators moving from clicking in a console to infrastructure as code.
- Developers who own the infrastructure for their services.
Some hands-on Terraform experience with any provider is the usual starting point.
A 4-week study plan
| Week | Focus | Practice |
|---|---|---|
| 1 | IaC concepts, fundamentals and the core workflow: providers, lock file, init, plan, apply, destroy |
Domain quizzes on the first three domains; one full test as a baseline |
| 2 | Configuration: variables, outputs, locals, count versus for_each, dynamic blocks, functions, lifecycle |
Domain quiz; write a small config with the local or random provider and predict each plan before you run it |
| 3 | Modules, state and maintenance: backends, locking, state mv and state rm, import blocks, moved blocks |
Two domain quizzes; move a resource into a module and keep it out of the destroy list |
| 4 | HCP Terraform and full exams | Domain quiz for HCP Terraform, two full timed tests, then the mistakes quiz; book the exam when you score 80%+ twice |
Topics people often get wrong
- count versus for_each. With
count, removing an item from the middle of a list shifts the indexes and can destroy and recreate later resources.for_eachkeys each instance by a map key or set value, so removing one item affects only that item. - Removing from state is not destroying.
terraform state rmmakes Terraform forget a resource but leaves it running.terraform destroydeletes the real infrastructure. - Refresh and taint replacements.
terraform plan -refresh-onlyandapply -refresh-onlyreplace the deprecatedterraform refresh.terraform apply -replace=ADDRESSreplaces the deprecatedterraform taint. - Sensitive values.
sensitive = truehides a value in CLI output, but it is still stored in plain text in the state file. Protect the backend instead. - Version constraints.
~> 1.2allows any 1.x from 1.2 upward;~> 1.2.0allows only 1.2.x. The.terraform.lock.hclfile pins provider versions and belongs in version control;terraform init -upgradechanges it. - Two kinds of workspace. CLI workspaces are separate state files for one configuration. HCP Terraform workspaces each hold their own configuration, variables, state and run history.
How to use the practice tests
Start with the free Terraform Associate 004 questions to see the style. Then take one full timed test in exam mode for a baseline and look at the score by domain. Spend most of your time in the two weakest domains with domain quizzes, and finish with the mistakes quiz before each new full test. The readiness number tells you when your recent scores hold above the pass mark across all domains.
Frequently asked questions
How hard is Terraform Associate? It is an associate exam with precise questions. Engineers who use Terraform weekly often need 2–3 weeks of focused practice; newcomers usually need 4–6.
Do I need to know a specific cloud provider? No. Questions use providers as examples, but they test Terraform behaviour, not the details of AWS, Azure or Google Cloud resources.
I studied for the 003 version. What changed? Most of the knowledge carries over, but the 004 objectives are organised into the eight domains above. Compare the official 003 and 004 objective lists to see what moved or was added before you rely on older material.
Are these the real exam questions? No. Every question is written by us for the published exam objectives. We never use leaked or recalled exam content.
DevOpsCode Lab is not affiliated with or endorsed by HashiCorp. Exam names are trademarks of their owners. Check the official HashiCorp exam page for the current price, format and objectives before you book.