Skip to content

002 · Domain 7: HCP Terraform / Enterprise Operations · 12% of the exam

Task 7.1: Understand how to operate HCP Terraform

Running HCP Terraform day to day: VCS, CLI and API-driven runs, configuration versions, health assessments and drift detection, run states, and when Stacks fit better than workspaces.

Study it

  • Operating HCP Terraform: run workflows, health assessments and Stacks

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the HashiCorp documentation page that proves it.

Question 1 · choose 1

An organization on the HCP Terraform Standard edition enables health assessments for a workspace that uses Terraform 1.15. The workspace's last run applied successfully, but no drift or continuous validation results ever appear. The workspace's execution mode is Local, with plans and applies run in the team's CI system. What is the cause?

  1. AHealth assessments are a Premium feature whatever the execution mode, unavailable on Standard
  2. BContinuous validation needs check blocks, and without them drift detection is skipped as well
  3. CAssessments require remote or agent execution mode, which these runs do not use
  4. DTerraform 1.15 is newer than health assessments support; pin 1.3
Show the answer and why
  • AHealth assessments are a Premium feature whatever the execution mode, unavailable on Standard

    Incorrect

    Health assessments are available in the Standard and Premium editions.

  • BContinuous validation needs check blocks, and without them drift detection is skipped as well

    Incorrect

    Drift detection runs regardless of check blocks; continuous validation simply has fewer conditions to evaluate.

  • CAssessments require remote or agent execution mode, which these runs do not use

    Correct

    Workspaces need remote or agent execution mode for health assessments, because HCP Terraform runs a speculative plan to assess them.

  • DTerraform 1.15 is newer than health assessments support; pin 1.3

    Incorrect

    Drift detection needs 0.15.4 or later and continuous validation 1.3 or later; newer versions qualify.

Health assessments need Standard or Premium, a supported Terraform version, remote or agent execution and a successful latest run. Local execution mode keeps state in HCP Terraform but runs nothing there.

Question 2 · choose 1

A workspace with health assessments enabled receives a new run while an assessment is in progress. What happens to the assessment?

  1. AIt is canceled, and the next one waits for the next period
  2. BThe new run waits until the assessment ends
  3. CBoth run at once against the same state
  4. DThe assessment restarts as soon as the run finishes
Show the answer and why
  • AIt is canceled, and the next one waits for the next period

    Correct

    A new run cancels the current assessment, and HCP Terraform runs the next assessment during the next assessment period.

  • BThe new run waits until the assessment ends

    Incorrect

    The run goes ahead, and the assessment in progress is canceled.

  • CBoth run at once against the same state

    Incorrect

    The assessment is canceled instead.

  • DThe assessment restarts as soon as the run finishes

    Incorrect

    It waits for the next scheduled period.

Workspaces with very frequent runs may rarely complete an assessment for this reason.

Question 3 · choose 1

A workspace admin wants to trigger a health assessment right after an incident. Which statement is correct?

  1. AAny user with plan permission can start one from the CLI
  2. BSeveral can run at once to speed things up
  3. CIt is UI-only and resets the automated schedule
  4. DIt runs the next apply automatically if drift is found
Show the answer and why
  • AAny user with plan permission can start one from the CLI

    Incorrect

    On-demand assessments are only in the UI and need workspace admin.

  • BSeveral can run at once to speed things up

    Incorrect

    Another assessment cannot start while one is in progress.

  • CIt is UI-only and resets the automated schedule

    Correct

    On-demand assessments are only available in the UI, and each one resets the scheduling for automated assessments.

  • DIt runs the next apply automatically if drift is found

    Incorrect

    Assessments report drift; they do not apply changes.

Use Start health assessment on the workspace's Health page.

Question 4 · choose 1

A team deploys the same components to twelve regions and wants rules that automatically approve deployment runs for some groups. Which HCP Terraform construct supports that?

  1. ATwelve workspaces with auto-apply
  2. BOne workspace with twelve variable sets
  3. CRun triggers between regional deployment workspaces
  4. DA Stack with deployment groups
Show the answer and why
  • ATwelve workspaces with auto-apply

    Incorrect

    Auto-apply is not deployment group orchestration.

  • BOne workspace with twelve variable sets

    Incorrect

    One workspace holds one state.

  • CRun triggers between regional deployment workspaces

    Incorrect

    Run triggers chain runs; they do not approve groups.

  • DA Stack with deployment groups

    Correct

    Deployment group orchestration rules are supported by Stacks and not by workspaces.

Workspaces keep features Stacks lack, such as continuous validation, so compare the feature table before choosing.

Question 5 · choose 1

A custom tool starts HCP Terraform runs through the API instead of VCS. How must it package the configuration?

  1. AAs a zip archive of the parent folder
  2. BAs a tar.gz whose root holds the .tf files
  3. CAs a git bundle of the whole repository
  4. DAs one JSON document holding all .tf contents
Show the answer and why
  • AAs a zip archive of the parent folder

    Incorrect

    The API requires a tar.gz with the configuration at its root.

  • BAs a tar.gz whose root holds the .tf files

    Correct

    The upload must be a tar.gz, and extracting it must give paths like ./main.tf with no intermediate directories.

  • CAs a git bundle of the whole repository

    Incorrect

    This workflow does not fetch from version control.

  • DAs one JSON document holding all .tf contents

    Incorrect

    The API expects an archive of files.

Create a configuration version first to get the upload URL; the token needs queue plans permission on the workspace.

Practice domain 7 →Practice all domains →