Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to Go 1.19 #1163

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/NOTES-20230303-111728.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: NOTES
body: This Go module has been updated to Go 1.19 per the [Go support policy](https://golang.org/doc/devel/release.html#policy).
Any consumers building on earlier Go versions may experience errors.
time: 2023-03-03T11:17:28.204303Z
custom:
Issue: "1163"
2 changes: 1 addition & 1 deletion .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.19', '1.18' ]
go-version: [ '1.20', '1.19' ]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ When running provider tests, Terraform 0.12.26 or later is needed for version 2.

This project follows the [support policy](https://golang.org/doc/devel/release.html#policy) of Go as its support policy. The two latest major releases of Go are supported by the project.

Currently, that means Go **1.18** or later must be used when including this project as a dependency.
Currently, that means Go **1.19** or later must be used when including this project as a dependency.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/terraform-plugin-sdk/v2

go 1.18
go 1.19

require (
github.com/google/go-cmp v0.5.9
Expand Down
15 changes: 8 additions & 7 deletions website/docs/plugin/sdkv2/testing/acceptance-tests/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Create a [GitHub Actions workflow](https://docs.github.com/en/actions/using-work

Use the [`matrix`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix) strategy for more advanced configuration, such as running acceptance testing against multiple Terraform CLI versions.

The following example workflow runs acceptance testing for the provider using the latest patch versions of Go 1.18 and Terraform CLI 1.2:
The following example workflow runs acceptance testing for the provider using the latest patch versions of Go 1.19 and Terraform CLI 1.3:

```yaml
name: Terraform Provider Tests
Expand All @@ -165,10 +165,10 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: '1.2.*'
terraform_version: '1.3.*'
terraform_wrapper: false
- run: go test -v -cover ./...
env:
Expand All @@ -180,12 +180,12 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- run: go test -v -cover ./...
```


The following example workflow runs acceptance testing for the provider using the latest patch versions of Go 1.18 and Terraform CLI 0.12 through 1.2:
The following example workflow runs acceptance testing for the provider using the latest patch versions of Go 1.19 and Terraform CLI 0.12 through 1.3:

```yaml
name: Terraform Provider Tests
Expand Down Expand Up @@ -215,11 +215,12 @@ jobs:
- '1.0.*'
- '1.1.*'
- '1.2.*'
- '1.3.*'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform-version }}
Expand All @@ -234,7 +235,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- run: go test -v -cover ./...
```

Expand Down