HashiCorp Certified: Terraform Associate — Question 196
What does running a terraform plan do?
Answer options
- A. Compares your Terraform code and local state file to the remote state file in a cloud provider and determines if any changes need to be made
- B. Imports all of your existing cloud provider resources to the state file
- C. Installs all providers and modules referenced by configuration
- D. Compares the state file to your Terraform code and determines if any changes need to be made
Correct answer: D
Explanation
The correct answer is D because running a terraform plan analyzes the current state file against the configuration to determine if any modifications are needed. Option A incorrectly describes the comparison with the remote state file, while option B is about importing resources, which is not the function of terraform plan. Option C refers to installation rather than evaluation of changes.