Skip to content

Commit

Permalink
build(deps): Upgrade to Go 1.22 for building provider.
Browse files Browse the repository at this point in the history
* Includes updates to the latest versions of terraform-plugin-sdk
and terraform-plugin-docs.

* Includes update to actions/cache version 4 in Actions workflows.

* Includes update to goreleaser/goreleaser-action version 6 in Actions workflows.

* Pins goreleaser to v2.2.0 as that was the last version which supported Go 1.22.
  • Loading branch information
kpfleming committed Nov 12, 2024
1 parent 03aab15 commit 7f59651
Show file tree
Hide file tree
Showing 314 changed files with 16,814 additions and 11,786 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.22.x
- name: Restore cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
Expand All @@ -29,7 +29,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.20.x]
go-version: [1.22.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -40,7 +40,7 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- name: Restore cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.22.x
- name: Generate Docs
run: |
make generate-docs
Expand All @@ -78,9 +78,9 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.22.x
- name: Restore cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
Expand Down Expand Up @@ -128,9 +128,9 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.22.x
- name: Restore cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
Expand Down Expand Up @@ -187,9 +187,9 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.22.x
- name: Restore cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.22.x
- name: Import GPG key
id: import_gpg
uses: fastly/[email protected]
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: v1.21.2 # Last version to support Go 1.20.x
version: 'v2.2.0'
args: release --clean
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ fmtcheck:
errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"

# v2.2.0 was the last goreleaser version to support Go 1.22
goreleaser-bin:
@# This is the last version of goreleaser that supports Go 1.20.14 (the version used to build the provider)
$(GO_BIN) install github.com/goreleaser/[email protected]
$(GO_BIN) install github.com/goreleaser/goreleaser/[email protected]

nilaway:
@nilaway ./...
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Requirements

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

> 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)
Expand All @@ -30,7 +30,7 @@ $ make build

## Developing the Provider

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*).
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.22.x is *required*).

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

Expand Down
37 changes: 20 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
module github.com/fastly/terraform-provider-fastly

go 1.20
go 1.22.7

toolchain go1.22.9

require (
github.com/bflad/tfproviderlint v0.30.0
github.com/fastly/go-fastly/v9 v9.12.0
github.com/google/go-cmp v0.6.0
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-plugin-docs v0.19.4
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
github.com/hashicorp/terraform-plugin-docs v0.20.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0
github.com/stretchr/testify v1.8.4
golang.org/x/net v0.31.0
)
Expand All @@ -25,7 +27,7 @@ require (
github.com/armon/go-radix v1.0.0 // indirect
github.com/bflad/gopaniccheck v0.1.0 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.16.0 // indirect
Expand All @@ -37,17 +39,18 @@ require (
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-plugin v1.6.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hc-install v0.7.0 // indirect
github.com/hashicorp/hcl/v2 v2.20.1 // indirect
github.com/hashicorp/hc-install v0.9.0 // indirect
github.com/hashicorp/hcl/v2 v2.22.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.22.1 // indirect
github.com/hashicorp/terraform-plugin-go v0.23.0 // indirect
github.com/hashicorp/terraform-json v0.23.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.25.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
Expand All @@ -71,21 +74,21 @@ require (
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yuin/goldmark v1.7.1 // indirect
github.com/yuin/goldmark v1.7.7 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
github.com/zclconf/go-cty v1.15.0 // indirect
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
golang.org/x/tools v0.22.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.34.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 7f59651

Please sign in to comment.