Terraform Associate · 13% of the exam

HCP Terraform: free practice questions

5 sample questions from our 14-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real HashiCorp exam.

1. An operator is reviewing a failed HCP Terraform run. The run log shows: 'Policy check soft failed.' The operator does not have the 'Manage Policy Overrides' permission. What will happen to this run?

  • A. The run is automatically discarded and must be re-triggered from scratch.
  • B. The run proceeds to apply automatically because soft-mandatory failures are non-blocking.
  • C. The run is paused at the policy check stage and requires a user with the 'Manage Policy Overrides' permission to override it before the apply can proceed.✓ Correct
  • D. The run proceeds to apply only if all Terraform plan changes are marked as 'no-op'.
Explanation

Option C is correct. A soft-mandatory Sentinel policy failure pauses the run and requires a user with the 'Manage Policy Overrides' permission to explicitly override the failure before the apply step is unlocked. The current operator cannot unblock it themselves due to lacking that permission. Option A is wrong because the run is not discarded—it stays in a paused/needs-override state. Option B is wrong because soft-mandatory failures DO block the run; only advisory failures are non-blocking. Option D is wrong because the apply gating is based on the override permission, not on whether the plan produces changes.

2. When HCP Terraform performs cost estimation for a plan, which statement accurately describes its behavior and limitations?

  • A. Cost estimation calculates the exact monthly bill by querying live cloud provider pricing APIs in real time and accounts for all resource types across all providers.
  • B. Cost estimation provides a monthly cost delta between the prior state and the planned state for a supported subset of AWS, Azure, and GCP resources, and is shown before the Sentinel policy check stage.✓ Correct
  • C. Cost estimation runs after the apply completes and shows actual costs incurred rather than a projected estimate.
  • D. Cost estimation is only available for AWS resources and requires the user to input an IAM role with billing read permissions.
Explanation

Option B is correct. HCP Terraform's cost estimation feature calculates a projected monthly cost delta—showing the estimated cost before and after the planned changes—for a supported subset of resource types across AWS, Azure, and Google Cloud. Importantly, it is inserted into the run pipeline after the plan but before Sentinel policy checks, allowing policies to act on cost data (e.g., rejecting plans that exceed a cost threshold). Option A is wrong because coverage is not complete for all resource types and does not use real-time billing API queries; it uses static pricing tables. Option C is wrong because cost estimation is prospective (pre-apply), not retrospective. Option D is wrong because cost estimation supports AWS, Azure, and GCP, and does not require any cloud credentials or IAM roles—it works from the plan's resource definitions.

3. A platform engineer is setting up a new HCP Terraform workspace for the production environment. They want every `terraform apply` to require a human to review and approve the plan output before infrastructure changes are made — even when the run is triggered automatically by a VCS push. Which workspace setting should they configure to enforce this behavior?

  • A. Set the execution mode to 'Remote' and enable the 'Auto apply' toggle in workspace settings.
  • B. Set the execution mode to 'Remote' and leave 'Auto apply' disabled so every run pauses for confirmation after planning.✓ Correct
  • C. Set the execution mode to 'Local' so the engineer must manually run `terraform apply` from their workstation.
  • D. Attach a Sentinel hard-mandatory policy that blocks all applies until an operator adds an override comment in the run UI.
Explanation

When an HCP Terraform workspace uses Remote execution mode with 'Auto apply' disabled (the default), every run pauses at the 'planned' state after the plan phase and waits for a user with appropriate permissions to click 'Confirm & Apply'. This is the built-in mechanism for requiring human approval before any apply proceeds, regardless of how the run was triggered. — Option A is wrong because enabling 'Auto apply' causes runs to proceed to apply automatically without human confirmation, which is the opposite of what is required. — Option C is wrong because Local execution mode offloads the plan and apply to the engineer's local machine; HCP Terraform only stores state. It does not provide a centralized approval gate inside the platform for team-based review. — Option D is wrong because Sentinel policies gate applies based on policy logic, not on a blanket 'pause for human review' pattern. Sentinel is a policy-as-code governance tool and cannot be configured to simply require an operator comment as a generic approval mechanism; the correct purpose-built feature for approval gates is disabling Auto apply.

4. Your organization uses HCP Terraform with a VCS-driven workflow connected to GitHub. A teammate opens a pull request that modifies several `.tf` files. Which behavior does HCP Terraform exhibit automatically, without any manual intervention?

  • A. HCP Terraform automatically applies the changes and updates the state as soon as the pull request is opened.
  • B. HCP Terraform queues a speculative plan for the pull request and posts the plan output as a status check on the GitHub pull request.✓ Correct
  • C. HCP Terraform sends a webhook to GitHub to block the pull request until a human manually triggers a plan from the HCP Terraform UI.
  • D. HCP Terraform waits until the pull request is merged to the default branch before performing any plan or apply operation.
Explanation

Option B is correct. In a VCS-driven workflow, when a pull request is opened against a connected branch, HCP Terraform automatically runs a speculative plan—a read-only, non-applied plan—and posts the results as a commit status check on the pull request, giving reviewers visibility into infrastructure changes before merge. Option A is wrong because HCP Terraform never auto-applies on a PR; an apply only occurs after a merge to the tracked branch (and even then may require confirmation). Option C is wrong because HCP Terraform does not block PRs via webhook in this way; the status check is informational and can be required by branch protection rules but is not a block managed by HCP Terraform itself. Option D is wrong because HCP Terraform does trigger a speculative plan on the PR itself, not only after merge.

5. A growing engineering organization uses HCP Terraform and wants to begin enforcing cost governance. They attach a Sentinel policy set at the organization level containing a single policy configured as `enforcement_level = "soft-mandatory"`. The policy checks that the estimated monthly cost increase of any plan does not exceed $500. A workspace run produces a plan whose estimated cost increase is $620, causing the policy check to fail. Which TWO statements accurately describe what happens next?

  • A. The run is immediately and permanently discarded; no user can proceed with the apply.
  • B. A user with the 'Manage Policies' permission or higher can override the policy failure and allow the apply to proceed.✓ Correct
  • C. The apply proceeds automatically because soft-mandatory policies are advisory only and never block an apply.
  • D. The run halts at the policy check stage and cannot proceed to apply without an override or policy change.✓ Correct
  • E. The policy failure is logged but the run automatically proceeds to apply after a 10-minute grace period.
  • F. Only a workspace-level admin can override a soft-mandatory policy; organization-level admins cannot.
Explanation

A soft-mandatory policy failure causes the run to halt at the policy check stage and display a 'Policy check soft failed' status — it does not auto-apply (Option 3 is correct). However, unlike a hard-mandatory failure, it CAN be overridden: a user with the 'Manage Policies' permission (typically organization owners or policy managers) can click 'Override & Continue' to allow the apply to proceed despite the failure (Option 1 is correct). — Option A is wrong because the run is not permanently discarded; it remains in a paused state and can be overridden or the plan can be discarded manually. — Option C is wrong because that describes an 'advisory' enforcement level, not soft-mandatory. Advisory policies log the failure but never block the apply. Soft-mandatory DOES block unless overridden. — Option E is wrong because there is no automatic grace period or timer in HCP Terraform policy checks; the run waits indefinitely for a human action. — Option F is wrong because the override permission is tied to the 'Manage Policies' permission at the organization level, not solely to workspace-level admins.

9 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free
HCP Terraform — Free Terraform Associate Practice Questions | DataCertPrep — Certification Prep