
HashiCorp Certified: Terraform Associate (004) is the entry-level Terraform certification and one of the most requested skills in DevOps and cloud job posts in India. It checks that you can write Terraform configuration, run the core workflow, manage state and modules, and use HCP Terraform. Version 004 tests Terraform 1.12 and adds new objectives on resource dependencies, custom conditions (validation, preconditions and postconditions), handling sensitive data with Vault, and HCP Terraform projects.
This guide follows HashiCorp's official exam page and the 004 review guide: exam facts, all eight objectives, what changed from 003, the commands and code you must know, a 3-week plan and 15 original practice questions.
Quick facts (HashiCorp, November 2026)
| Item | Detail |
|---|---|
| Exam | Terraform Associate (004) |
| Format | Online proctored, multiple choice |
| Duration | 1 hour |
| Product version | Terraform 1.12, including HCP Terraform |
| Price | US$70.50 plus local taxes and fees; no free retake |
| Validity | 2 years |
| Language | English |
| Prerequisites | None formally; basic terminal skills and an understanding of on-premises and cloud architecture |
Read the official Terraform Associate exam page and the 004 review guide before you book.
The eight exam objectives
| # | Objective | What it covers |
|---|---|---|
| 1 | Infrastructure as Code (IaC) with Terraform | What IaC is, its advantages, multi-cloud, hybrid and service-agnostic workflows |
| 2 | Terraform fundamentals | Installing and versioning providers, how providers work, multiple providers, how state is used |
| 3 | Core Terraform workflow | init, validate, plan, apply, destroy, fmt |
| 4 | Terraform configuration | resource vs data blocks, references, variables and outputs, complex types, expressions and functions, dependencies, custom conditions, sensitive data and Vault |
| 5 | Terraform modules | Module sources, variable scope, using modules, module versions |
| 6 | Terraform state management | Local backend, state locking, remote state with the backend block, drift |
| 7 | Maintain infrastructure with Terraform | Importing existing infrastructure, inspecting state with the CLI, verbose logging |
| 8 | HCP Terraform | Creating infrastructure, collaboration and governance, workspaces and projects, HCP Terraform integration |
HashiCorp does not publish weights per objective, so cover all eight evenly.
What is new in 004 compared with 003
- 4f Define resource dependencies: implicit dependencies through references, and
depends_onwhen Terraform can't see the link. - 4g Custom conditions:
validationblocks on variables,preconditionandpostconditionin lifecycle blocks, andcheckblocks. - 4h Sensitive data and Vault:
sensitive = true, why secrets still land in state, and reading secrets from Vault instead of hard-coding them. - 8c Workspaces and projects in HCP Terraform.
- The product version moves to Terraform 1.12.
Code you must be able to read
terraform {
required_version = ">= 1.12"
required_providers {
aws = { source = "hashicorp/aws", version = "~> 5.0" }
}
backend "s3" {
bucket = "example-tf-state"
key = "app/terraform.tfstate"
region = "ap-south-1"
}
}
variable "env" {
type = string
validation {
condition = contains(["dev", "prod"], var.env)
error_message = "env must be dev or prod."
}
}
data "aws_ami" "linux" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["al2023-ami-*-x86_64"]
}
}
resource "aws_instance" "web" {
ami = data.aws_ami.linux.id # implicit dependency
instance_type = var.env == "prod" ? "t3.medium" : "t3.micro"
tags = { Name = "web-${var.env}" }
lifecycle {
postcondition {
condition = self.public_ip != ""
error_message = "The instance needs a public IP."
}
}
}
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "~> 5.0"
name = "app-${var.env}"
cidr = "10.0.0.0/16"
}
output "web_ip" {
value = aws_instance.web.public_ip
}
Commands to know
terraform init # download providers and modules, configure the backend
terraform init -upgrade # pick newer provider versions allowed by constraints
terraform fmt -recursive # format files
terraform validate # check syntax and internal consistency
terraform plan -out=tfplan # save a plan
terraform apply tfplan # apply exactly that plan
terraform destroy # remove managed infrastructure
terraform state list # list resources in state
terraform state show aws_instance.web
terraform import aws_instance.web i-0abc123 # or an import block in config
terraform output web_ip
terraform login # authenticate to HCP Terraform
TF_LOG=DEBUG terraform plan # verbose logging (TF_LOG_PATH writes it to a file)
Also know the import, moved and removed blocks, -replace on plan and apply, and that terraform.lock.hcl records provider versions and should be committed.
3-week study plan
| Week | Focus | Lab |
|---|---|---|
| 1 | Objectives 1–3: IaC, providers, state basics, the core workflow | Create an S3 bucket or a local_file resource; run init, fmt, validate, plan, apply and destroy |
| 2 | Objectives 4–5: variables, outputs, complex types, for_each and count, functions, dependencies, custom conditions, modules | Build a small VPC and EC2 with a registry module; add a validation rule and a postcondition |
| 3 | Objectives 6–8: remote state and locking, drift, import, state commands, logging, HCP Terraform workspaces, projects and VCS runs; review | Move state to a remote backend; import a resource made by hand; connect a repo to an HCP Terraform workspace; book the exam |
15 practice questions with answers
These are original questions written for this guide, not exam questions.
1. Which command downloads providers and configures the backend?
terraform init.
2. What is the difference between a resource block and a data block?
A resource block creates and manages an object; a data block only reads an existing object.
3. Which file records the exact provider versions selected?
.terraform.lock.hcl. Commit it to version control.
4. What does the version constraint "~> 5.0" allow?
Any 5.x version from 5.0 upwards, but not 6.0.
5. Two resources have no reference between them, but one must be created first. What do you use?
depends_on.
6. Where do you check that a variable only accepts "dev" or "prod"?
A validation block inside the variable.
7. Does sensitive = true keep a value out of the state file?
No. It hides the value in CLI output; the state still contains it, so protect the state and use a secrets manager such as Vault.
8. What does state locking prevent?
Two runs writing the same state at the same time and corrupting it.
9. Someone changed a resource by hand in the console. How does Terraform show it?
The next plan detects the drift and proposes changes to match the configuration.
10. How do you bring an existing resource under Terraform management?
An import block in configuration (or terraform import), then a matching resource block.
11. Which command shows the attributes of one resource in state?
terraform state show <address>.
12. How do you turn on detailed logs?
Set the TF_LOG environment variable (for example DEBUG or TRACE), and TF_LOG_PATH to write them to a file.
13. Which is better for creating several similar resources from a map: count or for_each?
for_each, because each instance is keyed by name and removing one doesn't shift the others.
14. Where does a module get its input values?
From arguments in the module block; a module cannot read the caller's variables directly.
15. In HCP Terraform, what groups related workspaces for access and organisation?
Projects.
After Terraform Associate
- Learn secrets management with the Vault Associate (003) guide.
- Pair it with a cloud certification: AWS DevOps Engineer Professional, AZ-400 or Google Cloud DevOps Engineer.
- Prepare for interviews with 50 Terraform interview questions.
- Learn it hands-on in our Terraform course and DevOps course; see live DevOps and cloud jobs.
Cloud Soft Solutions in Ameerpet, Hyderabad teaches Terraform, multi-cloud DevOps and Kubernetes with real-time projects. See the APEX program and all courses.
📞 Call +91 96660 19191 · WhatsApp · Flat No. 513, 5th Floor, Nilagiri Block, Aditya Enclave, Ameerpet, Hyderabad
Frequently Asked Questions
What is the current Terraform Associate exam?
HashiCorp Certified: Terraform Associate (004), which tests Terraform 1.12 and HCP Terraform.
How long is the Terraform Associate exam?
1 hour, multiple choice, online proctored.
How much does Terraform Associate cost?
US$70.50 plus local taxes and fees. A free retake is not included.
How long is Terraform Associate valid?
2 years.
What is new in Terraform Associate 004?
Resource dependencies, custom conditions, sensitive data and Vault, and HCP Terraform workspaces and projects.
Is Terraform Associate good for freshers?
Yes. There are no formal prerequisites; basic terminal and cloud knowledge plus hands-on practice is enough to start.



