HashiCorp Certified: Terraform Associate — Question 273

What does Terraform use .terraform.lock.hcl file for?

Answer options

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.