github fastly/terraform-provider-fastly v5.0.0

latest releases: v5.8.0, v5.7.3, v5.7.2...
11 months ago

5.0.0 (May 22, 2023)

BREAKING:

There was a long-standing issue with how Terraform reacted to the package.tar.gz file that the CLI produces. Effectively, hashing the package was inconsistent and caused Terraform to think the code had changed even when it hadn't.

To resolve the issue the Package API now returns a new metadata property (files_hash) that calculates the hash from a sorted list of the files within the package.

This PR updates the Terraform provider to use this new property instead of the original hashsum metadata property and exposes a new fastly_package_hash data source that will generate the appropriate value for the source_code_hash attribute.

Although the public interface has not changed, the underlying implementation changes have meant customers will no longer be able to use the previous approach of using filesha512 to generate a hash from their package file. So we must consider this PR a breaking change.

This does require a slight change to a customer's process, which prior to this release looked like this...

source_code_hash = filesha512("package.tar.gz")

As of this release, we recommend the use of the fastly_package_hash data source...

data "fastly_package_hash" "example" {
  filename = "./path/to/package.tar.gz"
}

resource "fastly_service_compute" "example" {
  # ...

  package {
    filename         = "./path/to/package.tar.gz"
    source_code_hash = data.fastly_package_hash.example.hash
  }
}
  • breaking(compute): fix package hash bug #698

Don't miss a new terraform-provider-fastly release

NewReleases is sending notifications on new releases.