All HashiCorp exams
Terraform Infrastructure Engineer Professional
What the Terraform Infrastructure Engineer Professional exam covers and what it costs, with a free 30-question practice test and an explanation for every answer.
- Level
- Professional
- Topic areas
- 6
- Free practice questions
- 30
- Full question bank
- 111 questions
What the Terraform Infrastructure Engineer Professional exam covers
The topic areas in our Terraform Infrastructure Engineer Professional question bank, with each one's share of the 111 practice questions.
| Topic | Share | Questions |
|---|---|---|
| Resource Lifecycle | 23% | 25 |
| Security and Policy | 19% | 21 |
| State Management | 16% | 18 |
| Modules | 16% | 18 |
| Providers and Configuration | 14% | 15 |
| Terraform Cloud and Collaboration | 13% | 14 |
Terraform Infrastructure Engineer Professional cost and format
| Certification | Terraform Infrastructure Engineer Professional |
|---|---|
| Vendor | HashiCorp |
| Level | Professional |
| Status | Active |
Last checked October 22, 2026 against the official HashiCorp exam page.
Terraform Infrastructure Engineer Professional sample questions
The first 5 questions from the free practice test. Open a question to see the answer and why it is right.
Question 1Resource Lifecycle
A team changes a resource attribute that the provider can only set at creation. Terraform plans a destroy-and-recreate for a database that holds production data. What should the engineer do FIRST?
- AApply the plan, since Terraform always preserves data during a replacement
- BRemove the resource block from the configuration so that the plan no longer includes it
- CRun terraform state rm on the database so that Terraform stops tracking it before the apply
- DReview why the replacement is forced, and find a safer alternative
Show answer and explanationHide answer
Correct answer: DA forced replacement destroys the old object, so the engineer should first confirm why it is forced and look for a safe alternative, such as a lifecycle prevent_destroy guard. Applying blindly risks data loss, while state rm and deleting the block hide the resource rather than managing the change safely.
Question 2Security and Policy
Which practice keeps cloud credentials out of Terraform configuration files?
- AUsing dynamic credentials, such as workload identity or short-lived tokens, supplied by the environment
- BCommitting the credentials to a private repository, so that only the team can read them
- CHard-coding the access key in the provider block, so that the configuration works everywhere
- DWriting the credentials in a comment at the top of the main file for the team's reference
Show answer and explanationHide answer
Correct answer: ADynamic, short-lived credentials supplied by the environment keep secrets out of code. Hard-coded keys, committed credentials and comments all expose them.
Question 3State Management
Two engineers run terraform apply against the same state at the same time. What protects the state from corruption?
- ASetting parallelism to one on the CLI, which serialises the apply for every user of the workspace
- BStoring the state file in version control so that merges resolve any differences automatically
- CBackend locking, such as a DynamoDB lock table or the run queue
- DDeleting the lock file manually before each apply, so that only one engineer's run is ever active
Show answer and explanationHide answer
Correct answer: CBackends that support locking, such as S3 with a DynamoDB table or Terraform Cloud's run queue, prevent concurrent writes. Version control does not lock state, parallelism settings do not serialise separate machines, and deleting locks removes the protection.
Question 4Modules
What is the purpose of a Terraform module?
- ATo hold the provider credentials used by every configuration in the same repository
- BTo package a reusable set of resources behind input variables and outputs
- CTo store the state of a configuration in a separate file on a remote backend
- DTo define the order in which resources are created, without grouping them logically
Show answer and explanationHide answer
Correct answer: BA module packages reusable resources behind inputs and outputs. Credentials belong in provider or variable configuration, state is stored by backends, and ordering is handled by dependencies, not modules.
Question 5Providers and Configuration
A configuration uses two instances of the same AWS provider in different regions. Which feature selects between them?
- AProvider aliases, referenced in resources with the provider meta-argument
- BTwo separate provider blocks with the same name and no alias set
- CA variable named region, which the provider reads automatically from the environment
- DA data block that looks up the region and switches the provider at plan time
Show answer and explanationHide answer
Correct answer: AProvider aliases define multiple configurations of the same provider, which resources select with the provider argument. Duplicate unaliased blocks are an error, and variables or data blocks do not select a provider instance.
How to prepare for Terraform Infrastructure Engineer Professional
- Read the official HashiCorp outline first (exam page), so you know exactly what is in scope.
- Give the most time to Resource Lifecycle and Security and Policy: together they make up 42% of the questions.
- Take the free 30-question practice test and note which topics you miss.
- Go back to the weak topics, then test again. A practice score shows where to study; it does not predict your exam result.
Full Terraform Infrastructure Engineer Professional question bank
All 111 questions with answers and explanations, as a PDF, an online practice exam, or both.
The full 111-question bank for Terraform Infrastructure Engineer Professional is in final review. The free practice test is open now.
Start the free practice testTerraform Infrastructure Engineer Professional FAQ
Related exams
| Exam | Vendor | Level |
|---|---|---|
| Terraform Associate | HashiCorp | Associate |
| Terraform Authoring & Operations Advanced | HashiCorp | Professional |
| Vault Associate | HashiCorp | Associate |
| Vault Operations Advanced | HashiCorp | Professional |
| DOP-C02: AWS Certified DevOps Engineer - Professional | AWS | Professional |
| Professional Cloud DevOps Engineer | Google Cloud | Professional |