Courseiva
Use Terraform outside the core workflowhardMultiple ChoiceObjective-mapped

TF-004 VCS-backed workflow Practice Question

A team uses Terraform Cloud with a VCS-backed workflow. They notice that a recent commit triggered a run that failed because of an invalid configuration. The team fixed the configuration and wants to re-run the plan without committing again. Which action should they take?

⚠ Common exam trap

Candidates may think that the 'Queue Plan' button can re-run a plan with any configuration fix, but it only uses the same commit and workspace settings. If the fix involves version-controlled files, a new commit is necessary.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a new commit with the fix

In a VCS-backed Terraform Cloud workspace, runs are triggered by commits to the linked repository. When a configuration error is found in the code, fixing it requires a new commit that includes the corrected code. The 'Queue Plan' button re-runs a plan using the same commit, so it cannot incorporate local fixes. Creating a new commit (option B) triggers a new run with the fixed configuration.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Amend the previous commit and force push

    Why it's wrong here

    Amending the previous commit and force-pushing rewrites Git history, which is a highly disruptive practice in collaborative development environments. While it might technically update the remote branch and trigger a new run in Terraform Cloud, it can lead to lost work for other team members, create complex merge conflicts, and severely hinder auditability. This approach violates best practices for Git collaboration and introduces significant risks to team synchronization and data integrity.

  • Create a new commit with the fix

    Why this is correct

    Creating a new commit with the fix is the correct and standard procedure for a VCS-backed workflow in Terraform Cloud. This action pushes the updated configuration to the remote repository, which Terraform Cloud actively monitors for changes. Upon detecting the new commit, Terraform Cloud automatically initiates a new run (plan and potentially apply) using the corrected code, ensuring the infrastructure aligns with the intended state.

  • Use the 'Queue Plan' button in the Terraform Cloud UI

    Why it's wrong here

    The 'Queue Plan' button runs a plan with the same commit. It cannot apply local code changes; it only re-evaluates with current workspace settings. Since the invalid configuration was in the code, a new commit is required.

  • Run terraform plan locally and apply

    Why it's wrong here

    Running `terraform plan` and `terraform apply` locally operates on a local state file and local credentials, completely isolated from the Terraform Cloud workspace and its managed state. This action does not update the remote version control repository, nor does it trigger any execution within Terraform Cloud. Therefore, it would not resolve the invalid configuration issue within the shared, centralized Terraform Cloud environment.

About these practice questions

One of 428 original TF-004 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This TF-004 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the TF-004 exam.