HashiCorp
TERRAFORM-ASSOCIATE-003 · Question #142
What does Terraform use the .terraform.lock.hc1 file for?
The correct answer is B. Tracking specific provider dependencies. The .terraform.lock.hcl file is a new feature in Terraform 0.14 that records the exact versions of each provider used in your configuration. This helps ensure consistent and reproducible behavior across different machines and runs.
Understand Terraform basics
Question
What does Terraform use the .terraform.lock.hc1 file for?
Options
- AThere is no such file
- BTracking specific provider dependencies
- CPreventing Terraform runs from occurring
- DStoring references to workspaces which are locked
How the community answered
(33 responses)- A15% (5)
- B76% (25)
- C6% (2)
- D3% (1)
Explanation
The .terraform.lock.hcl file is a new feature in Terraform 0.14 that records the exact versions of each provider used in your configuration. This helps ensure consistent and reproducible behavior across different machines and runs.
Topics
#lock file#provider dependencies#version pinning#dependency locking
Community Discussion
No community discussion yet for this question.