SaveMyCert
Log in
5 of 5 free questions left today·for 10 a day
Terraform Pro 002 · Domain 7

HCP Terraform and Terraform Enterprise operations practice questions

HCP Terraform and Terraform Enterprise operations is worth 12% of the Terraform Pro 002 exam — the 5th-heaviest of the 7 domains. Operating HCP Terraform: usage and cost tracking, multi-environment configuration, upgrading Terraform across workspaces and policy as code in the pipeline. Weight approximates the sub-objective share. 6 fully worked examples are further down this page, answers included.

Exam weight
12%
the 5th-heaviest of the 7 domains
Questions
96
across 2 topics
Free, no account
5/day
a free account allows 10 a day
Explanations
Every option
right and wrong

Build a practice session

5 free questions left today.

Domains

How many?

Mode

Ready when you are

10 fresh questions drawn across 1 of 7 domains, in Learn mode.

Review what you missed

Every question you answer incorrectly, and every question you flag while practising, is saved here automatically. Finish a session and you can come back to re-drill just those.

6 sample HCP Terraform and Terraform Enterprise operations questions, fully explained

Questions from the Terraform Pro 002 bank mapped to domain 7, with the answer key and the reasoning behind every option. None of them repeat the examples on the main Terraform Pro 002 practice page.

Question 1HCP Terraform and Terraform Enterprise operations

A team switches an HCP Terraform workspace from remote to local execution so engineers can run Terraform from their laptops, keeping the cloud block. The workspace still lists a Terraform variable named region and is in scope of an AWS credentials variable set. The next local plan prompts for region, and the AWS provider finds no credentials. What explains this?

Choose one.

  • a
    Local execution applies variable sets but not workspace-level variables

    Variable sets are skipped too, which is why the credentials from the set are also missing.

  • b
    Local execution applies workspace variables just to runs started in the UI

    A local-mode workspace has no UI runs at all; every run happens on the engineer's machine.

  • c
    Local execution does not apply the workspace's variables or variable sets Correct

    In local mode HCP Terraform only stores state; workspace variables and variable sets are not evaluated for the run.

  • d
    Local execution applies the workspace variables after terraform login

    terraform login only authenticates the CLI to HCP Terraform; it never pulls variable values into a local run.

The concept

What local execution mode keeps and drops

Why that’s the answer

With local execution, Terraform runs on the workstation through the CLI-driven workflow and the workspace keeps only the state. HCP Terraform does not evaluate workspace variables or variable sets in this mode, so the engineers must supply region and the AWS credentials locally (for example in tfvars files and environment variables).

How to reason it out
  1. Identify the mode: local execution with the cloud block.
  2. Recall what HCP Terraform still does in local mode: state storage and locking only.
  3. Conclude that neither workspace variables nor variable sets reach the run.

Exam tip: Local execution: HCP keeps the state, you supply every variable.

Terraform Professional (002): Operating HCP Terraform and Tracking Usage and Cost — the lesson that teaches this.

Question 2HCP Terraform and Terraform Enterprise operations

To shrink its HCP Terraform bill, a platform team plans to move 40 workspaces from remote to local execution and run Terraform on self-hosted CI runners instead. The cloud block stays, so state remains in HCP Terraform, and the managed infrastructure is unchanged. How will this affect the organization's billable managed resources?

Choose one.

  • a
    They stop counting, since no runs execute on HCP Terraform's workers

    Managed resources are counted from state, not from where plans and applies run.

  • b
    They count in the hours when a CI runner applies to those workspaces

    A resource counts every hour from provisioning until it is destroyed, not only in hours with runs.

  • c
    They stop counting after the next CI runner apply rewrites state

    A CI runner's apply writes a new state version to the same workspace, so the resources stay in managed state.

  • d
    No change, since the resources still sit in HCP Terraform-managed state Correct

    Billing counts managed-mode resources in HCP Terraform-managed state files, whatever executes the runs.

The concept

What makes a resource billable in HCP Terraform

Why that’s the answer

HCP Terraform defines a managed resource as a resource with mode = "managed" in a state file that HCP Terraform manages, billed from provisioning until destruction at the peak count per hour. Local execution changes where Terraform runs, not where state lives: the cloud block still stores state in the workspace, so the count is unchanged. Only destroying resources or removing them from HCP Terraform-managed state lowers it.

How to reason it out
  1. Recall the definition: managed-mode resources in HCP Terraform-managed state.
  2. Note that local execution keeps state in the workspace.
  3. Conclude that the execution location does not change the count.

Exam tip: The managed resource count follows the state, not the runner.

Terraform Professional (002): Operating HCP Terraform and Tracking Usage and Cost — the lesson that teaches this.

Question 3HCP Terraform and Terraform Enterprise operations

A FinOps engineer is reviewing the state of one HCP Terraform workspace to understand its share of the organization's billable managed resources. The state includes the objects below. Which of them does not add to the billable managed resource count?

Choose one.

  • a
    random_password.db_admin

    A random_password is a managed-mode resource in state, so it counts even though it creates nothing in a cloud.

  • b
    time_sleep.wait_for_dns

    time_sleep is a managed-mode resource like any other; only null_resource and terraform_data are excluded.

  • c
    terraform_data.bootstrap Correct

    HCP Terraform excludes terraform_data (and null_resource) resources from the managed resource count.

  • d
    module.vpc.aws_subnet.app

    Resources inside child modules are still managed-mode resources in the workspace's state and count normally.

The concept

Exclusions from the managed resource count

Why that’s the answer

Every resource with mode = "managed" in HCP Terraform-managed state counts, including logical resources from the random and time providers and resources inside modules. HCP Terraform excludes resources defined as null_resource or terraform_data, and data sources (mode = "data") are not managed resources at all.

How to reason it out
  1. Recall the rule: managed-mode resources in state count.
  2. Recall the named exclusions: null_resource and terraform_data.
  3. Treat random and time resources and module resources as ordinary managed resources.

Exam tip: Excluded: null_resource, terraform_data and data sources. Everything else managed counts.

Terraform Professional (002): Operating HCP Terraform and Tracking Usage and Cost — the lesson that teaches this.

Question 4HCP Terraform and Terraform Enterprise operations

An organization's workspaces hold 1,200 billable managed resources. Between 10:00 and 11:00, a test workspace creates 300 more resources at 10:05 and destroys them at 10:40; nothing else changes. Which managed resource count does HCP Terraform use to bill the 10:00 to 11:00 hour?

Choose one.

  • a
    1,200

    This is the count at the end of the hour; the hourly charge uses the peak, not the closing count.

  • b
    1,375

    This is a time-weighted average; HCP Terraform does not pro-rate within the hour.

  • c
    1,800

    This counts the test resources twice, once for creation and once for destruction; billing counts resources, not operations.

  • d
    1,500 Correct

    The bill for an hour uses the peak number of managed resources in that hour, reached between 10:05 and 10:40.

The concept

Hourly peak billing for managed resources

Why that’s the answer

HCP Terraform bills managed resources per hour, and the peak number of managed resources in a given hour determines that hour's cost. A partial hour is billed as a full hour, so the 300 short-lived resources raise the hour's peak to 1,500 even though they existed for 35 minutes.

How to reason it out
  1. Find the highest concurrent count during the hour: 1,200 + 300.
  2. Recall that the hourly charge uses that peak.
  3. Reject averaging and operation counting.

Exam tip: Each billing hour is charged at its peak managed resource count.

Terraform Professional (002): Operating HCP Terraform and Tracking Usage and Cost — the lesson that teaches this.

Question 5HCP Terraform and Terraform Enterprise operations

On a paid HCP Terraform plan, a finance lead asks which projects and workspaces account for the organization's billable managed resources, and wants the breakdown as a CSV file to share. Where should the platform owner get it?

Choose one.

  • a
    The billable resource table on the organization's Usage page Correct

    The Usage page's billable resource table groups current billable totals by project and workspace and exports CSV.

  • b
    The cost estimation results on each workspace's latest run

    Cost estimation predicts cloud provider spend for a run; it does not report HCP Terraform billable resources.

  • c
    The organization's audit trail, exported through its token

    Audit trails record actions taken in the organization, not resource totals per project or workspace.

  • d
    The run history of each workspace, filtered to applied runs

    Run history lists runs and their changes; it gives no organization-wide billable breakdown or export.

The concept

Where to see billable managed resources

Why that’s the answer

The organization's Usage page reports managed resources, and on paid plans its billable resource table breaks the current totals down by project and workspace, with search, filters, sorting and CSV export. Cost estimation is about cloud spend, and audit trails and run history do not total resources.

How to reason it out
  1. Note the question: HCP Terraform billable resources by project and workspace.
  2. Recall where usage is reported: the organization's Usage page.
  3. Rule out tools that estimate cloud cost or record actions.

Exam tip: Billable resources by project or workspace: the Usage page's billable resource table.

Terraform Professional (002): Operating HCP Terraform and Tracking Usage and Cost — the lesson that teaches this.

Question 6HCP Terraform and Terraform Enterprise operations

A platform owner wants every run in the organization's AWS workspaces to show an estimated monthly cost between the plan and the apply, without building or hosting any integration. Runs show no such phase today. What should the owner do?

Choose one.

  • a
    Enable cost estimation for all workspaces in the organization settings Correct

    Cost estimation is off by default; an organization owner enables it for all workspaces, and it adds a phase after the plan.

  • b
    Add a post-plan run task that queries the AWS Price List API for each run

    A run task needs an external service the team would have to build and host, which the stem rules out.

  • c
    Turn on Structured Run Output in each workspace's general settings

    Structured Run Output changes how plan and apply logs are displayed; it does not produce cost data.

  • d
    Enable health assessments for all workspaces in the organization settings

    Health assessments detect drift and re-run checks; they do not estimate costs.

The concept

Turning on cost estimation

Why that’s the answer

HCP Terraform's cost estimation is disabled by default. An organization owner turns it on under the organization's Settings > Cost Estimation for all workspaces; runs then show estimated hourly and monthly costs as a phase between plan and apply, for supported AWS, Azure and Google Cloud resources.

How to reason it out
  1. Note the requirements: cost before apply, no custom integration.
  2. Recall the built-in feature: cost estimation, disabled by default.
  3. Enable it at the organization level.

Exam tip: Cost estimation is an organization setting, off until an owner enables it.

Terraform Professional (002): Operating HCP Terraform and Tracking Usage and Cost — the lesson that teaches this.

What Terraform Pro 002 domain 7 tests, topic by topic

The official exam guide breaks HCP Terraform and Terraform Enterprise operations into 2 topics. The question bank follows the same split, so a weak topic shows up as a cluster of misses you can go back and read.

Published Terraform Pro 002 practice questions per topic in HCP Terraform and Terraform Enterprise operations
TopicWhat it coversQuestions
Operating HCP Terraform and tracking usage and costOfficial Terraform Infrastructure Engineer Professional (002) objectives, 7a Understand how to operate HCP Terraform; 7b Track resource usage and cost.48
Multi-environment workspaces, upgrades and policy as codeOfficial Terraform Infrastructure Engineer Professional (002) objectives, 7c Implement multi-environment configuration; 7d Upgrade Terraform versions across workspaces; 7e Define Policy as Code in a CI/CD pipeline.48
Total96

Revise HCP Terraform and Terraform Enterprise operations before you drill it

Other Terraform Pro 002 domains

HCP Terraform and Terraform Enterprise operations: your questions

HCP Terraform and Terraform Enterprise operations is domain 7 of the Terraform Pro 002 exam guide and carries 12% of the scored content — the 5th-heaviest of the 7 domains. HashiCorp has not yet published the exam's question count, so there is no per-domain number of questions to give.

Source

The domain weight and topic list on this page come from the official Terraform Pro 002 exam guide.