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

What does terraform refresh modify?

    Correct Answer: B

    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.

Discussion
Uma10Option: B

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

bora4motionOption: B

I go with B

090200fOption: B

it's a state file, so answer is B

campsOption: 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.

G4ExamsOption: B

refresh updates the state if there was a manuell change in the infrastructure, for example via aws consule.

dani88geOption: B

It's B.

depal_dhirOption: B

https://www.terraform.io/cli/commands/refresh