Terraform-Associate-004 practice question 10 of 35

In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.

Full set: 360 questions
Answer options
A: True
B: False
Correct Answer:
FALSE
Explanation

The statement is false because speculative plans in a Terraform Cloud workspace linked to a Version Control System (VCS) are not triggered by direct commits or merges to the tracked branch. Instead, they are specifically triggered when a pull request (or merge request) is opened against the tracked branch. The purpose of a speculative plan is to allow for review and validation of proposed changes before they are merged into the main codebase. A direct commit or merge to the tracked branch triggers a standard plan, not a speculative one.

Why Incorrect

The statement would be true if it correctly identified the trigger for a speculative plan. However, it incorrectly states that merges or commits trigger these plans. This confuses the trigger for a standard run (commits/merges to the tracked branch) with the trigger for a speculative plan (opening a pull request).

References

1. HashiCorp Terraform Documentation, "Run Modes and Options": In the section on Speculative Plans, the documentation explicitly states, "Terraform Cloud can also run speculative plans on pull requests to the chosen VCS branch, which helps you verify the changes before merging them." This clarifies that the trigger is a pull request, not a direct commit or merge.

Source: HashiCorp, Terraform Cloud Documentation, "Run Modes and Options", section "Speculative Plans". Retrieved from https://developer.hashicorp.com/terraform/cloud-docs/run/modes-and-options#speculative-plans

2. HashiCorp Terraform Documentation, "VCS-Driven Workflow": This page details the different triggers for runs. It distinguishes between the two main triggers: "When you push new commits to a VCS branch that is associated with a Terraform Cloud workspace, Terraform Cloud automatically queues a plan..." and "When you open a pull request against a branch that is associated with a Terraform Cloud workspace, Terraform Cloud runs a speculative plan with the code from the pull request." This directly refutes the question's premise.

Source: HashiCorp, Terraform Cloud Documentation, "Workspaces > VCS-Driven Workflow", section "Run Triggers". Retrieved from https://developer.hashicorp.com/terraform/cloud-docs/workspaces/vcs#run-triggers

Scroll to Top