
Terraform Infrastructure Engineer Professional (002) is HashiCorp's professional-level Terraform certification. It comes after the Terraform Associate and is for engineers who already run Terraform in production. It tests whether you can design configurations that scale, manage state and drift, run Terraform safely in CI/CD, handle secrets and policy, build and test modules, and operate HCP Terraform or Terraform Enterprise. Unlike HashiCorp's lab-based "Advanced" exam, this one is multiple choice. That makes it a good next step for DevOps and cloud engineers with one or two years of real Terraform work.
This guide follows HashiCorp's official certification page. It covers the exam facts, the seven objective areas in our own words, production patterns with code, a 6-week plan and 15 original practice questions.
Quick facts (HashiCorp, November 2026)
| Item | Detail |
|---|---|
| Exam | Terraform Infrastructure Engineer Professional (002) |
| Format | Online proctored, multiple choice and multiple answer |
| Duration | 90 minutes |
| Terraform version | 1.15 |
| Price | US$200 plus local taxes; no free retake |
| Validity | 2 years |
| Language | English |
| Recommended | Terraform Associate (or equivalent experience), production Terraform experience, terminal skills, cloud and on-premises architecture knowledge |
Read the official exam page, the learning path and the sample questions.
The seven objective areas
| Area | What it covers (summarised) |
|---|---|
| 1. Scalable configuration design | Turning requirements into code; predictable, secure configurations; debugging variables, locals and outputs; tracing for_each resources; predicting function results; provider configuration; using the Terraform MCP server with AI coding agents |
| 2. State and backends | Remote backends and remote state; managing state and fixing drift; checking dependencies before upgrades; upgrading Terraform across environments; inspecting state |
| 3. Infrastructure lifecycle | Organising and scaling projects; plan and apply; importing existing resources; lifecycle rules; multiple environments; troubleshooting; inputs and outputs; provider and module version constraints |
| 4. CI/CD and automation | Running Terraform in pipelines; deployment strategies; dynamic provider credentials across teams and workspaces; overriding variables with tfvars files |
| 5. Security and governance | Secrets best practices; rotating secrets with a secrets manager; securing pipeline identities; organisation-wide and team policies; spotting risky changes in a plan |
| 6. Modules and registry | When to refactor into modules; module inputs and outputs as a contract; using public and private registries; testing modules with terraform test |
| 7. HCP Terraform and Enterprise | Operating workspaces and projects; tracking resource usage and cost; multi-environment setups; upgrading Terraform across workspaces; policy as code in CI/CD |
HashiCorp publishes the exact sub-objectives on the exam page. The table above summarises them, so read the official list before you book.
Production patterns with code
Remote state with locking (S3 backend):
terraform {
required_version = "~> 1.15"
required_providers {
aws = { source = "hashicorp/aws", version = "~> 6.0" }
}
backend "s3" {
bucket = "acme-tf-state"
key = "network/prod/terraform.tfstate"
region = "ap-south-1"
use_lockfile = true # S3-native state locking
encrypt = true
}
}
Stable keys with for_each, plus import and moved blocks:
variable "subnets" {
type = map(object({ cidr = string, az = string }))
}
resource "aws_subnet" "this" {
for_each = var.subnets # keys stay stable when items are added
vpc_id = aws_vpc.main.id
cidr_block = each.value.cidr
availability_zone = each.value.az
tags = { Name = each.key }
}
import { # adopt an existing resource
to = aws_s3_bucket.logs
id = "acme-prod-logs"
}
moved { # rename without destroy/create
from = aws_instance.web
to = module.web.aws_instance.this
}
Safe lifecycle and validation:
resource "aws_db_instance" "main" {
# ...
lifecycle {
prevent_destroy = true
ignore_changes = [password] # rotated by a secrets manager
}
}
variable "env" {
type = string
validation {
condition = contains(["dev", "stage", "prod"], var.env)
error_message = "env must be dev, stage or prod."
}
}
Pipeline commands:
terraform fmt -check -recursive
terraform init -input=false
terraform validate
terraform test # module tests (*.tftest.hcl)
terraform plan -out=tfplan -var-file=prod.tfvars
terraform show -json tfplan > plan.json # feed to policy checks
terraform apply tfplan # apply exactly what was reviewed
terraform plan -refresh-only # detect drift without changing anything
Use short-lived credentials in pipelines, through OIDC workload identity or HCP Terraform dynamic provider credentials. Don't store long-lived cloud keys as CI variables.
6-week study plan
| Week | Focus | Lab |
|---|---|---|
| 1 | Associate refresh; expressions, functions, for_each vs count, dynamic blocks, validation, provider aliases | Build a multi-AZ VPC driven entirely by a map variable |
| 2 | State: remote backends, locking, state list/show/mv/rm, import, moved and removed blocks, drift, version upgrades | Import a hand-made bucket; refactor resources into a module with moved blocks |
| 3 | Lifecycle and environments: workspaces vs directories, tfvars, lifecycle rules, troubleshooting with TF_LOG | Deploy dev and prod from one codebase with separate state |
| 4 | CI/CD: plan on pull request, apply on merge, saved plans, OIDC credentials, deployment strategies | Build a GitHub Actions pipeline with OIDC to a cloud sandbox |
| 5 | Security and governance: secrets, sensitive values, policy as code (Sentinel or OPA), risky-change review; modules and terraform test | Write a policy that blocks public buckets; add tests to your module |
| 6 | HCP Terraform: projects, workspaces, variable sets, run tasks, cost and usage; Terraform MCP server; sample questions | Move one workspace to HCP Terraform's free tier; book the exam |
Destroy your lab resources after each session and set a billing alert on your cloud account.
15 practice questions with answers
These are original questions written for this guide, not exam questions.
1. Why prefer for_each with a map over count for a list of subnets?
Resources are keyed by name, so removing one item doesn't shift the indexes and force others to be replaced.
2. Which block adopts an existing cloud resource into state as part of plan and apply?
An import block.
3. You renamed a resource address. How do you avoid destroy and recreate?
Add a moved block from the old address to the new one.
4. Which command shows drift without changing infrastructure?terraform plan -refresh-only.
5. Why save a plan with -out in CI?
So apply runs exactly the plan that was reviewed and approved.
6. What prevents two pipelines from writing the same state at once?
State locking in the backend.
7. Which lifecycle argument stops a production database from being destroyed?prevent_destroy = true.
8. A password is rotated outside Terraform. How do you stop Terraform reverting it?
Add it to ignore_changes (and better, read it from a secrets manager).
9. What is the safest way to give a pipeline cloud credentials?
Short-lived credentials through OIDC or dynamic provider credentials, not static keys.
10. Does marking an output sensitive keep it out of state?
No. It only hides the value in CLI output; the state still contains it, so protect the state.
11. Which command runs module tests written in .tftest.hcl files?terraform test.
12. What does version = "~> 6.0" allow?
Any 6.x version from 6.0 upwards, but not 7.0.
13. Where do you enforce "no public storage buckets" before apply?
Policy as code (Sentinel or OPA) in HCP Terraform or the CI pipeline.
14. How do you share common variables across many HCP Terraform workspaces?
Variable sets.
15. When should you split a configuration into modules?
When a group of resources is reused, owned by a different team, or needs a clear interface and its own tests.
Before and after the Professional exam
- Pass the Terraform Associate (004) first, and practise with our 50 Terraform interview questions.
- Add secrets management with Vault Associate and pipelines with GitHub Actions (GH-200).
- Learn it hands-on in our Terraform course and AWS DevOps course; see live DevOps and cloud jobs.
Cloud Soft Solutions in Ameerpet, Hyderabad teaches Terraform, multi-cloud DevOps and platform engineering 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 Terraform Infrastructure Engineer Professional exam?
HashiCorp's professional-level, multiple-choice Terraform certification (002) for engineers who run Terraform in production.
How long is the exam and what does it cost?
90 minutes and US$200 plus local taxes, with no free retake.
Which Terraform version does it test?
Terraform 1.15.
Do I need the Terraform Associate first?
HashiCorp strongly recommends the Associate or equivalent experience, plus production Terraform experience.
How is it different from Terraform Authoring and Operations Advanced?
The Professional exam is multiple choice; the Advanced exam is a hands-on lab exam.
How long is the certification valid?
2 years.



