What does terraform refresh modify?
What does terraform refresh modify?
The terraform refresh command updates the Terraform state file to reflect the current state of the infrastructure. It reads the current settings from all managed remote objects and ensures that the state file in Terraform matches the actual configuration of the resources, without making changes to the cloud infrastructure, the Terraform plan, or the Terraform configuration. This helps maintain an accurate representation of the infrastructure within Terraform's management.
The answer is correct. The terraform refresh command reads the current settings from all managed remote objects and updates the Terraform state to match. Source: https://www.terraform.io/cli/commands/refresh
I go with B
it's a state file, so answer is B
B. Your state file. The terraform refresh command in Terraform is used to update the Terraform state file with the current real-world state of the infrastructure. When the terraform refresh command is run, Terraform reads the current state of the resources from the infrastructure provider, and then updates the state file with any changes that have occurred outside of Terraform.
refresh updates the state if there was a manuell change in the infrastructure, for example via aws consule.
It's B.
https://www.terraform.io/cli/commands/refresh