Which statement about the .terraform.lock.hcl file is true?

Prepare for the HashiCorp Terraform Associate Exam. Utilize flashcards and multiple-choice questions with detailed hints and explanations. Boost your confidence and be ready for success!

Multiple Choice

Which statement about the .terraform.lock.hcl file is true?

Explanation:
The lock file is all about making provider installations reproducible. It records the exact provider versions Terraform used, plus their cryptographic checksums for each target platform. By pinning these versions, Terraform will fetch the same provider binaries on every run, preventing drift across machines or environments. It’s generated and updated during terraform init as provider dependencies are resolved. This file does not store actual state values or resource IDs (those live in the Terraform state), and it doesn’t lock module versions—the latter are managed separately through module configuration and caches.

The lock file is all about making provider installations reproducible. It records the exact provider versions Terraform used, plus their cryptographic checksums for each target platform. By pinning these versions, Terraform will fetch the same provider binaries on every run, preventing drift across machines or environments. It’s generated and updated during terraform init as provider dependencies are resolved. This file does not store actual state values or resource IDs (those live in the Terraform state), and it doesn’t lock module versions—the latter are managed separately through module configuration and caches.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy