Skip to content
Captain's Academy0
← Terraform sea chart
Island 4 · Providers · Port 4.3

The dependency lock file

Ask the Captain
Instagram
Same code, two laptops, two different provider versions. Unless...
You'll learn to

explain .terraform.lock.hcl, why it's committed, and upgrade with init -upgrade

Recap

  1. 1.terraform.lock.hcl records the exact provider versions + hashes
  2. 2init reuses the locked version. Commit the file
  3. 3Upgrade on purpose with terraform init -upgrade. Providers only, not modules
Check yourself

A newer provider version is out. You run terraform init. What gets installed?

4.3

Stamp this lesson

Watched it and passed the check? Mark it in your logbook.