Practice Exams:

HashiCorp Terraform Associate 004 Dumps

EXAM: HashiCorp Certified: Terraform Associate (004)
Verified By Experts
Premium Bundle
$40.00
$59.97 $99.97

Terraform Associate 004 Premium Bundle


  • Premium File 167 Questions & Answers
  • Training Course 118 Lectures
  • Study Guide 285 Pages

HashiCorp Terraform Associate 004 Practice Test 70

Question 690

A contractor uses a controlled CLI-driven Terraform project and must know how its remote run differs from an automatically triggered VCS workspace. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Create an HCP Terraform workspace connected to a reviewed configuration and let its run lifecycle plan and apply infrastructure using its own state and variables. Verify: Configure a disposable CLI-driven workspace, submit a nonproduction plan and confirm its source and run metadata match the chosen command invocation.
  2. Implement: Back up local state, configure an approved HCP Terraform workspace, initialize the new backend context and follow a verified state migration process before new applies. Verify: Migrate a disposable resource with an inspected backup, verify its state address and remote ID in the HCP workspace and confirm a no-change plan.
  3. Implement: Choose an HCP Terraform CLI-driven workflow when authorized operators explicitly submit runs from their local configuration rather than relying on repository webhooks. Verify: Create a disposable workspace, queue a plan and inspect its run history, state association and variable configuration before any authorized apply.
  4. Implement: Choose an HCP Terraform CLI-driven workflow when authorized operators explicitly submit runs from their local configuration rather than relying on repository webhooks. Verify: Configure a disposable CLI-driven workspace, submit a nonproduction plan and confirm its source and run metadata match the chosen command invocation.

Answer & Explanations

Correct answer: D

A.

The test would be relevant: Configure a disposable CLI-driven workspace, submit a nonproduction plan and confirm its source and run metadata match the chosen command invocation. But the offered implementation—Create an HCP Terraform workspace connected to a reviewed configuration and let its run lifecycle plan and apply infrastructure using its own state and variables.—addresses “Understand HCP Terraform workspace runs as managed workflow units”. The action needed here is: Choose an HCP Terraform CLI-driven workflow when authorized operators explicitly submit runs from their local configuration rather than relying on repository webhooks.

B.

This action/test pair addresses “Migrate existing local Terraform state to HCP Terraform safely”. Back up local state, configure an approved HCP Terraform workspace, initialize the new backend context and follow a verified state migration process before new applies. Migrate a disposable resource with an inspected backup, verify its state address and remote ID in the HCP workspace and confirm a no-change plan. The case instead calls for: Choose an HCP Terraform CLI-driven workflow when authorized operators explicitly submit runs from their local configuration rather than relying on repository webhooks.

C.

The action is applicable: Choose an HCP Terraform CLI-driven workflow when authorized operators explicitly submit runs from their local configuration rather than relying on repository webhooks. But its proposed test—Create a disposable workspace, queue a plan and inspect its run history, state association and variable configuration before any authorized apply.—addresses “Understand HCP Terraform workspace runs as managed workflow units”. This requirement is confirmed instead by: Configure a disposable CLI-driven workspace, submit a nonproduction plan and confirm its source and run metadata match the chosen command invocation.

D.

The question is set in this situation: A contractor uses a controlled CLI-driven Terraform project and must know how its remote run differs from an automatically triggered VCS workspace. Choose an HCP Terraform CLI-driven workflow when authorized operators explicitly submit runs from their local configuration rather than relying on repository webhooks. Confirm it through this test: Configure a disposable CLI-driven workspace, submit a nonproduction plan and confirm its source and run metadata match the chosen command invocation. CLI-driven and VCS-driven workflows differ in how a run is initiated and which source revisions are submitted, while both can use managed state and policies.

Question 691

A regulated team needs provider API calls to run inside an approved execution boundary rather than from personal developer machines. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. Create an HCP Terraform workspace connected to a reviewed configuration and let its run lifecycle plan and apply infrastructure using its own state and variables.
  2. Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.
  3. Organize workspaces into HCP Terraform projects according to team, application or lifecycle boundaries, applying sensible project-level access and variable policies.
  4. Publish approved reusable modules to the HCP Terraform private registry with documented source repositories, versions and access permissions.

Answer & Explanations

Correct answer: B

A.

Create an HCP Terraform workspace connected to a reviewed configuration and let its run lifecycle plan and apply infrastructure using its own state and variables. This addresses “Understand HCP Terraform workspace runs as managed workflow units”, where the governing principle is: An HCP Terraform workspace owns a distinct execution and state context; it is not equivalent to a plain Terraform language module or cloud region. The stated case instead calls for: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

B.

Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state. Verify the result with this test: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

C.

Organize workspaces into HCP Terraform projects according to team, application or lifecycle boundaries, applying sensible project-level access and variable policies. This addresses “Group HCP Terraform workspaces into meaningful projects”, where the governing principle is: Projects group and govern related workspaces; a project does not replace the workspace's own state or automatically merge several separate infrastructure graphs. The stated case instead calls for: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

D.

Publish approved reusable modules to the HCP Terraform private registry with documented source repositories, versions and access permissions. This addresses “Use the private module registry with controlled source provenance”, where the governing principle is: A private registry makes reviewed internal modules discoverable and versioned, while public registry availability alone does not establish an organization's security approval. The stated case instead calls for: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

Question 692

A regulated team needs provider API calls to run inside an approved execution boundary rather than from personal developer machines. The infrastructure engineer proposes this change: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Which mechanism explains why it works?

  1. Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.
  2. A private registry makes reviewed internal modules discoverable and versioned, while public registry availability alone does not establish an organization's security approval.
  3. An HCP Terraform workspace owns a distinct execution and state context; it is not equivalent to a plain Terraform language module or cloud region.
  4. Projects group and govern related workspaces; a project does not replace the workspace's own state or automatically merge several separate infrastructure graphs.

Answer & Explanations

Correct answer: A

A.

Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state. The corresponding implementation is: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

B.

A private registry makes reviewed internal modules discoverable and versioned, while public registry availability alone does not establish an organization's security approval. That explains “Use the private module registry with controlled source provenance”, not the mechanism behind the described change. The relevant principle is: Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

C.

An HCP Terraform workspace owns a distinct execution and state context; it is not equivalent to a plain Terraform language module or cloud region. That explains “Understand HCP Terraform workspace runs as managed workflow units”, not the mechanism behind the described change. The relevant principle is: Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

D.

Projects group and govern related workspaces; a project does not replace the workspace's own state or automatically merge several separate infrastructure graphs. That explains “Group HCP Terraform workspaces into meaningful projects”, not the mechanism behind the described change. The relevant principle is: Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

Question 693

A regulated team needs provider API calls to run inside an approved execution boundary rather than from personal developer machines. After implementing this change—Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.—which test most directly validates its intended outcome?

  1. Publish a disposable versioned module, configure an authorized consumer workspace and verify the requested module version resolves to the reviewed source.
  2. Create a test project with development and staging workspaces and verify each retains separate runs and state while sharing intended project metadata.
  3. Create a disposable workspace, queue a plan and inspect its run history, state association and variable configuration before any authorized apply.
  4. Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

Answer & Explanations

Correct answer: D

A.

Publish a disposable versioned module, configure an authorized consumer workspace and verify the requested module version resolves to the reviewed source. That would help test “Use the private module registry with controlled source provenance”, not the outcome required in this scenario. The relevant acceptance check is: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

B.

Create a test project with development and staging workspaces and verify each retains separate runs and state while sharing intended project metadata. That would help test “Group HCP Terraform workspaces into meaningful projects”, not the outcome required in this scenario. The relevant acceptance check is: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

C.

Create a disposable workspace, queue a plan and inspect its run history, state association and variable configuration before any authorized apply. That would help test “Understand HCP Terraform workspace runs as managed workflow units”, not the outcome required in this scenario. The relevant acceptance check is: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

D.

Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings. This check is decisive because remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

Question 694

A regulated team needs provider API calls to run inside an approved execution boundary rather than from personal developer machines. Which proposed shortcut most directly risks missing credentials and incorrect security boundaries during infrastructure operations and should therefore be rejected?

  1. Move several workspaces into one HCP Terraform project and assume their state files automatically combine into one authoritative Terraform state.
  2. Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode.
  3. Let every team copy modules from unknown repositories without any shared versioning or approval process and call it enterprise governance.
  4. Create a workspace named production and assume the name automatically configures cloud credentials and every required approval policy.

Answer & Explanations

Correct answer: B

A.

Move several workspaces into one HCP Terraform project and assume their state files automatically combine into one authoritative Terraform state. That shortcut risks misunderstood infrastructure ownership and unintended cross-environment access assumptions. Here the specific shortcut is: Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode.

B.

Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode. The foreseeable failure is missing credentials and incorrect security boundaries during infrastructure operations. The safer response is: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

C.

Let every team copy modules from unknown repositories without any shared versioning or approval process and call it enterprise governance. That shortcut risks duplicated untrusted module code and inconsistent upgrades across teams. Here the specific shortcut is: Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode.

D.

Create a workspace named production and assume the name automatically configures cloud credentials and every required approval policy. That shortcut risks uncontrolled run permissions or incorrect state association in remote execution. Here the specific shortcut is: Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode.

Question 695

A regulated team needs provider API calls to run inside an approved execution boundary rather than from personal developer machines. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Verify: Create a disposable workspace, queue a plan and inspect its run history, state association and variable configuration before any authorized apply.
  2. Implement: Publish approved reusable modules to the HCP Terraform private registry with documented source repositories, versions and access permissions. Verify: Publish a disposable versioned module, configure an authorized consumer workspace and verify the requested module version resolves to the reviewed source.
  3. Implement: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Verify: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.
  4. Implement: Create an HCP Terraform workspace connected to a reviewed configuration and let its run lifecycle plan and apply infrastructure using its own state and variables. Verify: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

Answer & Explanations

Correct answer: C

A.

The action is applicable: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. But its proposed test—Create a disposable workspace, queue a plan and inspect its run history, state association and variable configuration before any authorized apply.—addresses “Understand HCP Terraform workspace runs as managed workflow units”. This requirement is confirmed instead by: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

B.

This action/test pair addresses “Use the private module registry with controlled source provenance”. Publish approved reusable modules to the HCP Terraform private registry with documented source repositories, versions and access permissions. Publish a disposable versioned module, configure an authorized consumer workspace and verify the requested module version resolves to the reviewed source. The case instead calls for: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

C.

Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Confirm it through this test: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings. Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

D.

The test would be relevant: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings. But the offered implementation—Create an HCP Terraform workspace connected to a reviewed configuration and let its run lifecycle plan and apply infrastructure using its own state and variables.—addresses “Understand HCP Terraform workspace runs as managed workflow units”. The action needed here is: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

Question 696

An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.
  2. Back up local state, configure an approved HCP Terraform workspace, initialize the new backend context and follow a verified state migration process before new applies.
  3. Configure explicit HCP Terraform run triggers when a downstream workspace must queue a run after an approved upstream workspace completes a relevant run.
  4. Connect a workspace to an authorized repository and branch so HCP Terraform can queue plans from version-controlled commits and record run history.

Answer & Explanations

Correct answer: A

A.

The question is set in this situation: An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state. Verify the result with this test: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

B.

Back up local state, configure an approved HCP Terraform workspace, initialize the new backend context and follow a verified state migration process before new applies. This addresses “Migrate existing local Terraform state to HCP Terraform safely”, where the governing principle is: Preserving state resource bindings avoids Terraform treating already-existing infrastructure as unmanaged when operations move from local files to managed HCP state. The stated case instead calls for: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

C.

Configure explicit HCP Terraform run triggers when a downstream workspace must queue a run after an approved upstream workspace completes a relevant run. This addresses “Use HCP Terraform run triggers for intentional upstream dependencies”, where the governing principle is: Run triggers coordinate workspace execution ordering but do not themselves convert unrelated workspaces into one state or automatically transfer every output as input. The stated case instead calls for: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

D.

Connect a workspace to an authorized repository and branch so HCP Terraform can queue plans from version-controlled commits and record run history. This addresses “Use a VCS-driven workspace to connect code changes to managed runs”, where the governing principle is: A VCS-linked workspace associates runs with source commits and configured triggers, rather than relying on untracked command history from a developer laptop. The stated case instead calls for: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

Question 697

An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. The infrastructure engineer proposes this change: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Which mechanism explains why it works?

  1. Run triggers coordinate workspace execution ordering but do not themselves convert unrelated workspaces into one state or automatically transfer every output as input.
  2. A VCS-linked workspace associates runs with source commits and configured triggers, rather than relying on untracked command history from a developer laptop.
  3. Preserving state resource bindings avoids Terraform treating already-existing infrastructure as unmanaged when operations move from local files to managed HCP state.
  4. Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

Answer & Explanations

Correct answer: D

A.

Run triggers coordinate workspace execution ordering but do not themselves convert unrelated workspaces into one state or automatically transfer every output as input. That explains “Use HCP Terraform run triggers for intentional upstream dependencies”, not the mechanism behind the described change. The relevant principle is: Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

B.

A VCS-linked workspace associates runs with source commits and configured triggers, rather than relying on untracked command history from a developer laptop. That explains “Use a VCS-driven workspace to connect code changes to managed runs”, not the mechanism behind the described change. The relevant principle is: Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

C.

Preserving state resource bindings avoids Terraform treating already-existing infrastructure as unmanaged when operations move from local files to managed HCP state. That explains “Migrate existing local Terraform state to HCP Terraform safely”, not the mechanism behind the described change. The relevant principle is: Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

D.

The question is set in this situation: An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state. The corresponding implementation is: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

Question 698

An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. After implementing this change—Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.—which test most directly validates its intended outcome?

  1. Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.
  2. Set up two disposable linked workspaces, apply an upstream harmless change and verify the expected downstream run is queued without unauthorized auto-apply.
  3. Migrate a disposable resource with an inspected backup, verify its state address and remote ID in the HCP workspace and confirm a no-change plan.
  4. Create a test branch change, inspect the queued speculative plan and confirm run metadata references the intended commit without automatically approving production.

Answer & Explanations

Correct answer: A

A.

The question is set in this situation: An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings. This check is decisive because remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

B.

Set up two disposable linked workspaces, apply an upstream harmless change and verify the expected downstream run is queued without unauthorized auto-apply. That would help test “Use HCP Terraform run triggers for intentional upstream dependencies”, not the outcome required in this scenario. The relevant acceptance check is: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

C.

Migrate a disposable resource with an inspected backup, verify its state address and remote ID in the HCP workspace and confirm a no-change plan. That would help test “Migrate existing local Terraform state to HCP Terraform safely”, not the outcome required in this scenario. The relevant acceptance check is: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

D.

Create a test branch change, inspect the queued speculative plan and confirm run metadata references the intended commit without automatically approving production. That would help test “Use a VCS-driven workspace to connect code changes to managed runs”, not the outcome required in this scenario. The relevant acceptance check is: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

Question 699

An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. Which proposed shortcut most directly risks missing credentials and incorrect security boundaries during infrastructure operations and should therefore be rejected?

  1. Assume every workspace in one project automatically reruns when any other workspace changes, even with no configured run triggers.
  2. Point a new HCP Terraform workspace at existing configuration and run apply without importing or migrating the previously managed resource state.
  3. Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode.
  4. Push an unreviewed commit and assume a successful remote plan means human approval is unnecessary for production apply.

Answer & Explanations

Correct answer: C

A.

Assume every workspace in one project automatically reruns when any other workspace changes, even with no configured run triggers. That shortcut risks missed dependent updates or accidental assumptions about workspace orchestration. Here the specific shortcut is: Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode.

B.

Point a new HCP Terraform workspace at existing configuration and run apply without importing or migrating the previously managed resource state. That shortcut risks duplicate infrastructure or destructive reconciliation after losing existing state identity mappings. Here the specific shortcut is: Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode.

C.

The question is set in this situation: An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode. The foreseeable failure is missing credentials and incorrect security boundaries during infrastructure operations. The safer response is: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

D.

Push an unreviewed commit and assume a successful remote plan means human approval is unnecessary for production apply. That shortcut risks unapproved changes promoted after confusing plan execution with release authorization. Here the specific shortcut is: Assume selecting HCP Terraform state necessarily forces all provider API calls to execute from the same local laptop regardless of run mode.

Question 700

An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Connect a workspace to an authorized repository and branch so HCP Terraform can queue plans from version-controlled commits and record run history. Verify: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.
  2. Implement: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Verify: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.
  3. Implement: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Verify: Create a test branch change, inspect the queued speculative plan and confirm run metadata references the intended commit without automatically approving production.
  4. Implement: Configure explicit HCP Terraform run triggers when a downstream workspace must queue a run after an approved upstream workspace completes a relevant run. Verify: Set up two disposable linked workspaces, apply an upstream harmless change and verify the expected downstream run is queued without unauthorized auto-apply.

Answer & Explanations

Correct answer: B

A.

The test would be relevant: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings. But the offered implementation—Connect a workspace to an authorized repository and branch so HCP Terraform can queue plans from version-controlled commits and record run history.—addresses “Use a VCS-driven workspace to connect code changes to managed runs”. The action needed here is: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

B.

The question is set in this situation: An operations group has an HCP Terraform workspace but a private-network integration that requires carefully chosen execution placement. Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. Confirm it through this test: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings. Remote execution runs against HCP-managed environment and stored run variables; local execution uses the caller runtime while still possibly using HCP-managed state.

C.

The action is applicable: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements. But its proposed test—Create a test branch change, inspect the queued speculative plan and confirm run metadata references the intended commit without automatically approving production.—addresses “Use a VCS-driven workspace to connect code changes to managed runs”. This requirement is confirmed instead by: Run a harmless test in both supported contexts, compare where provider credentials are supplied and confirm state ownership and policy settings.

D.

This action/test pair addresses “Use HCP Terraform run triggers for intentional upstream dependencies”. Configure explicit HCP Terraform run triggers when a downstream workspace must queue a run after an approved upstream workspace completes a relevant run. Set up two disposable linked workspaces, apply an upstream harmless change and verify the expected downstream run is queued without unauthorized auto-apply. The case instead calls for: Review HCP Terraform workspace execution settings and select compatible remote or local execution according to governance, credential and connectivity requirements.

HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests