Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 292

What does terraform refresh-only modify?

    Correct Answer: D

    The 'terraform refresh' command updates the state file with the latest real-world state of your cloud infrastructure. It does not make any changes to the actual cloud resources, Terraform configuration, or plan. Its sole purpose is to refresh the state file to ensure it matches the current state of the infrastructure.

Discussion
Stargazer11Option: D

refresh-only tries to match state file with real world infra. It does not refer to configuration in tf files.

Ramdi1Option: D

The terraform refresh command is used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure. This can be used to detect any drift from the last-known state and to update the state file. This does not modify infrastructure, but does modify the state file