What does terraform refresh-only modify?
What does terraform refresh-only modify?
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.
refresh-only tries to match state file with real world infra. It does not refer to configuration in tf files.
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