Terraform Associate: 495 practice exam questions
7-day money-back guarantee — full refund within 7 days of purchase if you've completed under 20% of the questions. See pricing →
Certifications Tools Flashcards Career Paths Exam Guides Blog Pricing For Teams About

Language

✓ EnglishDeutschEspañolFrançaisPortuguês
Check readiness — free →

Terraform Associate practice exam: 495 questions with full explanations

7 domains 495 questions 60 min exam
Questions on the exam
about 57 — vendor indicates, no fixed count published
Time allowed
60 minutes format →
Exam fee
$70.5 — vendor, checked September 4, 2026 detail →

495 practice exam questions for HashiCorp Certified Terraform Associate, grouped by exam domain. Every question below shows all four options, which one is correct, and why each of the other three is not — the wrong answers are where most candidates lose marks.

Not sure where you stand? Take the free 5-min Terraform Associate readiness check →

Terraform Associate exam format →  ·  Terraform Associate passing score →  · Terraform Associate exam cost →

Questions by domain

Sample questions

terraform init: Which command downloads and installs the required providers?

Understand Terraform Basics Easy
A developer clones a Terraform project from Git and runs `terraform plan`. The command fails because providers are not installed. Which command downloads and installs the required providers?
  1. terraform init
    Correct. terraform init initializes the working directory, downloads the required providers specified in required_providers blocks, and sets up the backend — it must be run before plan or apply.
  2. terraform install
    Incorrect. There is no `terraform install` command — this is a common distractor. terraform init handles installation.
  3. terraform get
    Incorrect. terraform get downloads modules, not providers. Providers are downloaded by terraform init.
  4. terraform providers install
    Incorrect. While `terraform providers` is a valid command for listing/managing providers, `terraform providers install` is not a standard command. terraform init downloads providers.
The trap
terraform get = download modules; terraform init = download providers + initialize backend + download modules

All 197 Understand Terraform Basics questions →

Amazon DynamoDB table with a partition key named LockID: To enable state locking and prevent concurrent applie

Implement and Maintain State Medium
A team configures an S3 backend for Terraform state. To enable state locking and prevent concurrent applies, which additional AWS service must be configured?
  1. Amazon DynamoDB table with a partition key named LockID
    Correct. The S3 backend uses DynamoDB for state locking. A DynamoDB table with a partition key named `LockID` (string type) must be created and referenced in the backend configuration.
  2. An Amazon SQS FIFO queue serializing apply operations
    Incorrect. SQS is not used by the S3 backend for locking. Terraform state locking with the S3 backend uses a DynamoDB table.
  3. S3 bucket versioning, which supplies state locking on its own
    Incorrect. S3 versioning only retains previous state versions for recovery; it does not provide locking. DynamoDB is required to prevent concurrent access.
  4. Amazon ElastiCache providing a distributed advisory lock
    Incorrect. ElastiCache is not integrated with Terraform state locking. The S3 backend relies on DynamoDB for that purpose.
The trap
S3 versioning ≠ state locking; DynamoDB LockID table is required for concurrent apply prevention

All 77 Implement and Maintain State questions →

Local filesystem path: What type of module source is this?

Interact with Terraform Modules Medium
A developer sees the following module source in a Terraform configuration: `source = "./modules/networking"`. What type of module source is this?
  1. Local filesystem path — the module is in a subdirectory relative to the calling configuration
    Correct. Sources beginning with ./ or ../ are local filesystem paths resolved relative to the calling module's directory.
  2. Terraform Registry module referenced with the standard namespace/module/provider address format
    Incorrect. Registry modules use the namespace/module/provider form with no leading ./; the ./ prefix explicitly denotes a local path.
  3. Git repository source where the module is cloned from a remote GitHub repository over SSH
    Incorrect. Git sources start with git:: or github.com/; a leading ./ means the local filesystem, not a clone.
  4. HTTP URL source where the module archive is downloaded from a remote web server endpoint
    Incorrect. HTTP sources start with https://; the ./ prefix indicates a local directory instead.
The trap
version argument only works with Registry modules — local and Git module sources don't support version constraints

All 50 Interact with Terraform Modules questions →

Write -> Init -> Plan -> Apply: What is the correct order of the core Terraform workflow for provisioning new

Use and Apply the Terraform Workflow Easy
What is the correct order of the core Terraform workflow for provisioning new infrastructure?
  1. Write (define config) -> Init (initialize) -> Plan (preview changes) -> Apply (execute changes)
    Correct. The Terraform workflow is: write .tf files, run terraform init to initialize backend and providers, run terraform plan to preview, then terraform apply to execute changes.
  2. Init (initialize) -> Write (define config) -> Apply (execute changes) -> Plan (preview changes)
    Incorrect. Configuration must be written before init, and plan always precedes apply. The correct order is Write, Init, Plan, Apply.
  3. Write (define config) -> Apply (execute changes) -> Plan (preview changes) -> Init (initialize)
    Incorrect. Apply must always be preceded by a plan to review changes, and init must run before either plan or apply.
  4. Plan (preview changes) -> Write (define config) -> Init (initialize) -> Apply (execute changes)
    Incorrect. Planning requires an initialized directory with written configuration; you cannot plan before writing config and running init.
The trap
Init only needed once (or when providers change); ongoing cycle is just Plan → Apply for configuration updates

All 49 Use and Apply the Terraform Workflow questions →

Declarative: Which approach does Terraform use?

Understand Infrastructure as Code (IaC) Concepts Easy
A team currently uses shell scripts to provision servers by running commands step-by-step. They want to switch to an approach where they describe the desired end state of their infrastructure and let the tool figure out how to get there. Which approach does Terraform use?
  1. Declarative
    Correct. Terraform uses a declarative approach — you describe the desired end state in .tf files, and Terraform determines the API calls needed to achieve that state.
  2. Imperative
    Incorrect. Imperative (procedural) IaC specifies step-by-step commands to execute — like shell scripts or Ansible playbooks. Terraform is declarative, not imperative.
  3. Event-driven
    Incorrect. Event-driven refers to architecture patterns where actions are triggered by events — it is not an IaC provisioning model.
  4. Reactive
    Incorrect. Reactive is not a standard IaC paradigm. Terraform's model is declarative.
The trap
Terraform is declarative (what you want); Ansible/scripts are imperative (how to get there) — key conceptual distinction

All 45 Understand Infrastructure as Code (IaC) Concepts questions →

To map Terraform configuration to real-world: What is the PRIMARY purpose of Terraform state (terraform.tfstat

Understand Terraform's Purpose (vs Other IaC) Medium
What is the PRIMARY purpose of Terraform state (terraform.tfstate)?
  1. To define the exact execution order in which Terraform creates each resource during an apply operation run
    Incorrect. Execution order is derived from the dependency graph built out of resource references, not from the state file, which only records existing infrastructure mappings.
  2. To store Terraform provider credentials securely inside an encrypted section of the local working directory
    Incorrect. Credentials are supplied via environment variables, provider configuration, or secrets managers — the state file has no encrypted credential store and is not designed to hold them.
  3. To cache the downloaded Terraform provider binaries so that they remain available for later offline apply runs
    Incorrect. Provider binaries are cached in the .terraform/ directory by terraform init — the state file instead tracks the mapping of configuration to real infrastructure.
  4. To map Terraform configuration to real-world infrastructure so Terraform can determine what changes to make
    Correct. State maps resource definitions in .tf files to actual cloud resource IDs. Without state, Terraform cannot determine what already exists and would try to create everything from scratch.
The trap
State file contains sensitive values in plaintext — never store state in public repositories

All 40 Understand Terraform's Purpose (vs Other IaC) questions →

terraform fmt to rewrite the files to the canonical: Which command accomplishes this?

Use the Terraform CLI (outside of core workflow) Easy
A developer's Terraform code has inconsistent indentation and formatting. They want to automatically fix the style to match the canonical HashiCorp format. Which command accomplishes this?
  1. terraform fmt to rewrite the files to the canonical HashiCorp style
    Correct. terraform fmt rewrites configuration files to HashiCorp's canonical style, fixing indentation, spacing, and alignment automatically.
  2. terraform validate to check configuration syntax and internal consistency
    Incorrect. terraform validate checks syntax and internal consistency but never rewrites files, so it cannot fix indentation or spacing.
  3. terraform lint to flag style and best-practice problems across the code
    Incorrect. There is no terraform lint command; linting is handled by third-party tools like TFLint, while terraform fmt handles canonical formatting.
  4. terraform check to verify the configuration for errors safely
    Incorrect. There is no terraform check command in the core CLI; terraform validate is what checks a configuration for errors.
The trap
terraform fmt = style only; terraform validate = logic/syntax check — fmt doesn't catch configuration errors

All 37 Use the Terraform CLI (outside of core workflow) questions →

4.0.0 and above: Which versions does this constraint allow?

Understand Terraform Basics Medium
A Terraform configuration contains: `version = "~> 4.0"` for the AWS provider. Which versions does this constraint allow?
  1. Any version from 4.0.0 up to 4.0.9 only, restricting upgrades to patch-level releases within 4.0
    Incorrect. A three-part `~> 4.0.0` would restrict to patch versions (4.0.x). With two parts, `~> 4.0` also permits minor increments such as 4.1 and 4.2.
  2. 4.0.0 and above, but NOT 5.0.0 or higher (allows patch and minor increments only within 4.x)
    Correct. The `~>` pessimistic constraint operator allows only rightmost version component to increment. `~> 4.0` allows >=4.0, <5.0 — any 4.x version but not 5.0+.
  3. Exactly version 4.0.0 and nothing else, pinning the provider to that one single immutable release
    Incorrect. Pinning to a single exact version requires `= 4.0.0`. The `~> 4.0` constraint permits any 4.x.x release, not just 4.0.0.
  4. Version 4.0.0 and every version above it, including 5.0.0, 6.0.0, and later major releases
    Incorrect. Allowing all higher versions requires `>= 4.0`. The `~>` operator only lets the rightmost component increment, so 5.0.0 and above are excluded.
The trap
~> 4.0 = >=4.0, <5.0 (minor OK); ~> 4.0.0 = >=4.0.0, <4.1.0 (patch only) — component count matters

All 197 Understand Terraform Basics questions →

Terraform Associate exam: the facts

How many questions are on the Terraform Associate exam?

Around 57. The vendor does not publish a fixed count for Terraform Associate, so this is the figure it indicates rather than a guaranteed number.

How long is the Terraform Associate exam?

60 minutes. Across 57 questions that is about 63 seconds per question.

What topics does the Terraform Associate exam cover?

7 domains: Understand Terraform Basics, Implement and Maintain State, Use the Terraform CLI (outside of core workflow), Interact with Terraform Modules, Use and Apply the Terraform Workflow, Understand Infrastructure as Code (IaC) Concepts, Understand Terraform's Purpose (vs Other IaC). Weights: Understand Terraform Basics 0.32%, Implement and Maintain State 0.16%, Use the Terraform CLI (outside of core workflow) 0.16%, Interact with Terraform Modules 0.12%, Use and Apply the Terraform Workflow 0.08%, Understand Infrastructure as Code (IaC) Concepts 0.08%, Understand Terraform's Purpose (vs Other IaC) 0.08%.

How many Terraform Associate practice exam questions does Certsqill have?

495, spread across 7 exam domains. Every one shows all options, which is correct, and why each of the others is not.

Would you pass Terraform Associate today?

Five minutes, and you get a score per domain — not one number, but which section to open tonight.

Test your Terraform Associate readiness — free
Certsqill Terraform Associate question bank · 495 questions across 7 domains · Every answer, right and wrong, comes with its own explanation.