From 00743da225eed163404e0453b831a469f0a0dcec Mon Sep 17 00:00:00 2001 From: Benjamin Bennett Date: Fri, 3 Mar 2023 11:18:38 +0000 Subject: [PATCH] Updating to Go 1.19 (#1162) --- .changes/unreleased/NOTES-20230303-111728.yaml | 6 ++++++ .github/workflows/ci-go.yml | 2 +- README.md | 2 +- go.mod | 2 +- .../sdkv2/testing/acceptance-tests/index.mdx | 15 ++++++++------- 5 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 .changes/unreleased/NOTES-20230303-111728.yaml diff --git a/.changes/unreleased/NOTES-20230303-111728.yaml b/.changes/unreleased/NOTES-20230303-111728.yaml new file mode 100644 index 0000000000..39d177df7e --- /dev/null +++ b/.changes/unreleased/NOTES-20230303-111728.yaml @@ -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" diff --git a/.github/workflows/ci-go.yml b/.github/workflows/ci-go.yml index d717a5c386..d77c62abb0 100644 --- a/.github/workflows/ci-go.yml +++ b/.github/workflows/ci-go.yml @@ -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 diff --git a/README.md b/README.md index 43e21ffc44..5125ae372b 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/go.mod b/go.mod index 267b2aea49..80a6426a12 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/website/docs/plugin/sdkv2/testing/acceptance-tests/index.mdx b/website/docs/plugin/sdkv2/testing/acceptance-tests/index.mdx index c0d73962e0..34c7710c6d 100644 --- a/website/docs/plugin/sdkv2/testing/acceptance-tests/index.mdx +++ b/website/docs/plugin/sdkv2/testing/acceptance-tests/index.mdx @@ -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 @@ -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: @@ -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 @@ -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 }} @@ -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 ./... ```