Terraform 0.14 Introduces a Dependency Lock File for Providers

Terraform 0.14 introduces a new dependency lock file, focused on providers, to simplify managing Terraform automation. Starting in Terraform 0.13, the possibility to install providers from customer-controlled or third-party remote registries increases the need to be able to replicate Terraform runs in automation. These remote and automated Terraform workflows need to be able to duplicate previous runs exactly.

The dependency lock file launching with Terraform 0.14 is generated automatically when Terraform init is run. The generated lockfile should be committed into version control systems so that Terraform can guarantee to select exactly the same provider versions on future runs.

Upgrading to a new provider (or collection of providers) can be completed via terraform init -upgrade.

Example of a lockfile entry:

provider "registry.terraform.io/hashicorp/azurerm" {
  version     = "2.30.0"
  constraints = "~> 2.12"
  hashes = [

If you don’t want to use this new behavior you can run terraform init -upgrade and/or to discard .terraform.lock immediately after it is created. The lockfile can equally be added to a list of files ignored by version control.

Getting Started with the Terraform 0.14 Beta

Here is where to find important getting started information about Terraform 0.14:

To get started using Terraform 0.14:

  • Download the latest Terraform 0.14 beta release.
  • If you are upgrading from a previous release, read the draft upgrade guide to learn about taking advantage of Terraform 0.14’s new features

As with all pre-release builds, remember that v0.14.0-beta1 may still contain bugs and it should not be used in a production setting. We welcome your feedback on the beta. If you run into an issue, please file a new bug report in GitHub. Please check the known issues list before filing to see if your issue has already been reported.

To evaluate Terraform 0.14 betas as part of your Terraform Cloud workflow, please write to support@hashicorp.com to have Terraform beta access added to your organization.

Read more here: https://www.hashicorp.com/blog/terraform-0-14-introduces-a-dependency-lock-file-for-providers

Content Attribution

This content was originally published by Kerim Satirli at HashiCorp Blog, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: