Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 196


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.

Show Answer
Correct Answer: B

In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when a pull request is made, not when you merge or commit changes. Merging or committing changes might trigger a regular plan run, but speculative plans are specifically tied to the review process of pull requests.

Discussion

7 comments
Sign in to comment
vortegonOption: B
Dec 2, 2023

pull requests start speculative plans, this occurs before a commit or merge. https://developer.hashicorp.com/terraform/cloud-docs/run/remote-operations#speculative-plans

nickylake
Nov 19, 2024

B;speculative plan runs are automatically triggered when a pull request (PR) is opened or updated, allowing you to preview the potential impact of proposed changes before merging. However, when changes are merged or committed directly to the specified branch, Terraform Cloud initiates a standard plan and apply workflow, not a speculative plan

Arjun2024USA
Nov 21, 2024

online research says TRUE In a Terraform Cloud workspace linked to a version control repository, speculative plan runs do start automatically when you merge or commit changes to the repository. This is designed to give users an early preview of the potential changes to infrastructure, allowing them to review the plan before it is finalized or applied. This automatic behavior helps ensure that changes are validated in the context of the current state of the infrastructure, even before they are manually applied.

princajenOption: A
Feb 16, 2023

It is true because Terraform Cloud can monitor the linked version control repository for changes and automatically trigger a speculative plan run in response to each commit or merge. This allows users to quickly see the expected changes that would result from the proposed change, without actually applying those changes. Speculative plan runs can be a useful tool for catching errors early in the development process and avoiding potentially costly mistakes.

FarziWaliMarziOption: A
Apr 22, 2023

https://developer.hashicorp.com/terraform/cloud-docs/run/ui#automatically-starting-runs

InformationOverloadOption: A
Jan 16, 2023

Whether to perform speculative plans on pull requests to the connected repository, to assist in reviewing proposed changes. Automatic speculative plans are enabled by default, but you can disable them for any workspace. https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs

IgeinOption: B
Feb 1, 2025

Speculative plan runs in Terraform Cloud workspaces do not automatically start when you merge or commit changes to version control. They are triggered under specific circumstances: When a Pull Request (PR) is created or updated in the linked version control repository: Terraform Cloud automatically runs a speculative plan to show the impact of proposed changes before merging the PR. When a branch is pushed to the repository: Speculative plans are run for changes that are not yet applied (e.g., draft changes or PRs).

thureOption: A
Mar 30, 2025

https://developer.hashicorp.com/terraform/cloud-docs/run/modes-and-options VCS: When a workspace is connected to a VCS repository, HCP Terraform automatically starts a speculative plan when someone opens a pull request (or merge request) against the selected branch of that repository. The pull/merge request view in your VCS links to the speculative plan, and you can also find it in the workspace's run list.