HashiCorp Certified: Terraform Associate — Question 273
What does Terraform use .terraform.lock.hcl file for?
Answer options
- A. Tracking provider dependencies
- B. There is no such file
- C. Preventing Terraform runs from occurring
- D. Storing references to workspaces which are locked
Correct answer: A
Explanation
The .terraform.lock.hcl file is used by Terraform to keep track of provider dependencies, ensuring that the correct versions are used in different environments. The other options are incorrect because the file does exist, it does not prevent runs, and it does not store references to locked workspaces.