An engineer runs 'terraform apply' with no extra flags in a directory using the local backend. Terraform prints the proposed plan and then pauses. What must happen before Terraform makes any changes to the real infrastructure?
$ terraform apply
# aws_instance.web will be created
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?- ATerraform applies the changes immediately because a plan was already generated during the same command.
- BThe engineer must re-run the command with 'terraform apply -refresh-only' to confirm the intended changes.
- CTerraform waits for the engineer to run 'terraform plan' in a second terminal to release the pause.
- DThe engineer must type 'yes' at the interactive approval prompt before Terraform provisions the resources. Correct
Why A is wrong: Tempting because apply does generate its own plan, but without a saved plan file or -auto-approve it still stops and asks for confirmation first.
Why B is wrong: Refresh-only only reconciles state with real infrastructure and proposes no resource changes, so it would never provision the new instance.
Why C is wrong: A separate plan run has no effect on the waiting apply, which is blocked purely on the interactive yes-or-no approval prompt.
Why D is correct: Correct: a bare 'terraform apply' shows the plan and waits for the operator to type 'yes' before it executes any changes.