TA-002-P · Question #106
terraform refresh command will not modify infrastructure, but does modify the state file.
The correct answer is A. True. The terraform refresh command queries the actual infrastructure providers to detect any real-world changes made outside of Terraform, then updates the local state file to reflect the current actual state. It is a read-only operation against infrastructure - it makes no changes…
Question
terraform refresh command will not modify infrastructure, but does modify the state file.
Options
- ATrue
- BFalse
How the community answered
(33 responses)- A94% (31)
- B6% (2)
Explanation
The terraform refresh command queries the actual infrastructure providers to detect any real-world changes made outside of Terraform, then updates the local state file to reflect the current actual state. It is a read-only operation against infrastructure - it makes no changes to resources - but it does write updates to the state file to bring it in sync with reality.
Topics
Community Discussion
No community discussion yet for this question.