Skip to content

Commit 1179b58

Browse files
chore: Updates Atlas Go SDK (#3638)
* build(deps): bump go.mongodb.org/atlas-sdk * renaming all methods * fix incorrect method usage * adjusting method name of last added cloud_provider_access_setup code --------- Co-authored-by: AgustinBettati <[email protected]> Co-authored-by: Agustin Bettati <[email protected]>
1 parent 76ef72a commit 1179b58

File tree

304 files changed

+682
-684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

304 files changed

+682
-684
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/huandu/xstrings v1.5.0
2525
github.com/jarcoal/httpmock v1.4.1
2626
github.com/mongodb-forks/digest v1.1.0
27-
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250825084037-c95a65f18752
27+
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250903083742-9deacb6fa6f2
2828
github.com/pb33f/libopenapi v0.25.8
2929
github.com/sebdah/goldie/v2 v2.7.1
3030
github.com/spf13/cast v1.9.2
@@ -42,7 +42,7 @@ require (
4242
require (
4343
github.com/hashicorp/terraform-json v0.26.0
4444
github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0
45-
go.mongodb.org/atlas-sdk/v20250312006 v20250312006.1.0
45+
go.mongodb.org/atlas-sdk/v20250312007 v20250312007.0.0
4646
)
4747

4848
require (

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,8 +1170,8 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx
11701170
github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM=
11711171
github.com/mongodb-forks/digest v1.1.0 h1:7eUdsR1BtqLv0mdNm4OXs6ddWvR4X2/OsLwdKksrOoc=
11721172
github.com/mongodb-forks/digest v1.1.0/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg=
1173-
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250825084037-c95a65f18752 h1:kvtucfKqJn7sIgBnuQQXmg4108KVIEmqRAD5o6lPN8c=
1174-
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250825084037-c95a65f18752/go.mod h1:pz4YlR9bUwsxcJMzUor4PKD4oCswIf8Kv9DQBbVQImU=
1173+
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250903083742-9deacb6fa6f2 h1:sYy63jcTe/R0HPLtPHeOello4MHTr2BILi31He85UHQ=
1174+
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250903083742-9deacb6fa6f2/go.mod h1:pz4YlR9bUwsxcJMzUor4PKD4oCswIf8Kv9DQBbVQImU=
11751175
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
11761176
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
11771177
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
@@ -1367,8 +1367,8 @@ go.mongodb.org/atlas-sdk/v20240805005 v20240805005.0.1-0.20250402112219-2468c535
13671367
go.mongodb.org/atlas-sdk/v20240805005 v20240805005.0.1-0.20250402112219-2468c5354718/go.mod h1:PeByRxdvzfvz7xhG5vDn60j836EoduWqTqs76okUc9c=
13681368
go.mongodb.org/atlas-sdk/v20241113005 v20241113005.0.0 h1:aaU2E4rtzYXuEDxv9MoSON2gOEAA9M2gsDf2CqjcGj8=
13691369
go.mongodb.org/atlas-sdk/v20241113005 v20241113005.0.0/go.mod h1:eV9REWR36iVMrpZUAMZ5qPbXEatoVfmzwT+Ue8yqU+U=
1370-
go.mongodb.org/atlas-sdk/v20250312006 v20250312006.1.0 h1:PcVxslw4G7/I9SbUi5y81i4YZnL1dKRnGpeHVyNSTh4=
1371-
go.mongodb.org/atlas-sdk/v20250312006 v20250312006.1.0/go.mod h1:UZYSaCimjGs3j+wMwgHSKUSIvoJXzmy/xrer0t5TLgo=
1370+
go.mongodb.org/atlas-sdk/v20250312007 v20250312007.0.0 h1:2k6eXWQzTpbc/maZotRIoyXq3l/pbCF1RBMt+WnuB0I=
1371+
go.mongodb.org/atlas-sdk/v20250312007 v20250312007.0.0/go.mod h1:X0dxrQP85ehgKo17F62j+L9UBKU+VrcDUqEz22/QjpA=
13721372
go.mongodb.org/realm v0.1.0 h1:zJiXyLaZrznQ+Pz947ziSrDKUep39DO4SfA0Fzx8M4M=
13731373
go.mongodb.org/realm v0.1.0/go.mod h1:4Vj6iy+Puo1TDERcoh4XZ+pjtwbOzPpzqy3Cwe8ZmDM=
13741374
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=

internal/common/conversion/flatten_expand.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package conversion
33
import (
44
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
55

6-
"go.mongodb.org/atlas-sdk/v20250312006/admin"
6+
"go.mongodb.org/atlas-sdk/v20250312007/admin"
77
)
88

99
func FlattenLinks(links []admin.Link) []map[string]string {

internal/common/conversion/tags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/hashicorp/terraform-plugin-framework/attr"
77
"github.com/hashicorp/terraform-plugin-framework/types"
8-
"go.mongodb.org/atlas-sdk/v20250312006/admin"
8+
"go.mongodb.org/atlas-sdk/v20250312007/admin"
99
)
1010

1111
func NewResourceTags(ctx context.Context, tags types.Map) *[]admin.ResourceTag {

internal/common/conversion/tags_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/hashicorp/terraform-plugin-framework/types"
88
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
99
"github.com/stretchr/testify/assert"
10-
"go.mongodb.org/atlas-sdk/v20250312006/admin"
10+
"go.mongodb.org/atlas-sdk/v20250312007/admin"
1111
)
1212

1313
func TestNewResourceTags(t *testing.T) {

internal/common/update/patch_payload_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/update"
99
"github.com/stretchr/testify/assert"
1010
"github.com/stretchr/testify/require"
11-
"go.mongodb.org/atlas-sdk/v20250312006/admin"
11+
"go.mongodb.org/atlas-sdk/v20250312007/admin"
1212
)
1313

1414
func TestPatchReplicationSpecs(t *testing.T) {

internal/config/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
1515
admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
1616
admin20241113 "go.mongodb.org/atlas-sdk/v20241113005/admin"
17-
"go.mongodb.org/atlas-sdk/v20250312006/admin"
17+
"go.mongodb.org/atlas-sdk/v20250312007/admin"
1818
matlasClient "go.mongodb.org/atlas/mongodbatlas"
1919
realmAuth "go.mongodb.org/realm/auth"
2020
"go.mongodb.org/realm/realm"

internal/config/transport_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func TestAccNetworkLogging(t *testing.T) {
170170
require.True(t, ok)
171171

172172
// Make a simple API call that should trigger our enhanced logging
173-
_, _, err = client.AtlasV2.OrganizationsApi.ListOrganizations(t.Context()).Execute()
173+
_, _, err = client.AtlasV2.OrganizationsApi.ListOrgs(t.Context()).Execute()
174174
require.NoError(t, err)
175175
logStr := logOutput.String()
176176
assert.Contains(t, logStr, "Network Request Start")

internal/service/accesslistapikey/data_source_accesslist_api_key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func dataSourceRead(ctx context.Context, d *schema.ResourceData, meta any) diag.
5858
orgID := d.Get("org_id").(string)
5959
apiKeyID := d.Get("api_key_id").(string)
6060
ipAddress := d.Get("ip_address").(string)
61-
accessListAPIKey, _, err := connV2.ProgrammaticAPIKeysApi.GetApiKeyAccessList(ctx, orgID, ipAddress, apiKeyID).Execute()
61+
accessListAPIKey, _, err := connV2.ProgrammaticAPIKeysApi.GetOrgAccessEntry(ctx, orgID, ipAddress, apiKeyID).Execute()
6262
if err != nil {
6363
return diag.FromErr(fmt.Errorf("error getting access list api key information: %s", err))
6464
}

internal/service/accesslistapikey/data_source_accesslist_api_keys.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
1111
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
1212

13-
"go.mongodb.org/atlas-sdk/v20250312006/admin"
13+
"go.mongodb.org/atlas-sdk/v20250312007/admin"
1414
)
1515

1616
func PluralDataSource() *schema.Resource {
@@ -73,13 +73,13 @@ func dataSourcePluralRead(ctx context.Context, d *schema.ResourceData, meta any)
7373
connV2 := meta.(*config.MongoDBClient).AtlasV2
7474
orgID := d.Get("org_id").(string)
7575
apiKeyID := d.Get("api_key_id").(string)
76-
params := &admin.ListApiKeyAccessListsEntriesApiParams{
76+
params := &admin.ListOrgAccessEntriesApiParams{
7777
PageNum: conversion.IntPtr(d.Get("page_num").(int)),
7878
ItemsPerPage: conversion.IntPtr(d.Get("items_per_page").(int)),
7979
OrgId: orgID,
8080
ApiUserId: apiKeyID,
8181
}
82-
accessListAPIKeys, _, err := connV2.ProgrammaticAPIKeysApi.ListApiKeyAccessListsEntriesWithParams(ctx, params).Execute()
82+
accessListAPIKeys, _, err := connV2.ProgrammaticAPIKeysApi.ListOrgAccessEntriesWithParams(ctx, params).Execute()
8383
if err != nil {
8484
return diag.FromErr(fmt.Errorf("error getting access list api keys information: %s", err))
8585
}

0 commit comments

Comments
 (0)