All Practice Exams

100+ Free Terraform Pro Practice Questions

Pass your HashiCorp Certified: Terraform Authoring & Operations Professional exam on the first try — instant access, no signup required.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
~50-65% Pass Rate
100+ Questions
100% Free
1 / 10
Question 1
Score: 0/0

In HCL, which meta-argument creates multiple instances of a resource indexed by strings rather than integers?

A
B
C
D
to track
2026 Statistics

Key Facts: Terraform Pro Exam

4 hrs

Exam Duration

HashiCorp

Lab-based

Format

Hands-on practical

$295

Exam Fee

HashiCorp

2 years

Validity

HashiCorp

Associate

Prerequisite

TF Associate (003)

PSI Online

Delivery

HashiCorp

IMPORTANT: The actual Terraform Pro exam is a 4-hour hands-on, lab-based practical exam combining ~12 multiple-choice questions with 4 real Terraform lab scenarios (write/debug/run code in a remote environment), NOT a standard multiple-choice test. Our 100 free practice questions cover the underlying knowledge (HCL, modules, state, HCP Terraform, Sentinel/OPA, imports, moved/removed blocks) that the labs test against. Exam fee is $295 USD, delivered by PSI online proctored. Certification is valid for 2 years. Candidates must pass the Terraform Associate (003) before attempting the Professional exam.

Sample Terraform Pro Practice Questions

Try these sample questions to test your Terraform Pro exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1In HCL, which meta-argument creates multiple instances of a resource indexed by strings rather than integers?
A.count
B.for_each
C.depends_on
D.lifecycle
Explanation: for_each iterates over a map or set of strings, creating one instance per key. Instances are addressed like aws_instance.example["web"]. count uses integer indices, making list mutations problematic when order changes. depends_on sets explicit dependencies; lifecycle controls create/destroy semantics.
2Which block in Terraform 1.5+ declaratively imports existing infrastructure into state during plan and apply?
A.import block
B.terraform import
C.moved block
D.removed block
Explanation: The import block (Terraform 1.5+) is declarative and includes to=resource_address and id="<existing-id>". It runs during plan/apply and integrates into normal workflows. The terraform import CLI is the imperative predecessor. moved block handles renames. removed block deletes without destroying.
3A team renames a module instance from module.network to module.vpc without destroying resources. Which construct should they use?
A.moved block
B.removed block
C.import block
D.depends_on
Explanation: The moved block (Terraform 1.1+) records that a resource or module instance has been renamed. Terraform updates the state address in place rather than destroying the old and creating new. moved from = module.network, to = module.vpc.
4Which Terraform backend supports built-in state locking without any extra configuration?
A.local
B.s3 without DynamoDB
C.remote (Terraform Cloud/Enterprise)
D.http
Explanation: The remote backend (Terraform Cloud / HCP Terraform / Enterprise) provides state storage AND locking natively. S3 requires a DynamoDB table for locking. The local backend offers only local file locking. Azure Storage and GCS have native locking but via the respective backends, not their 'local' counterpart.
5What is the purpose of the sensitive = true argument on a variable?
A.Encrypts the variable in state
B.Masks the variable's value in Terraform CLI output
C.Prevents the variable from being read
D.Requires the variable to be stored in Vault
Explanation: sensitive = true hides the value from plan/apply/output CLI output (shows <sensitive>). Note: the value is still stored in plaintext in state and may be accessible via state inspection. True encryption at rest is a property of the backend, not the sensitive flag.
6Which feature in HCP Terraform (Terraform Cloud) lets you enforce custom organizational policies during plan?
A.Sentinel policies
B.OPA policies (as alternative)
C.Both Sentinel and OPA
D.terraform validate
Explanation: HCP Terraform supports policy as code via Sentinel (HashiCorp native) and Open Policy Agent (OPA/Rego). Both run during the policy-check phase of a plan, before apply. terraform validate only runs HCL syntax checks, not business policies.
7Which Sentinel enforcement level allows an HCP Terraform admin to override a policy failure?
A.advisory
B.soft-mandatory
C.hard-mandatory
D.strict
Explanation: soft-mandatory policies log a failure and block apply but allow organization owners or admins to override. advisory policies just warn. hard-mandatory cannot be overridden and always block apply. There is no strict level.
8Which Terraform command moves a resource to a new address in the state without re-creating it?
A.terraform state mv
B.terraform state rm
C.terraform state pull
D.terraform import
Explanation: terraform state mv <source> <destination> renames a resource or module in state without destroying it. This is the imperative alternative to the moved block. terraform state rm removes from state (without destroying the real resource).
9Which block allows assertions during plan or apply without defining a resource?
A.check block
B.validation block
C.dynamic block
D.locals block
Explanation: The check block (Terraform 1.5+) defines continuous validation assertions that run during plan and apply. If an assertion fails, Terraform emits a warning without blocking. validation blocks only run on variable inputs.
10Which Terraform workflow stage does Sentinel policy checking run in (HCP Terraform)?
A.Before plan
B.Between plan and apply
C.After apply
D.During init
Explanation: Sentinel evaluates the plan (tfplan), configuration (tfconfig), and current state (tfstate) between the plan and apply phases. This lets policies inspect the proposed changes before they execute. Cost estimation also occurs here.

About the Terraform Pro Exam

The Terraform Authoring & Operations Professional (TF Pro) is HashiCorp's advanced credential for practitioners with extensive production Terraform experience. Unlike the multiple-choice Associate exam, the Professional exam is a 4-hour hands-on lab-based assessment with roughly 12 multiple-choice questions and 4 lab-based scenarios where candidates write, debug, and run real Terraform code in a remote environment. It validates advanced HCL authoring, module design, state management, and HCP Terraform operations.

Questions

16 scored questions

Time Limit

240 minutes

Passing Score

70% (approximate)

Exam Fee

$295 USD (HashiCorp / PSI Online Proctored)

Terraform Pro Exam Content Outline

~25%

Advanced HCL Authoring

for_each/count, dynamic blocks, optional object attributes, validation blocks, check blocks, lifecycle (precondition/postcondition, replace_triggered_by), splat expressions, for expressions

~20%

Module Authoring & Versioning

Module structure (main.tf, variables.tf, outputs.tf), semantic versioning, Terraform Registry, provider aliases, configuration_aliases, terraform test

~20%

State Management & Refactoring

Remote backends (S3+DynamoDB, HCP Terraform), state locking, state migration, import blocks, moved blocks, removed blocks, terraform_remote_state

~20%

HCP Terraform Operations

Workspaces, teams, VCS integration, agents, run pipeline (plan, cost estimation, policy check, apply), run tasks, run triggers, drift detection, dynamic provider credentials

~15%

Policy as Code & CI/CD

Sentinel (advisory/soft-mandatory/hard-mandatory, tfplan/tfconfig/tfstate imports), OPA with Rego, Atlantis, GitHub Actions integration

How to Pass the Terraform Pro Exam

What You Need to Know

  • Passing score: 70% (approximate)
  • Exam length: 16 questions
  • Time limit: 240 minutes
  • Exam fee: $295 USD

Keys to Passing

  • Complete 500+ practice questions
  • Score 80%+ consistently before scheduling
  • Focus on highest-weighted sections
  • Use our AI tutor for tough concepts

Terraform Pro Study Tips from Top Performers

1The real exam is hands-on labs — spend the majority of your time writing and running Terraform code, not just reading
2Master advanced HCL: for_each over maps, dynamic blocks, optional attributes, validation blocks, and check blocks
3Practice refactoring with moved and removed blocks; know when each is appropriate
4Set up a real HCP Terraform org (free tier) and practice workspaces, VCS integration, Sentinel policies
5Know the import block + terraform plan -generate-config-out workflow for bulk imports
6Understand dynamic provider credentials via OIDC (AWS, Azure, GCP) — no static credentials in production
7Complete HashiCorp's official Professional Prep tutorial with AWS lab exercises

Frequently Asked Questions

What format is the Terraform Pro exam?

The Terraform Authoring & Operations Professional exam is a 4-hour hands-on practical exam. It combines roughly 12 multiple-choice questions with 4 lab-based scenarios where you write, debug, and run actual Terraform code in a pre-provisioned remote environment. This is dramatically different from the multiple-choice Associate exam.

Do these practice questions simulate the lab format?

No. The actual exam is hands-on labs, which cannot be faithfully reproduced in multiple-choice format. Our 100 practice questions target the underlying knowledge (HCL features, module patterns, state operations, HCP Terraform semantics, Sentinel/OPA, imports, refactoring) that the lab scenarios test. Use them alongside hands-on lab practice in your own environment or HCP Terraform.

What are the prerequisites for the Terraform Pro exam?

Candidates must pass the Terraform Associate (003) certification before attempting the Professional. HashiCorp also strongly recommends extensive production Terraform experience (authoring modules, managing state, running HCP Terraform, writing Sentinel policies).

How much does the Terraform Pro exam cost?

The Terraform Authoring & Operations Professional exam fee is $295 USD. It is delivered via PSI online proctoring. Certification is valid for 2 years from the exam date.

How should I prepare for the Terraform Pro exam?

Plan 80-120+ hours of hands-on work over 2-3 months. Build several modules end-to-end, practice state migrations, use HCP Terraform workspaces with VCS integration, write Sentinel policies, use dynamic credentials, and do the official HashiCorp Learning Path including the practical labs. Pass rates are lower than the Associate because the hands-on format rewards real experience.

What jobs can I get with Terraform Pro certification?

Terraform Pro supports senior roles: Platform Engineer, Staff/Principal DevOps, Cloud Infrastructure Architect, Senior SRE, and Terraform Specialist. It signals you can design, maintain, and operate production Terraform at enterprise scale.