OpenExamsFREE PRACTICE — ANY EXAM

Free Terraform Authoring & Operations Advanced Practice Questions

100 free questions · Answer explanations · No signup required

View examination details, outline and sources

Loading selected examination banks…

Sample Practice Questions

Try these 10 sample questions from the Terraform Authoring & Operations Advanced practice bank. Each includes the answer and explanation. Continue with the interactive practice above to review the full question set.

  1. 1After changing a backend address, an operator needs Terraform to copy the existing state to the new backend. Which initialization option requests that behavior?

    1. A.terraform init -reconfigure
    2. B.terraform init -migrate-stateCorrect answer: B
    3. C.terraform init -backend=false
    4. D.terraform init -get=false

    Explanation: HashiCorp states: "The -migrate-state option will attempt to copy existing state to the new backend," Migration copies state; reconfigure discards backend initialization settings without migrating, backend=false skips backend configuration, and get=false skips module installation.

    Reference: Terraform init documentation — Backend Initialization

  2. 2In Terraform 1.6, a variable validation expression needs to compare two different input variables. What restriction prevents this directly?

    1. A.Validation expressions must be numeric.
    2. B.Validation may reference only the containing variable.Correct answer: B
    3. C.Validation may reference only resource attributes.
    4. D.Validation is evaluated only after apply.

    Explanation: HashiCorp states: "The expression can refer only to the containing variable and must not produce errors." The version-specific validation scope excludes the other variable. Boolean conditions are required; resource attributes are not the sole permitted references, and evaluation need not await apply.

    Reference: Terraform 1.6 Input Variable Validation — Input Variable Validation

  3. 3Which provider release satisfies the constraint ~> 4.7.2?

    1. A.4.8.0
    2. B.5.0.0
    3. C.4.7.1
    4. D.4.7.9Correct answer: D

    Explanation: HashiCorp states: "~> 1.0.4: Allows Terraform to install 1.0.5 and 1.0.10 but not 1.1.0." The same rule allows patches >=4.7.2 and <4.8.0. 4.7.9 qualifies; 4.7.1 is too old and the other versions cross the minor boundary.

    Reference: Terraform 1.6 Version Constraint Syntax — Version Constraint Syntax

  4. 4Two .tf files reside in the directory where Terraform runs. How are they organized into a module?

    1. A.Each file automatically becomes a child module.
    2. B.Only main.tf belongs to the root module.
    3. C.Both files together form the root module.Correct answer: C
    4. D.Files become modules only after registry publication.

    Explanation: HashiCorp states: "The .tf files in your working directory when you run terraform plan or terraform apply together form the root module." A module is directory-based. Separate filenames do not create child modules and publication is unnecessary.

    Reference: Terraform 1.6 Developing Modules — Developing Modules

  5. 5A SaaS API must be managed through Terraform. Which architectural component implements Terraform's interaction with that API?

    1. A.A backend storage implementation
    2. B.A state snapshot serializer
    3. C.A provider pluginCorrect answer: C
    4. D.A module output declaration

    Explanation: HashiCorp states: "Terraform relies on plugins called providers to interact with cloud providers, SaaS providers, and other APIs." Providers implement API-facing capabilities; backends store state and modules organize configuration rather than implementing the API plugin.

    Reference: Terraform 1.6 Providers — Providers

  6. 6A pull request triggers an HCP Terraform speculative plan. What can reviewers do with that run?

    1. A.Apply it after changing its sensitive variables.
    2. B.Review proposed changes, but not apply that plan.Correct answer: B
    3. C.Use it to bypass mandatory policy failures.
    4. D.Use it to migrate every workspace's state.

    Explanation: HashiCorp states: "They show possible changes, and policies affected by those changes, but cannot apply any changes." Speculative runs provide review, not an applyable deployment artifact, policy bypass or cross-workspace migration.

    Reference: HCP Terraform Speculative Plans — Speculative Plans

  7. 7A working directory must adopt a backend configuration without migrating the previously initialized backend's state. Which option fits?

    1. A.terraform init -force-copy
    2. B.terraform init -upgrade
    3. C.terraform init -reconfigureCorrect answer: C
    4. D.terraform init -migrate-state

    Explanation: HashiCorp states: "The -reconfigure option disregards any existing configuration, preventing migration of any existing state." Reconfigure explicitly prevents migration; force-copy implies migration, migrate-state copies state, and upgrade addresses dependency installation.

    Reference: Terraform init documentation — Backend Initialization

  8. 8A health assertion should report an unhealthy endpoint while allowing the Terraform operation to continue. Which condition form fits that failure behavior?

    1. A.A resource precondition
    2. B.An input variable validation
    3. C.A resource postcondition
    4. D.A check block assertionCorrect answer: D

    Explanation: HashiCorp states: "check blocks do not prevent or block the overall execution of Terraform operations." Check failures warn without blocking. Validation and lifecycle pre/postconditions are blocking error mechanisms.

    Reference: Terraform 1.6 Choosing a Custom Condition — Selecting a Custom Condition for your use case

  9. 9A root module requires provider >= 5.0 while a child module requires provider < 5.0. What does Terraform do?

    1. A.Uses the root constraint and ignores the child
    2. B.Refuses to proceed because both cannot be metCorrect answer: B
    3. C.Installs one version for each module automatically
    4. D.Selects the oldest version in the lock file

    Explanation: HashiCorp states: "Terraform considers these constraints equal, and will only proceed if all of them can be met." The intersection is empty. Root priority, independent module provider versions, or a lock-file selection cannot override incompatible constraints.

    Reference: Terraform 1.6 Version Constraint Behavior — Version Constraint Behavior

  10. 10A reusable module must accept a network ID from callers and return a service endpoint. Which interface mechanisms fit?

    1. A.Resource labels for input; local values for return
    2. B.Provider aliases for input; data blocks for return
    3. C.Backend arguments for input; module source for return
    4. D.Input variables for input; output values for returnCorrect answer: D

    Explanation: HashiCorp states: "Input variables to accept values from the calling module. Output values to return results to the calling module, which it can then use to populate arguments elsewhere." Inputs receive caller arguments and outputs return the endpoint. Labels, locals, provider aliases and backend configuration do not form this caller interface.

    Reference: Terraform 1.6 Module Inputs and Outputs — Module structure

Exam Review

About Terraform Authoring & Operations Advanced

Terraform Authoring & Operations Advanced · UNSPECIFIED

Key exam facts

Provider
HashiCorp is the certification owner and examination publisher.
Format
Online proctored examination combining lab-based scenarios, multiple-choice questions and fill-in-the-blank responses. This practice bank uses four-option single-answer questions.
Time limit
4 hours with one 15-minute break, as officially stated; this is not represented as four hours of uninterrupted answering time.
Passing score
Not published. HashiCorp states that it does not publish its passing scores.
Exam fee
USD 295 plus locally applicable taxes and fees; one free retake included.

Topics covered

  • Manage resource lifecycle

    • Initialize a configuration using terraform init and its options
    • Generate an execution plan using terraform plan and its options
    • Apply configuration changes using terraform apply and its options
    • Destroy resources using terraform destroy and its options
    • Manage resource state, including importing resources and reconciling resource drift
  • Develop and troubleshoot dynamic configuration

    • Use language features to validate configuration
    • Query providers using data sources
    • Compute and interpolate data using HCL functions
    • Use meta-arguments in configuration
    • Configure input variables and outputs, including complex types
    • Analyze best practices for managing sensitive data, such as using Vault for secrets management
  • Develop collaborative Terraform workflows

    • Manage the Terraform binary, providers, and modules using version constraints
    • Configure remote state
    • Use the Terraform workflow in automation
    • Share data across configurations and workspaces
  • Create, maintain, and use Terraform modules

    • Create a module
    • Use a module in configuration
    • Refactor a module and use module versioning
    • Refactor an existing configuration into modules
  • Configure and use Terraform providers

    • Understand Terraform's plugin-based architecture
    • Configure providers, including aliasing, versioning, sourcing, and managing upgrades
    • Manage provider authentication
    • Troubleshoot provider errors
  • Collaborate on infrastructure as code using HCP Terraform (multiple-choice only)

    • Analyze the HCP Terraform run workflow
    • Understand HCP Terraform workspaces and their configuration options, including access management
    • Manage provider credentials in HCP Terraform
    • Analyze policy as code and governance features

How to prepare

Work through the topics, read the explanation after each answer, and revisit the areas where you miss questions. Use the official outline and reference materials below to guide your study.

These independent practice questions are not actual exam items and do not guarantee a passing result.

Frequently asked questions

What is the exam format?

Online proctored examination combining lab-based scenarios, multiple-choice questions and fill-in-the-blank responses. This practice bank uses four-option single-answer questions.

How long is the exam?

4 hours with one 15-minute break, as officially stated; this is not represented as four hours of uninterrupted answering time.

What is the passing score?

Not published. HashiCorp states that it does not publish its passing scores.

How much does the exam cost?

USD 295 plus locally applicable taxes and fees; one free retake included.

Official sources and references

Confirm current exam arrangements with the exam provider.