Terraform Lock File

Terraform version 0.14 and above is using a dependency lock file called .terraform.lock.hcl. This file is created when terraform init is executed. This file is used to track the versions of providers and modules, hence the whole team and automation will be able to use the correct version in all times.

It is ideal to keep this file under version controll. Terraform will update the the lockfile, when you make changes to the provider or module requirements.

Last updated