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.

At a glance
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.

Terraform Infrastructure Engineer Professional cost and format

CertificationTerraform Infrastructure Engineer Professional
VendorHashiCorp
LevelProfessional
StatusActive

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.

All 30 free questions
  1. 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?

    1. AApply the plan, since Terraform always preserves data during a replacement
    2. BRemove the resource block from the configuration so that the plan no longer includes it
    3. CRun terraform state rm on the database so that Terraform stops tracking it before the apply
    4. DReview why the replacement is forced, and find a safer alternative
    Show answer and explanation
    Correct answer: D

    A 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.

  2. Question 2Security and Policy

    Which practice keeps cloud credentials out of Terraform configuration files?

    1. AUsing dynamic credentials, such as workload identity or short-lived tokens, supplied by the environment
    2. BCommitting the credentials to a private repository, so that only the team can read them
    3. CHard-coding the access key in the provider block, so that the configuration works everywhere
    4. DWriting the credentials in a comment at the top of the main file for the team's reference
    Show answer and explanation
    Correct answer: A

    Dynamic, short-lived credentials supplied by the environment keep secrets out of code. Hard-coded keys, committed credentials and comments all expose them.

  3. Question 3State Management

    Two engineers run terraform apply against the same state at the same time. What protects the state from corruption?

    1. ASetting parallelism to one on the CLI, which serialises the apply for every user of the workspace
    2. BStoring the state file in version control so that merges resolve any differences automatically
    3. CBackend locking, such as a DynamoDB lock table or the run queue
    4. DDeleting the lock file manually before each apply, so that only one engineer's run is ever active
    Show answer and explanation
    Correct answer: C

    Backends 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.

  4. Question 4Modules

    What is the purpose of a Terraform module?

    1. ATo hold the provider credentials used by every configuration in the same repository
    2. BTo package a reusable set of resources behind input variables and outputs
    3. CTo store the state of a configuration in a separate file on a remote backend
    4. DTo define the order in which resources are created, without grouping them logically
    Show answer and explanation
    Correct answer: B

    A 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.

  5. Question 5Providers and Configuration

    A configuration uses two instances of the same AWS provider in different regions. Which feature selects between them?

    1. AProvider aliases, referenced in resources with the provider meta-argument
    2. BTwo separate provider blocks with the same name and no alias set
    3. CA variable named region, which the provider reads automatically from the environment
    4. DA data block that looks up the region and switches the provider at plan time
    Show answer and explanation
    Correct answer: A

    Provider 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

  1. Read the official HashiCorp outline first (exam page), so you know exactly what is in scope.
  2. Give the most time to Resource Lifecycle and Security and Policy: together they make up 42% of the questions.
  3. Take the free 30-question practice test and note which topics you miss.
  4. 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.

Full question bank
Coming to the store soon

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 test

Terraform Infrastructure Engineer Professional FAQ

Related exams

ExamVendorLevel
Terraform AssociateHashiCorpAssociate
Terraform Authoring & Operations AdvancedHashiCorpProfessional
Vault AssociateHashiCorpAssociate
Vault Operations AdvancedHashiCorpProfessional
DOP-C02: AWS Certified DevOps Engineer - ProfessionalAWSProfessional
Professional Cloud DevOps EngineerGoogle CloudProfessional