Skip to content

Commit 9821c16

Browse files
committed
v5.0.0 (#699)
1 parent 2fd5383 commit 9821c16

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
1-
## 4.4.0 (Unreleased)
1+
## 5.1.0 (Unreleased)
2+
3+
## 5.0.0 (May 22, 2023)
4+
5+
BREAKING:
6+
7+
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.
8+
9+
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.
10+
11+
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.
12+
13+
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.
14+
15+
This does require a slight change to a customer's process, which prior to this release looked like this...
16+
17+
```tf
18+
source_code_hash = filesha512("package.tar.gz")
19+
```
20+
21+
As of this release, we recommend the use of the `fastly_package_hash` data source...
22+
23+
```tf
24+
data "fastly_package_hash" "example" {
25+
filename = "./path/to/package.tar.gz"
26+
}
27+
28+
resource "fastly_service_compute" "example" {
29+
# ...
30+
31+
package {
32+
filename = "./path/to/package.tar.gz"
33+
source_code_hash = data.fastly_package_hash.example.hash
34+
}
35+
}
36+
```
37+
38+
* breaking(compute): fix package hash bug [#698](https://github.com/fastly/terraform-provider-fastly/pull/698)
239

340
## 4.3.3 (May 12, 2023)
441

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ terraform {
2525
required_providers {
2626
fastly = {
2727
source = "fastly/fastly"
28-
version = ">= 4.3.3"
28+
version = ">= 5.0.0"
2929
}
3030
}
3131
}

0 commit comments

Comments
 (0)