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.

At a glance
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

CertificationTerraform Associate
VendorHashiCorp
LevelAssociate
StatusActive

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.

All 30 free questions
  1. Question 1Read, generate, and modify configuration

    Which meta-argument creates one resource instance for each key in a map or set of strings?

    1. Acount, which creates instances indexed by number and works with integer values only
    2. Bdepends_on, which sets an explicit dependency between resources so that the graph orders them
    3. Cfor_each, which creates one instance per key in a map or set of strings
    4. Dlifecycle, which controls create-before-destroy and prevent_destroy behavior for a resource
    Show answer and explanation
    Correct answer: C

    for_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.

  2. 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?

    1. AState locking supplied by the backend, so the second run waits until the first run releases the lock
    2. BBucket versioning merges the two state files automatically at the end of each run
    3. CEach engineer's run writes to a separate state, so the two runs never share any state data at all
    4. DTerraform reads the state during apply but never writes to it, so concurrent applies cannot conflict
    Show answer and explanation
    Correct answer: A

    Remote 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.

  3. Question 3Use the Terraform CLI

    Which command rewrites configuration files in the working directory into the canonical formatting style?

    1. Aterraform validate, which checks the configuration for syntax errors and internal consistency
    2. Bterraform fmt, which rewrites configuration files into the canonical formatting style
    3. Cterraform show, which prints the current state or a saved plan in a human-readable form
    4. Dterraform plan with the -out flag, which saves the execution plan to a file for later use
    Show answer and explanation
    Correct answer: B

    terraform 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.

  4. Question 4Interact with Terraform modules

    Which block calls a child module from a root configuration and passes input values to it?

    1. AA resource block, which declares a managed infrastructure object together with its arguments
    2. BA data block, which reads an existing object without managing its lifecycle in the configuration
    3. CA provider block, which sets the credentials and the region that are used for API calls
    4. DA module block, which names a source and passes input variables to the child module
    Show answer and explanation
    Correct answer: D

    A module block references the child module's source and supplies its input variables. Resource, data and provider blocks do not call child modules.

  5. Question 5Understand Terraform Cloud

    Which Terraform Cloud feature evaluates a run's plan against organization-wide rules before the apply step?

    1. APrivate registry, which stores and versions reusable modules for the organization's teams to share
    2. BVCS connection, which starts runs automatically when commits are pushed to the linked repository
    3. CPolicy as code, such as Sentinel or OPA policies that evaluate the plan before it is applied
    4. DVariable sets, which share environment variables and Terraform variables across many workspaces
    Show answer and explanation
    Correct answer: C

    Policy 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

  1. Read the official HashiCorp outline first (exam page), so you know exactly what is in scope.
  2. Give the most time to Read, generate, and modify configuration and Implement and maintain state: together they make up 35% of the questions.
  3. Take the free 30-question practice test and note which topics you miss.
  4. 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.

Full question bank
Coming to the store soon

The full 112-question bank for Terraform Associate is in final review. The free practice test is open now.

Start the free practice test

Terraform Associate FAQ

Related exams