How to add, use, and update `.terraform.lock.hcl` without pain
This is the first guest article in this blog. This is one is by Maksym Vlasov - my co-author of the CatOps channel. Pre-history As you may know, Terraform 1.4.0 has introduced changes, which break the previous unintentional behavior. Previously, you could ignore the lockfile and use cached providers as long as the version constraints in the code were okay with your local cache. Starting from 1.4.0, Terraform always checks the lockfile before going into your cache directory. In practice, it means that if you ignore the lockfile or remove it completely, Terraform will run full init, no matter what is in your TF_CACHE_DIR or the .terraform directory. ...