WebMagicInformatica
Terraform Associate (004) practice exams

HashiCorp Terraform Associate: mock tests

Find out if you're ready before you pay for the real exam. Start with a free 15-question readiness check, then practise with 2 full-length timed exams, every answer explained.

  • 2full exams
  • 114questions
  • 60 minper exam
  • 70%pass mark

Included in Premium

All 2 full exams, an AI tutor and a study plan

Plus every other certification mock test and the career tools.

Get Premium · ₹399 / 30 days

Free readiness check

15 questions across every domain, 20 minutes. See where you stand before you book.

Sign up free to take the check

Have an account? Log in

  • 2 full-length exams, 57 questions each
  • 60 minutes per exam, timed like the real thing
  • Every answer explained, with official documentation links
  • AI tutor on every question you get wrong
  • A study plan after every exam
  • Score by domain against the 70% pass mark

How it works

  1. 1Free readiness check15 questions from every domain in 20 minutes. Free with an account.
  2. 2Full timed exams2 × 57 questions in 60 minutes, included in Premium.
  3. 3Fix your weak spotsAn AI tutor explains each mistake and a study plan links the lessons to study.

What the exam covers

  • Infrastructure as Code (IaC) with Terraform8% of the exam
  • Terraform fundamentals12% of the exam
  • Core Terraform workflow12% of the exam
  • Terraform configuration28% of the exam
  • Terraform modules10% of the exam
  • Terraform state management12% of the exam
  • Maintain infrastructure with Terraform8% of the exam
  • HCP Terraform10% of the exam

Every exam and the readiness check follow these weights.

Full exams

  • Practice Exam 1

    57 questions · 60 min

    Included in Premium
  • Practice Exam 2

    57 questions · 60 min

    Included in Premium

5 free Terraform Associate (004) sample questions

The same style and difficulty as the full exams. Try each one, then check the answer.

Sample question 1Terraform configurationChoose 2

Which TWO collection types can be passed to a resource's for_each meta-argument? (Choose two.)

  1. A.

    A list of strings, directly

  2. B.

    A map

  3. C.

    A set of strings

  4. D.

    A number

  5. E.

    A single string

Show answer and explanation

Answer: B and C

for_each accepts a map or a set of strings. To use a list you must convert it, for example with toset().

  • A list of strings, directly: A list must be converted to a set first.
  • A number: Numbers are used with count.
  • A single string: for_each needs a collection.
Sample question 2Terraform fundamentals

A CI job must never wait for interactive input when running Terraform commands. Which option makes Terraform fail instead of prompting for missing input?

  1. A.

    -input=false

  2. B.

    -lock=false

  3. C.

    -refresh=false

  4. D.

    -compact-warnings

Show answer and explanation

Answer: A

-input=false disables prompts so missing variables cause an error and the pipeline does not hang.

  • -lock=false: This disables state locking and does not affect prompts.
  • -refresh=false: This skips refreshing state.
  • -compact-warnings: It shortens warning output only.
Sample question 3Core Terraform workflowChoose 2

Which TWO actions does terraform init perform in a new working directory? (Choose two.)

  1. A.

    Initialises the configured backend.

  2. B.

    Creates the infrastructure described in the configuration.

  3. C.

    Formats the files in canonical style.

  4. D.

    Destroys resources that are missing from the configuration.

  5. E.

    Downloads the required providers and child modules.

Show answer and explanation

Answer: A and E

terraform init prepares the directory by configuring the backend and installing providers and modules.

  • Creates the infrastructure described in the configuration.: Creating resources is done by apply.
  • Formats the files in canonical style.: Formatting is done by terraform fmt.
  • Destroys resources that are missing from the configuration.: Changes to infrastructure happen during apply.
Sample question 4Terraform state managementChoose 2

Which TWO are standard backends that Terraform can use to store state remotely? (Choose two.)

  1. A.

    s3

  2. B.

    ftp

  3. C.

    github

  4. D.

    dropbox

  5. E.

    azurerm

Show answer and explanation

Answer: A and E

Terraform supports backends such as s3, azurerm, gcs, consul, pg, http and the HCP Terraform cloud integration.

  • ftp: There is no FTP backend.
  • github: Git hosting is not a state backend.
  • dropbox: There is no Dropbox backend.
Sample question 5Terraform modulesChoose 2

Which TWO arguments can be used on a module block? (Choose two.)

  1. A.

    for_each

  2. B.

    lifecycle

  3. C.

    depends_on

  4. D.

    provisioner

  5. E.

    ignore_changes

Show answer and explanation

Answer: A and C

Module blocks support the meta-arguments count, for_each, providers, depends_on (and version for registry sources).

  • lifecycle: The lifecycle block is for resources.
  • provisioner: Provisioners are defined in resources.
  • ignore_changes: It exists only inside a resource lifecycle block.

Questions

Is the Terraform Associate (004) readiness check really free?

Yes. Sign up free and take a 15-question, 20-minute check drawn from every exam domain. You get your readiness score, a score per domain and three questions explained. You can retake it every 7 days.

What do I get with Premium?

All 2 full-length Terraform Associate (004) exams (57 questions, 60 minutes each) with every answer explained, an AI tutor that explains your mistakes, and a study plan after every exam. Premium also includes every other certification mock test and our career tools.

Are these real exam questions?

No. They are original practice questions written from the official exam guide and its domain weights. They are never copied from the real exam.

How is my score worked out?

A question counts only if you pick exactly the right options. Your percentage is compared with a 70% pass mark, and each domain is scored separately so you know what to study next.

Independent practice material written from the official exam guide. Not affiliated with or endorsed by the exam provider.