To prepare for the HashiCorp Certified: Terraform Associate (003) exam:
- Pair one full Terraform course with a large practice-question set.
- Do hands-on work in a real terminal.
- Book the exam date up front so you have a deadline you can’t wriggle out of.
That’s exactly how I passed it on April 27, 2025. It’s a one-hour exam, and I finished in about 40 minutes, reviewed a few flagged questions, and submitted with confidence. 🚀
Below you’ll find the exam basics, the resources I used, and my full set of study notes. They’re the things I actually got wrong or had to look up twice.
Terraform Associate 003 at a glance
| Exam | HashiCorp Certified: Terraform Associate (003) |
| Cost | $70.50 USD (as of April 2025; check HashiCorp for current pricing and taxes) |
| Duration | 1 hour |
| Number of questions | 57 in my sitting |
| Question types | Multiple choice (single answer), multiple choice (multiple answers), true/false, fill in the blank |
| Level | Associate (entry level) |
HashiCorp publishes sample questions and the full exam objectives on its official Terraform Associate certification page. Read those first.
Note: HashiCorp revises its exam versions over time. This post reflects the 003 exam as of April 2025. Check the official page to confirm which version is current before you book.
Is the Terraform Associate certification worth it?
In short: yes, if you work with cloud infrastructure.
Terraform is one of the most widely used Infrastructure as Code (IaC) tools. The certification shows you understand more than the basic commands. It covers the right way to manage infrastructure with modules, state, workspaces and remote backends. That’s a real plus for DevOps engineers, cloud engineers and platform architects.
It’s also a sensible stepping stone. The Terraform Professional-level exam is a longer, hands-on lab exam, and it’s considerably more challenging.
How I prepared
1. I booked the exam before I started studying
I booked the exam on purpose, well before I started serious preparation, to create a real, no-turning-back deadline.
From then on I squeezed in study time almost every day:
- working through courses
- doing hands-on practice
- writing up what I learned on this blog
Lesson: a real goal date works. It forces you to move.
2. The resources I used
- 🎯 The official exam page and objectives from HashiCorp. Start here so you know what’s actually tested.
- 🎯 Zeal Vora’s all-in-one course for learning Terraform and preparing for the Terraform Associate (003).
- 🎯 Bryan Krausen’s “The Original Terraform Associate 003 Prep” practice-question course, with explanations for each answer.
3. I kept an error notebook
Every question I got wrong or guessed went into a notebook, with the correct answer and the reason. That notebook became the notes below.
My Terraform Associate notes and takeaways
Here’s my brain-dump: practical and exam-focused. Even if the Associate feels like a beginner-level exam, read through every point. Most of these will matter in day-to-day Terraform work too, not just in the exam.
Workflow and CLI
terraform planis not required beforeterraform apply.applybuilds its own plan and asks you to approve it.terraform init, then straight toterraform applyon a new configuration: Terraform plans the changes, asks for approval, creates the resources and writes a new state file.terraform init -upgradechecks for and downloads the newest provider and module versions allowed by your configuration’s version constraints.- Plain
terraform initdoes not upgrade. If you remove theversionargument from a module block and runterraform initwithout-upgrade, Terraform keeps using the version it already downloaded and cached locally. To get a newer version, use-upgrade. terraform consolealso locks the state file!- VCS connections: the Terraform Community CLI does not natively connect to a version control system (VCS). You pull and push yourself. HCP Terraform (formerly Terraform Cloud) and Terraform Enterprise do support VCS connections.
State
- Sensitive values in state: true or false? Any sensitive values referenced in your Terraform code, even as variables, end up in plain text in the state file. TRUE! Protect your state accordingly.
- State locking: if the backend storing your state does not support locking, two
terraform applyruns at the same time can corrupt the state file. - Why state exists: performance is one purpose of state. The others are:
- mapping your configuration to real-world resources
- tracking metadata such as dependencies
- keeping a team in sync
- The “golden rule” of mismatches. Yes, I gave it that name ^^
| Mismatch | Terraform’s reaction |
|---|---|
| In config, missing from state | Plans to create it |
| In state, missing from config | Plans to destroy it |
Workspaces and HCP Terraform
- Separate state per workspace: true or false? In both Terraform Community and HCP Terraform, workspaces provide similar functionality of a separate state file for each workspace. Answer: True.
- Repositories: true or false? Community workspaces generally share the same code repository, while HCP Terraform/Enterprise workspaces are often mapped to different repositories. Answer: True.
- In Community, workspaces typically share one repository and manage several environments from it.
- In HCP Terraform/Enterprise, workspaces are often tied to separate repositories for better isolation between projects or teams.
- HCP Terraform agents execute plans and applies on infrastructure you control, such as a private network that HCP Terraform can’t reach directly.
IaC basics (yes, these show up)
- GUI vs config files: true or false? IaC tools let you manage infrastructure with configuration files rather than through a graphical user interface. Answer: True.
- Primary use of IaC: the ability to programmatically deploy and configure resources.
Providers
- A
providerblock is not mandatory. Terraform can detect required providers from the resources in your configuration and use their default settings. - Provider settings live in the
providerblock, including region and credentials. In real projects, supply credentials through environment variables or a secrets store rather than hard-coding them in.tffiles. - Aliases: to use the same provider with different settings, give the second configuration an
aliasand reference it from the resource:
provider "google" { region = "us-central1"}
provider "google" { alias = "europe" region = "europe-west1"}
resource "google_storage_bucket" "backup" { provider = google.europe # use the aliased provider name = "example-backup-bucket" location = "EU"}The terraform block
These settings belong inside the terraform block. None of them can go in a provider block.
required_versionconstrains the Terraform CLI version.required_providersconstrains one or more provider versions.
terraform { required_version = ">= 1.5.0"
required_providers { google = { source = "hashicorp/google" version = "~> 5.0" } azurerm = { source = "hashicorp/azurerm" version = "2.90.0" } }}- The backend must be defined inside the
terraformblock, never inside a provider block or at the top level:
terraform { backend "remote" { hostname = "app.terraform.io" organization = "example-org"
workspaces { name = "example-prod" } }}Newer configurations that connect to HCP Terraform usually use the cloud block instead of backend "remote". Recognise both.
Variables and types
- Object vs map: an
objecttype can set a different type for each attribute. In amap, every value must be the same type.
variable "tags" { type = map(string) # every value must be a string}
variable "server" { type = object({ name = string size = number # each attribute has its own type })}- Locals are defined with
locals(plural) and referenced withlocal.<name>(singular).
Refactoring: moved and import blocks
movedblock: tells Terraform a resource has changed address without touching the real infrastructure. Use it to rename or restructure resources and modules safely.
moved { from = local_file.old_name to = local_file.new_name}It tells Terraform:
The old resource now lives at this new address. Don’t destroy and recreate it.
importblock (since Terraform 1.5).- Old way: run
terraform importmanually for each resource.
- Old way: run
terraform import <resource_type>.<resource_name> <real-world-id>- New way: declare imports in your code, next to the resource they map to.
import { id = "<real-world-id>" to = <resource_type>.<resource_name>}Terraform imports the existing object with that ID and maps it to the resource declared in your .tf file.
Modules: source formats
# Private registry: <hostname>/<namespace>/<name>/<provider>module "network" { source = "registry.example.com/devops-team/network/azurerm" version = "1.0.3"}
# Public Terraform Registry: <namespace>/<name>/<provider>module "example" { source = "<namespace>/<name>/<provider>" version = "<version>"}for_each: referencing values
This example is provider-neutral, so you can run it locally:
variable "env" { type = map(any) default = { prod = { ip = "10.0.150.0/24" region = "us-central1" } dev = { ip = "10.0.250.0/24" region = "europe-west1" } }}
resource "local_file" "env_config" { for_each = var.env filename = "${path.module}/${each.key}.txt" content = "ip=${each.value.ip} region=${each.value.region}"}| Keyword | Meaning |
|---|---|
each.key | The map key (prod or dev) |
each.value | The full object for that key |
each.value.ip | The IP range for that environment |
each.value.region | The region for that environment |
Reference formats cheat sheet
| Source | Reference format | Example |
|---|---|---|
| Variable | var.<variable_name> | var.region |
| Local | local.<local_name> | local.default_tags |
| Data source | data.<type>.<name>.<attribute> | data.local_file.config.content |
| Module output | module.<module_name>.<output_name> | module.network.subnet_id |
| Resource attribute | <type>.<name>.<attribute> | random_pet.server.id |
| Built-in function | <function>(<arguments>) | cidrsubnet(var.vpc_cidr, 8, 1) |
self | self.<attribute> (only inside provisioner and connection blocks) | self.public_ip |
What’s next
Passing the Terraform Associate (003) wasn’t brutal. It took focused practice, a real deadline and hands-on time in the terminal.
Next stop for me is the CKA (Certified Kubernetes Administrator). After that, I may come back for the Terraform Professional-level exam. For now, it’s Kubernetes grind time. 🚀
If you’re still building your Terraform foundations, my earlier Terraform posts are a good companion to these notes. That includes Terraform Meta Arguments Unlocked: Practical Patterns for Clean Infrastructure Code.
FAQ
How much does the Terraform Associate 003 exam cost? It was $70.50 USD when I took it in April 2025. Check HashiCorp’s certification page for the current price and any local taxes.
How long is the exam, and how many questions are there? The exam is one hour. My sitting had 57 questions, and I finished in about 40 minutes with time left to review flagged ones.
Is the Terraform Associate exam hard?
It’s an associate-level exam. If you’ve done hands-on Terraform work and drilled practice questions, it’s very manageable. The trickiest questions are on state, workspaces, init behaviour and the terraform block.
What’s the best way to prepare? Follow these steps:
- Read the official exam objectives.
- Take one full course.
- Work through a large practice-question set.
- Keep an error notebook.
- Practise every command in a real terminal.
- Book your exam date early so you have a deadline.
Is 003 still the current version of the exam? This post reflects the 003 exam as of April 2025. HashiCorp updates its exams, so confirm the current version on the official certification page before booking.
Thanks for reading! Questions or corrections? Reach out via the contact page.