During a terraform apply -refresh-only run, which element is not consulted by Terraform?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

During a terraform apply -refresh-only run, which element is not consulted by Terraform?

Explanation:
During a refresh-only run, Terraform’s goal is to bring the state up to date with what actually exists in the real world. It does this by looking at the state file to know which resources are being tracked and then querying the cloud provider (using the configured credentials) to fetch the current attributes of those resources. The configuration file’s resource blocks aren’t used to determine which resources to refresh or to fetch their current state in this mode; they’re used when planning or applying changes. So the element not consulted in a refresh-only run is the Terraform resource definitions in the configuration files.

During a refresh-only run, Terraform’s goal is to bring the state up to date with what actually exists in the real world. It does this by looking at the state file to know which resources are being tracked and then querying the cloud provider (using the configured credentials) to fetch the current attributes of those resources. The configuration file’s resource blocks aren’t used to determine which resources to refresh or to fetch their current state in this mode; they’re used when planning or applying changes. So the element not consulted in a refresh-only run is the Terraform resource definitions in the configuration files.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy