Question 1 · choose 1
During an incident, engineers changed several resources directly in the cloud console. Before deciding what to do, the team wants to see exactly how those objects now differ from what Terraform recorded, without any proposal to change infrastructure. Which command fits?
- Aterraform plan -compact-warnings
- Bterraform output -json
- Cterraform plan -refresh-only
- Dterraform validate
Show the answer and why
Aterraform plan -compact-warnings
Incorrect
That only shortens warnings; the normal plan would still propose reverting the changes.
Bterraform output -json
Incorrect
output prints root output values, not differences in resources.
Cterraform plan -refresh-only
Correct
A refresh-only plan shows what changed in the remote objects outside Terraform and proposes no infrastructure changes.
Dterraform validate
Incorrect
validate never contacts the infrastructure.
Refresh-only mode is for looking at drift on its own, separately from configuration changes.
HashiCorp documentation