Terraform

.terraform.lock.hcl (dependency lock file)

Definition

A file automatically generated by terraform init that pins the exact versions and checksums of the providers used, ensuring all team members and CI pipelines use exactly the same versions.

Exam context

In Terraform Associate the good practice tested is keeping it under version control (git), just like a package-lock.json. terraform init -upgrade updates the lock file while respecting the version constraints defined in required_providers.

Related terms

Studying for the Terraform Associate?

.terraform.lock.hcl (dependency lock file) is a concept that can show up on the exam. Check the full guide to see it in context.