Complete guide to passing the Terraform Associate (004) exam in 2026
Exam tips
HashiCorp
🇪🇸 Leer en español

Complete guide to passing the Terraform Associate (004) exam in 2026

A study plan, free resources, the commands you need to master, and the topics where people fail the most. Everything you need to pass the Terraform Associate on your first attempt.

7 min readApril 15, 2026

The Terraform Associate is one of the certifications with the best price-to-value ratio on the cloud market: USD 70.50, in high demand, and vendor-neutral. This guide is updated for version 004 of the exam, which replaced 003. With 4–6 weeks of focused preparation, it's entirely possible to pass it on your first attempt.

This guide gives you the complete plan.

What the exam assesses (domain summary)

The exam has 57 multiple-choice questions in 60 minutes, and the result is pass/fail: HashiCorp doesn't publish a scaled score or the weight of each domain. The version 004 domains are:

DomainMain content
IaC and Terraform's purposeBenefits of IaC, Terraform vs other tools, multi-cloud
Core workflowinit, plan, apply, destroy
Providers and configurationHCL, providers, resources, data sources
Variables, outputs, and expressionsVariables, outputs, functions, sensitive and ephemeral values
ModulesPublic and custom modules, versioning
State managementRemote backends, locking, import, drift
Advanced CLI and HCP TerraformAdvanced commands, remote workspaces, Sentinel policies

State and HCP Terraform are the topics that confuse candidates the most, especially those who have only used Terraform locally.

Real prerequisites

Before you start preparing, make sure you have:

  • ▸A basic grasp of one cloud provider: at least knowing what a VPC, a VM, and an S3 bucket (or their Azure/GCP equivalents) are. Without that context, Terraform has no practical meaning.
  • ▸Basic command line skills: Terraform is used from the terminal. You should be comfortable with basic bash/PowerShell commands.
  • ▸A free AWS or Azure account: you need to practice creating real resources with Terraform.

5-week study plan

Week 1 — What is IaC and what is Terraform for?

Goals:

  • ▸Understand what problem Infrastructure as Code solves
  • ▸Install Terraform on your machine
  • ▸Run your first terraform init, plan, and apply
  • ▸Create a simple resource (a storage bucket or a resource group)

Main resource: HashiCorp's official documentation — developer.hashicorp.com/terraform

HashiCorp's tutorials are free and very well structured. Start with the "Get Started" tutorial for AWS or Azure, depending on your preference.

Week 2 — HCL: Terraform's language

This is the most technical week and the most important one for the exam.

Topics to cover:

  • ▸Block types: resource, variable, output, locals, data
  • ▸Data types: string, number, bool, list, map, object
  • ▸sensitive and ephemeral values: how to keep secrets from being exposed in the output or in the state
  • ▸References between resources: resource.type.name.attribute
  • ▸Common functions: length(), tostring(), lookup(), merge()
  • ▸Conditionals and count vs for_each
  • ▸.tfvars files for passing variables

Practice: build an infrastructure of 3–4 interconnected resources using variables and outputs.

💡 The exam tests your understanding of count vs for_each a lot. The key difference: count creates N identical copies, while for_each lets you iterate over a map with a different configuration for each instance.

Week 3 — CLI and workflow

Commands you need to master for the exam:

CommandWhat it does
terraform initInitializes the directory, downloads providers and modules
terraform planShows what changes would be made without applying them
terraform applyApplies the changes to the real infrastructure
terraform destroyRemoves all the infrastructure in the state
terraform fmtFormats HCL code automatically
terraform validateChecks whether the code is syntactically valid
terraform outputShows the outputs defined in the code
terraform state listLists all resources in the state file
terraform importImports an existing resource into the state (there's also the declarative import block)
terraform workspaceManages workspaces (separate environments)
terraform plan -refresh-onlyShows the drift between the state and the real infrastructure without proposing configuration changes

Week 4 — State and remote backends

The state file is the topic that most confuses candidates without real production experience with Terraform.

What you need to understand:

  • ▸What terraform.tfstate is and why it exists (it's the map between your code and the real resources)
  • ▸Why local state is a problem on teams (two people can overwrite each other)
  • ▸Remote backends: S3 (AWS), Azure Blob Storage, HCP Terraform
  • ▸State locking: prevents two apply runs from happening at the same time. On S3, locking is now native (use_lockfile = true); locking with a DynamoDB table is deprecated. On Azure Blob Storage, the lock uses blob leases
  • ▸State commands: terraform state list, terraform state show, terraform state mv, terraform state rm
  • ▸terraform plan -refresh-only and terraform apply -refresh-only: they replace the old terraform refresh (deprecated) for reconciling the state with reality

Classic exam question: what happens if someone manually deletes a resource in the AWS console without using Terraform? The state still believes it exists — that's drift. terraform plan detects it and proposes recreating it; terraform plan -refresh-only shows you the drift without proposing configuration changes.

Week 5 — Modules, providers, HCP Terraform, and practice exams

Modules:

  • ▸What a module is and why they're used (code reuse)
  • ▸Terraform Registry modules (official public modules)
  • ▸The basic structure of a module: main.tf, variables.tf, outputs.tf
  • ▸How to reference a module from your code: source, version

Providers:

  • ▸What a provider is and how it's configured
  • ▸Provider versioning: why pinning versions matters
  • ▸Multiple providers in the same project (multi-cloud)
  • ▸The .terraform.lock.hcl dependency lock file

HCP Terraform:

  • ▸What HCP Terraform (formerly Terraform Cloud) is and what it adds: remote state, remote runs, workspaces, and a private module registry
  • ▸Policy as code with Sentinel

Practice exams:

  • ▸Take at least 3 full 57-question practice exams
  • ▸Goal: consistent scores of 80% or more before booking the real exam. Since HashiCorp doesn't publish the cut score, that margin protects you

The most common mistakes on the exam

1. Confusing terraform validate with terraform plan validate only checks syntax — it doesn't know whether the values are valid for the provider. plan does run a full check against the provider's API.

2. Not understanding a resource's lifecycle The lifecycle block lets you control behaviors like create_before_destroy, prevent_destroy, and ignore_changes. To force a resource to be recreated, the current way is terraform apply -replace, which replaces the old terraform taint. The exam asks about these scenarios.

3. Workspaces vs modules Workspaces = multiple state instances for the same configuration (dev, staging, prod). Modules = reusable code. They're different things with different purposes. Note: CLI workspaces and HCP Terraform workspaces aren't exactly the same, and the exam may ask about the difference.

4. Sensitive data in the state The terraform.tfstate file can contain sensitive information (passwords, keys). It should always be stored in a remote backend with encryption and restricted access, not in Git. Ephemeral values help keep certain secrets from ever reaching the state.

Free resources to prepare

Simulate the real exam before booking Brains4Cloud has Terraform Associate (004) practice exams with questions in the format and difficulty of the real exam, plus the complete guide and the Deep Dive covering state management and HCP Terraform. Create your free account and find out which domains you need to reinforce before spending money on the exam.

#Terraform Associate#Terraform 004#terraform guide#how to pass terraform associate#HashiCorp certification#IaC certification 2026
Ready to practice?

Put what you learned to the test

Original practice exams with detailed explanations. No brain dumps.