All HashiCorp exams
Terraform Associate
What the Terraform Associate exam covers and what it costs, with a free 30-question practice test and an explanation for every answer.
- Duration
- 60 minutes
- Level
- Associate
- Topic areas
- 9
- Free practice questions
- 30
- Full question bank
- 112 questions
What the Terraform Associate exam covers
The topic areas in our Terraform Associate question bank, with each one's share of the 112 practice questions.
Terraform Associate cost and format
| Certification | Terraform Associate |
|---|---|
| Vendor | HashiCorp |
| Level | Associate |
| Status | Active |
Last checked October 22, 2026 against the official HashiCorp exam page.
Terraform Associate sample questions
The first 5 questions from the free practice test. Open a question to see the answer and why it is right.
Question 1Read, generate, and modify configuration
Which meta-argument creates one resource instance for each key in a map or set of strings?
- Acount, which creates instances indexed by number and works with integer values only
- Bdepends_on, which sets an explicit dependency between resources so that the graph orders them
- Cfor_each, which creates one instance per key in a map or set of strings
- Dlifecycle, which controls create-before-destroy and prevent_destroy behavior for a resource
Show answer and explanationHide answer
Correct answer: Cfor_each creates instances keyed by map keys or set members, which gives stable addresses when items are added or removed. count indexes by number, depends_on orders resources, and lifecycle changes replacement behavior.
Question 2Implement and maintain state
Two engineers start terraform apply at nearly the same time against the same remote backend. What prevents conflicting writes to the state?
- AState locking supplied by the backend, so the second run waits until the first run releases the lock
- BBucket versioning merges the two state files automatically at the end of each run
- CEach engineer's run writes to a separate state, so the two runs never share any state data at all
- DTerraform reads the state during apply but never writes to it, so concurrent applies cannot conflict
Show answer and explanationHide answer
Correct answer: ARemote backends that support locking hold a lock during a run, so a second run waits or fails rather than overwriting the state. Versioning does not merge states, and Terraform writes state during apply.
Question 3Use the Terraform CLI
Which command rewrites configuration files in the working directory into the canonical formatting style?
- Aterraform validate, which checks the configuration for syntax errors and internal consistency
- Bterraform fmt, which rewrites configuration files into the canonical formatting style
- Cterraform show, which prints the current state or a saved plan in a human-readable form
- Dterraform plan with the -out flag, which saves the execution plan to a file for later use
Show answer and explanationHide answer
Correct answer: Bterraform fmt applies the standard HCL formatting to files, which keeps code consistent across a team. Validate checks correctness, plan writes a plan file and show displays state or plans without changing formatting.
Question 4Interact with Terraform modules
Which block calls a child module from a root configuration and passes input values to it?
- AA resource block, which declares a managed infrastructure object together with its arguments
- BA data block, which reads an existing object without managing its lifecycle in the configuration
- CA provider block, which sets the credentials and the region that are used for API calls
- DA module block, which names a source and passes input variables to the child module
Show answer and explanationHide answer
Correct answer: DA module block references the child module's source and supplies its input variables. Resource, data and provider blocks do not call child modules.
Question 5Understand Terraform Cloud
Which Terraform Cloud feature evaluates a run's plan against organization-wide rules before the apply step?
- APrivate registry, which stores and versions reusable modules for the organization's teams to share
- BVCS connection, which starts runs automatically when commits are pushed to the linked repository
- CPolicy as code, such as Sentinel or OPA policies that evaluate the plan before it is applied
- DVariable sets, which share environment variables and Terraform variables across many workspaces
Show answer and explanationHide answer
Correct answer: CPolicy as code evaluates the plan against rules, such as allowed regions or tag requirements, and can block the apply. The registry, variable sets and VCS integration support sharing and triggering runs rather than enforcing plan rules.
How to prepare for Terraform Associate
- Read the official HashiCorp outline first (exam page), so you know exactly what is in scope.
- Give the most time to Read, generate, and modify configuration and Implement and maintain state: together they make up 35% of the questions.
- Take the free 30-question practice test and note which topics you miss.
- Go back to the weak topics, then test again. A practice score shows where to study; it does not predict your exam result.
Full Terraform Associate question bank
All 112 questions with answers and explanations, as a PDF, an online practice exam, or both.
The full 112-question bank for Terraform Associate is in final review. The free practice test is open now.
Start the free practice testTerraform Associate FAQ
Related exams
| Exam | Vendor | Level |
|---|---|---|
| Terraform Infrastructure Engineer Professional | HashiCorp | Professional |
| Terraform Authoring & Operations Advanced | HashiCorp | Professional |
| Vault Associate | HashiCorp | Associate |
| Vault Operations Advanced | HashiCorp | Professional |
| DOP-C02: AWS Certified DevOps Engineer - Professional | AWS | Professional |
| Professional Cloud DevOps Engineer | Google Cloud | Professional |