Skip to content

Commit 080b418

Browse files
committed
v5.7.0 (#815)
* build: bump go version to 1.20 * doc(CHANGELOG): v5.7.0 * fix: replace math/rand with crypto/rand * build: use gorelease 1.21.2 * ci: bump go to 1.20.x
1 parent bd8c5ac commit 080b418

9 files changed

+397
-367
lines changed

.github/workflows/pr.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Install Go
1313
uses: actions/setup-go@v5
1414
with:
15-
go-version: 1.19.x
15+
go-version: 1.20.x
1616
- name: Restore cache
1717
uses: actions/cache@v3
1818
with:
@@ -29,7 +29,7 @@ jobs:
2929
test:
3030
strategy:
3131
matrix:
32-
go-version: [1.19.x]
32+
go-version: [1.20.x]
3333
platform: [ubuntu-latest, macos-latest, windows-latest]
3434
runs-on: ${{ matrix.platform }}
3535
steps:
@@ -58,7 +58,7 @@ jobs:
5858
- name: Install Go
5959
uses: actions/setup-go@v5
6060
with:
61-
go-version: 1.19.x
61+
go-version: 1.20.x
6262
- name: Generate Docs
6363
run: |
6464
make generate-docs
@@ -78,7 +78,7 @@ jobs:
7878
- name: Install Go
7979
uses: actions/setup-go@v5
8080
with:
81-
go-version: 1.19.x
81+
go-version: 1.20.x
8282
- name: Restore cache
8383
uses: actions/cache@v3
8484
with:
@@ -128,7 +128,7 @@ jobs:
128128
- name: Install Go
129129
uses: actions/setup-go@v5
130130
with:
131-
go-version: 1.19.x
131+
go-version: 1.20.x
132132
- name: Restore cache
133133
uses: actions/cache@v3
134134
with:
@@ -187,7 +187,7 @@ jobs:
187187
- name: Install Go
188188
uses: actions/setup-go@v5
189189
with:
190-
go-version: 1.19.x
190+
go-version: 1.20.x
191191
- name: Restore cache
192192
uses: actions/cache@v3
193193
with:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Go
2424
uses: actions/setup-go@v5
2525
with:
26-
go-version: 1.19.x
26+
go-version: 1.20.x
2727
- name: Import GPG key
2828
id: import_gpg
2929
uses: fastly/[email protected]

CHANGELOG.md

+372-345
Large diffs are not rendered by default.

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ errcheck:
8181
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"
8282

8383
goreleaser-bin:
84-
go install github.com/goreleaser/[email protected]
84+
@# This is the last version of goreleaser that supports Go 1.20.14 (the version used to build the provider)
85+
go install github.com/goreleaser/[email protected]
8586

8687
nilaway:
8788
@nilaway ./...

README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
- Mailing list: http://groups.google.com/group/terraform-tool
66
- [![Gitter chat](https://badges.gitter.im/hashicorp-terraform/Lobby.png)](https://gitter.im/hashicorp-terraform/Lobby)
77

8-
Requirements
9-
------------
8+
## Requirements
109

11-
- [Terraform](https://www.terraform.io/downloads.html) 0.12.x or higher
12-
- [Go](https://golang.org/doc/install) 1.18 (to build the provider plugin)
10+
- [Terraform](https://www.terraform.io/downloads.html) 0.12.x or higher
11+
- [Go](https://golang.org/doc/install) 1.20 (to build the provider plugin)
1312

1413
> NOTE: the last version of the Fastly provider to support Terraform 0.11.x and below was [v0.26.0](https://github.com/fastly/terraform-provider-fastly/releases/tag/v0.26.0)
1514
@@ -31,7 +30,7 @@ $ make build
3130

3231
## Developing the Provider
3332

34-
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.18+ is *required*).
33+
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.20+ is *required*).
3534

3635
To compile the provider, run `make build`. This will build the provider and put the provider binary in a local `bin` directory.
3736

@@ -43,7 +42,7 @@ $ make build
4342
Alongside the newly built binary a file called `developer_overrides.tfrc` will be created. The `make build` target will communicate
4443
back details for setting the `TF_CLI_CONFIG_FILE` environment variable that will enable Terraform to use your locally built provider binary.
4544

46-
* HashiCorp - [Development Overrides for Provider developers](https://www.terraform.io/docs/cli/config/config-file.html#development-overrides-for-provider-developers).
45+
- HashiCorp - [Development Overrides for Provider developers](https://www.terraform.io/docs/cli/config/config-file.html#development-overrides-for-provider-developers).
4746

4847
> **NOTE**: If you have issues seeing any behaviours from code changes you've made to the provider, then it might be the terraform CLI is getting confused by which provider binary it should be using. Check inside the `./bin/` directory to see if there are multiple providers with different commit hashes (e.g. `terraform-provider-fastly_v2.2.0-5-gfdc37cee`) and delete them first before running `make build`. This should help the Terraform CLI resolve to the correct binary.
4948
@@ -87,6 +86,7 @@ Then use Terraform as usual, and it will automatically use the provider in the d
8786
$ export TF_REATTACH_PROVIDERS='{"fastly/fastly":{"Protocol":"grpc","Pid":54132,"Test":true,"Addr":{"Network":"unix","String":"/var/folders/qm/swg2hf4h5t8sdht8yhds4dg6m0000gn/T/plugin865249851"}}}'
8887
$ terraform plan
8988
```
89+
9090
You will then be able to set breakpoints and trace the provider's execution using the debugger as you would expect.
9191

9292
The implementation for setting up debug mode presumes Terraform 0.13.x is being used. If you're using Terraform 0.12.x you'll need to manually modify the value assigned to `TF_REATTACH_PROVIDERS` so that the key `"fastly/fastly"` becomes `"registry.terraform.io/-/fastly"`. See HashiCorp's ["Support for Debuggable Provider Binaries"](https://www.terraform.io/docs/extend/guides/v2-upgrade-guide.html#support-for-debuggable-provider-binaries) for more details.
@@ -160,18 +160,20 @@ Building the documentation copies the full markdown into the `docs` folder, read
160160

161161
> NOTE: you'll need the [`tfplugindocs`](https://github.com/hashicorp/terraform-plugin-docs) tool for generating the Markdown to be deployed to Hashicorp. For more information on generating documentation, refer to https://www.terraform.io/docs/registry/providers/docs.html
162162
163-
* To validate the `/template` directory structure:
163+
- To validate the `/template` directory structure:
164+
164165
```
165166
make validate-docs
166167
```
167168

168-
* To build the `/docs` documentation Markdown files:
169+
- To build the `/docs` documentation Markdown files:
170+
169171
```
170172
make generate-docs
171173
```
172174

173-
* To view the documentation:
174-
Paste `/docs` Markdown file content into https://registry.terraform.io/tools/doc-preview
175+
- To view the documentation:
176+
Paste `/docs` Markdown file content into https://registry.terraform.io/tools/doc-preview
175177

176178
## Contributing
177179

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ terraform {
2525
required_providers {
2626
fastly = {
2727
source = "fastly/fastly"
28-
version = ">= 5.6.0"
28+
version = ">= 5.7.0"
2929
}
3030
}
3131
}

fastly/data_source_services_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package fastly
22

33
import (
4+
"crypto/rand"
45
"encoding/hex"
56
"fmt"
6-
"math/rand"
77
"testing"
88

99
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"

fastly/resource_fastly_service_authorization_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package fastly
22

33
import (
4+
"crypto/rand"
45
"encoding/hex"
56
"fmt"
6-
"math/rand"
77
"testing"
88

99
gofastly "github.com/fastly/go-fastly/v9/fastly"

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/fastly/terraform-provider-fastly
22

3-
go 1.18
3+
go 1.20
44

55
require (
66
github.com/bflad/tfproviderlint v0.29.0

0 commit comments

Comments
 (0)