Question 1 · choose 2
A pipeline runs terraform plan -out=tfplan, waits for a person to approve the printed plan, and then runs terraform apply tfplan. Which two statements about the apply step are true? (Choose TWO.)
- AIt runs a new plan and applies that instead if the configuration has changed
- BIt does not ask for confirmation, because passing the plan file counts as approval
- CIt needs -auto-approve, or it waits for input that the pipeline cannot give
- DIt cannot take extra planning options such as -var or -replace
- EIt reads variable values again from terraform.tfvars at apply time
Show the answer and why
AIt runs a new plan and applies that instead if the configuration has changed
Incorrect
A saved plan is applied as saved; Terraform does not silently re-plan.
BIt does not ask for confirmation, because passing the plan file counts as approval
Correct
When you pass a saved plan file, apply takes its actions without prompting; -auto-approve is ignored with a plan file.
CIt needs -auto-approve, or it waits for input that the pipeline cannot give
Incorrect
The saved plan is the approval, so no prompt appears.
DIt cannot take extra planning options such as -var or -replace
Correct
With a saved plan you cannot specify additional planning modes or options; the plan file already contains the final decisions.
EIt reads variable values again from terraform.tfvars at apply time
Incorrect
Input variables are stored in the plan file; apply does not re-read them.
The two-step workflow separates deciding (plan) from doing (apply), and the saved plan carries every decision with it.
HashiCorp documentation