HashiCorp Certified: Terraform Associate — Question 155
Select the command that doesn’t cause Terraform to refresh its state.
Answer options
- A. terraform apply
- B. terraform destroy
- C. terraform plan
- D. terraform state list
Correct answer: D
Explanation
The correct answer is D, as 'terraform state list' only retrieves the current state without making any changes or refreshing it. In contrast, 'terraform apply', 'terraform destroy', and 'terraform plan' all involve operations that necessitate refreshing the state to ensure it is up to date with the actual infrastructure.