diff --git a/CHANGELOG.md b/CHANGELOG.md index aafd1951f..f0498491c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ * Add support for team notification configurations @notchairmk [#1016](https://github.com/hashicorp/go-tfe/pull/1016) +## Bug Fixes + +* Fixes a bug in BETA support for Linux arm64 agents, which is EXPERIMENTAL, SUBJECT TO CHANGE, and may not be available to all users @natalie-todd [#1022](https://github.com/hashicorp/go-tfe/pull/1022) + # v1.72.0 ## Enhancements diff --git a/admin_terraform_version.go b/admin_terraform_version.go index 78d75ce14..e1d00561f 100644 --- a/admin_terraform_version.go +++ b/admin_terraform_version.go @@ -63,10 +63,10 @@ type AdminTerraformVersion struct { } type ToolVersionArchitecture struct { - URL string `jsonapi:"attr,url"` - Sha string `jsonapi:"attr,sha"` - OS string `jsonapi:"attr,os"` - Arch string `jsonapi:"attr,arch"` + URL string `json:"url"` + Sha string `json:"sha"` + OS string `json:"os"` + Arch string `json:"arch"` } // AdminTerraformVersionsListOptions represents the options for listing @@ -168,7 +168,6 @@ func (a *adminTerraformVersions) Create(ctx context.Context, options AdminTerraf if err != nil { return nil, err } - return tfv, nil } diff --git a/admin_terraform_version_integration_test.go b/admin_terraform_version_integration_test.go index 39e64006b..dfd79baca 100644 --- a/admin_terraform_version_integration_test.go +++ b/admin_terraform_version_integration_test.go @@ -100,25 +100,28 @@ func TestAdminTerraformVersions_CreateDelete(t *testing.T) { client := testClient(t) ctx := context.Background() - version := genSafeRandomTerraformVersion() t.Run("with valid options", func(t *testing.T) { - sha := String(genSha(t)) opts := AdminTerraformVersionCreateOptions{ - Version: String(version), - URL: String("https://www.hashicorp.com"), - Sha: sha, + Version: String(genSafeRandomTerraformVersion()), Deprecated: Bool(true), DeprecatedReason: String("Test Reason"), Official: Bool(false), Enabled: Bool(false), Beta: Bool(false), - Archs: []*ToolVersionArchitecture{{ - URL: "https://www.hashicorp.com", - Sha: *sha, - OS: linux, - Arch: amd64, - }}, + Archs: []*ToolVersionArchitecture{ + { + URL: "https://www.hashicorp.com", + Sha: *String(genSha(t)), + OS: linux, + Arch: amd64, + }, + { + URL: "https://www.hashicorp.com", + Sha: *String(genSha(t)), + OS: linux, + Arch: arm64, + }}, } tfv, err := client.Admin.TerraformVersions.Create(ctx, opts) require.NoError(t, err)