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 questionsThe 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.
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).
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
Keep practicing
Take the free Terraform-Associate-004 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other Terraform-Associate-004 practice questions
- Question 1You should run terraform fnt to rewrite all Terraform configurations within the current w…
- Question 2Module variable assignments are inherited from the parent module and you do not need to e…
- Question 3terraform validate confirms thesyntaxof Terraform files.
- Question 4Using the terraform state rm command against a resource will destroy it.
- Question 5Variables declared within a module are accessible outside of the module.
- Question 6terraform init retrieves and caches the configuration for all remote modules.
