nerdexam
HashiCorp

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.

Use Terraform Cloud and Terraform Enterprise capabilities

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)
  • B
    93% (28)
  • C
    3% (1)
  • D
    3% (1)

Why each option

Committing a change to the VCS branch configured for a Terraform Cloud workspace automatically queues a new Terraform run.

AOnly Terraform Cloud organization owners can set workspace variables on VCS

Setting workspace variables is governed by Terraform Cloud's role-based access control, not restricted solely to organization owners.

BCommit a change to the VCS working directory and branch that the Terraform CloudCorrect

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.

COnly members of a VCS organization can open a pull request against repositories that

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.

DOnly Terraform Cloud organization owners can approve plans in VCS connected

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

#Terraform Cloud#VCS Integration#Run Trigger#Workspaces

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice