Terraform v1.4.0-beta2 is released

Hi everyone!

Today the Terraform team has released Terraform v1.4.0-beta2, which continues the prerelease period for the v1.4.0 release.

We’d be very grateful if folks would carefully test this beta and let us know in a bug report issue if you see anything unexpected or broken.

As usual, we don’t recommend running terraform apply or other commands that might create new state snapshots and modify infrastructure using the beta version. Although we have not made any significant changes to the state format in this release, we’d prefer to minimize the risk of anyone getting “stuck” on the beta and unable to return to their previous stable release.

This release consists mainly of internal design changes to improve the maintainability and robustness of Terraform CLI and Terraform Core and so general careful use of terraform init and terraform plan might help expose any unexpected impacts.

Plan Output Renderer Changes

The most significant internal change in this release is a rewrite of the code which generates a description of the proposed changes in terraform plan and terraform apply.

If you would like to try this new codepath and make sure it is still working for your configuration then some steps like the following should exercise it:

  1. Check out your configuration into a fresh working directory so that the following steps won’t modify anything in the working directory you normally use.
  2. Install Terraform v1.4.0-beta2 on your system using one of the official release packages.
  3. Using that new version of Terraform, run terraform init to initialize your working directory and install the needed dependencies.
  4. Run terraform plan to generate a new plan, and let us know if it fails with a new error that you didn’t see on older versions or if anything in the output seems unexpected.

Of course terraform plan will typically only present changes when there are changes to make, so it might be necessary to make a hypothetical change to your configuration before you run terraform plan so that there will be some changes to render, or to temporarily disable your usual backend and plan with an empty local state to see the full set of “create” actions for your configuration.

We appreciate any feedback from the beta release. Although we have tested these changes as much as we can, we rely on beta feedback to catch less common situations that might arise in private Terraform codebases that we cannot see.

Dependency Lock File Changes

Another change we’d like to draw attention to is that terraform init should now update the dependency lock file with the official checksums of any provider that you had previously installed from your local plugin cache directory. This addresses a long-standing problem where because the cache only contains the package for the current platform Terraform could not then populate checksums for any other platforms.

If you use the plugin_cache_dir setting in your CLI configuration then you may see terraform init propose to add new checksums to some of the blocks in .terraform.lock.hcl. If you review those in the same way you’d review checksums for any new provider then it’s safe to check those updates in to your version control now – the expected syntax of the lock file hasn’t changed in any way – but it’s also reasonable to ignore those changes until we reach v1.4.0 final.

This change doesn’t affect installation from explicitly-configured local filesystem or network mirrors. Those will still record only the checksums obtained from the mirror, because some organizations use mirrors as a way to distribute private forks of providers and so it would not be appropriate to prefer the upstream checksums in that case.

If all goes to plan we’re expecting that the next release in the prerelease period will be release candidate 1, but we may adjust that plan depending on what feedback we hear from beta testers.

Thanks in advance for any testing you do and any feedback you send us!