QuestionQ25

Terraform state management

When running terraform apply -refresh-only, which of the following does Terraform not consult when updating the state file?

  • A Authentication credentials for the provider.
  • B Terraform configuration files defining the resources.
  • C The actual infrastructure as reported by the provider API.
  • D The most recent state file.
Explanation

Refresh-only mode updates Terraform state and root-module outputs to reflect changes made to remote objects outside Terraform. It queries the provider using its configured authentication and compares the provider-reported remote objects with the existing state; it does not plan changes to make infrastructure match resource definitions in Terraform configuration.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!