TA-002-P · Question #95
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
The correct answer is B. Commit a change to the VCS working directory and branch that the Terraform Cloud. Committing a change to the VCS branch configured for a Terraform Cloud workspace automatically queues a new Terraform run.
Question
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
Options
- AOnly Terraform Cloud organization owners can set workspace variables on VCS
- BCommit a change to the VCS working directory and branch that the Terraform Cloud
- COnly members of a VCS organization can open a pull request against repositories that
- DOnly Terraform Cloud organization owners can approve plans in VCS connected
How the community answered
(30 responses)- B93% (28)
- C3% (1)
- D3% (1)
Why each option
Committing a change to the VCS branch configured for a Terraform Cloud workspace automatically queues a new Terraform run.
Setting workspace variables is governed by Terraform Cloud's role-based access control, not restricted solely to organization owners.
Terraform Cloud VCS-connected workspaces are configured to monitor a specific repository and branch, and any new commit pushed to that branch automatically triggers a speculative or confirmed Terraform run. This is the standard GitOps mechanism for applying infrastructure changes through version control without manual intervention. The workspace uses a webhook registered with the VCS provider to receive push event notifications and start the run.
The ability to open pull requests against a VCS repository is controlled by the VCS provider's own repository permission settings, not by Terraform Cloud organization membership.
Plan approval rights in Terraform Cloud are assigned through workspace-level permissions and are not exclusive to organization owners.
Concept tested: Triggering Terraform Cloud runs via VCS integration
Source: https://developer.hashicorp.com/terraform/cloud-docs/run/ui
Topics
Community Discussion
No community discussion yet for this question.