HashiCorp
TERRAFORM-ASSOCIATE-003 · Question #236
What is the purpose of the terraform.lock.hcl file in Terraform?
The correct answer is D. Tracking specific provider dependencies. The terraform.lock.hcl file is automatically created and maintained by Terraform. It records the specific versions and checksums of providers used in a configuration, ensuring consistent runs across environments and machines.
Implement and Maintain State
Question
What is the purpose of the terraform.lock.hcl file in Terraform?
Options
- AThere is no such file.
- BStoring references to workspaces, which are locked.
- CPreventing Terraform runs from occurring.
- DTracking specific provider dependencies.
How the community answered
(52 responses)- A10% (5)
- B2% (1)
- C4% (2)
- D85% (44)
Explanation
The terraform.lock.hcl file is automatically created and maintained by Terraform. It records the specific versions and checksums of providers used in a configuration, ensuring consistent runs across environments and machines.
Topics
#dependency lock file#terraform.lock.hcl#provider versioning#dependency tracking
Community Discussion
No community discussion yet for this question.