diff --git a/cfn-resources/database-user/cmd/resource/resource.go b/cfn-resources/database-user/cmd/resource/resource.go index 6b3b2d0a7..28448d7e5 100644 --- a/cfn-resources/database-user/cmd/resource/resource.go +++ b/cfn-resources/database-user/cmd/resource/resource.go @@ -26,7 +26,7 @@ import ( "github.com/mongodb/mongodbatlas-cloudformation-resources/util/logger" "github.com/mongodb/mongodbatlas-cloudformation-resources/util/progressevent" "github.com/mongodb/mongodbatlas-cloudformation-resources/util/validator" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" ) var CreateRequiredFields = []string{constants.DatabaseName, constants.ProjectID, constants.Roles, constants.Username} diff --git a/cfn-resources/flex-cluster/cmd/resource/resource.go b/cfn-resources/flex-cluster/cmd/resource/resource.go index ebee444fc..164678fd6 100644 --- a/cfn-resources/flex-cluster/cmd/resource/resource.go +++ b/cfn-resources/flex-cluster/cmd/resource/resource.go @@ -23,7 +23,7 @@ import ( "github.com/mongodb/mongodbatlas-cloudformation-resources/util/validator" "github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" ) const callBackSeconds = 10 diff --git a/cfn-resources/flex-cluster/cmd/resource/share.go b/cfn-resources/flex-cluster/cmd/resource/share.go index 15318e6e1..48b3e66c2 100644 --- a/cfn-resources/flex-cluster/cmd/resource/share.go +++ b/cfn-resources/flex-cluster/cmd/resource/share.go @@ -20,7 +20,7 @@ import ( "github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler" "github.com/mongodb/mongodbatlas-cloudformation-resources/util" "github.com/mongodb/mongodbatlas-cloudformation-resources/util/constants" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" ) var callbackContext = map[string]any{"callbackFlex": true} diff --git a/cfn-resources/go.mod b/cfn-resources/go.mod index d91ecac56..95ffbbc3c 100644 --- a/cfn-resources/go.mod +++ b/cfn-resources/go.mod @@ -24,7 +24,7 @@ require ( github.com/tidwall/pretty v1.2.1 go.mongodb.org/atlas-sdk/v20231115002 v20231115002.1.0 go.mongodb.org/atlas-sdk/v20231115014 v20231115014.0.0 - go.mongodb.org/atlas-sdk/v20250312006 v20250312006.1.0 + go.mongodb.org/atlas-sdk/v20250312010 v20250312010.0.0 ) require ( @@ -57,7 +57,7 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/woodsbury/decimal128 v1.3.0 // indirect go.mongodb.org/atlas v0.37.0 // indirect - golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/oauth2 v0.32.0 // indirect gopkg.in/validator.v2 v2.0.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/cfn-resources/go.sum b/cfn-resources/go.sum index d07c94166..ffa398ead 100644 --- a/cfn-resources/go.sum +++ b/cfn-resources/go.sum @@ -111,10 +111,10 @@ go.mongodb.org/atlas v0.37.0 h1:zQnO1o5+bVP9IotpAYpres4UjMD2F4nwNEFTZhNL4ck= go.mongodb.org/atlas v0.37.0/go.mod h1:DJYtM+vsEpPEMSkQzJnFHrT0sP7ev6cseZc/GGjJYG8= go.mongodb.org/atlas-sdk/v20231115002 v20231115002.1.0 h1:x6nnq2pUIP9mN4WLD4/EseBzV88OmSgexxYchPilgno= go.mongodb.org/atlas-sdk/v20231115002 v20231115002.1.0/go.mod h1:el7cm23kEiiw72HAYimhNweKqp/ubHsNJk+Mk30yJhM= -go.mongodb.org/atlas-sdk/v20250312006 v20250312006.1.0 h1:PcVxslw4G7/I9SbUi5y81i4YZnL1dKRnGpeHVyNSTh4= -go.mongodb.org/atlas-sdk/v20250312006 v20250312006.1.0/go.mod h1:UZYSaCimjGs3j+wMwgHSKUSIvoJXzmy/xrer0t5TLgo= -golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= -golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +go.mongodb.org/atlas-sdk/v20250312010 v20250312010.0.0 h1:HEwlbiUWphcPZIzsNn+OLKvfGnYMXePrzmO1aMYQj00= +go.mongodb.org/atlas-sdk/v20250312010 v20250312010.0.0/go.mod h1:fCic2XAoTsxll8WGkUB9uEoMewxekfJ3kqR7pGA7frU= +golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= +golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/cfn-resources/organization/cmd/resource/resource.go b/cfn-resources/organization/cmd/resource/resource.go index 2af0177e2..535bb6b6e 100644 --- a/cfn-resources/organization/cmd/resource/resource.go +++ b/cfn-resources/organization/cmd/resource/resource.go @@ -21,7 +21,7 @@ import ( "net/http" "time" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" "github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler" "github.com/aws/aws-sdk-go-v2/service/cloudformation/types" @@ -100,7 +100,7 @@ func Create(req handler.Request, prevModel *Model, currentModel *Model) (handler if currentModel.FederatedSettingsId != nil { orgInput.FederationSettingsId = currentModel.FederatedSettingsId } - org, response, err := conn.OrganizationsApi.CreateOrganization(ctx, orgInput).Execute() + org, response, err := conn.OrganizationsApi.CreateOrg(ctx, orgInput).Execute() if err != nil { return handleError(response, constants.CREATE, err) } @@ -124,7 +124,7 @@ func Create(req handler.Request, prevModel *Model, currentModel *Model) (handler return *peErr, nil } conn = newOrgClient.AtlasSDK - if _, _, errUpdate := conn.OrganizationsApi.UpdateOrganizationSettings(ctx, orgID, newOrganizationSettings(currentModel)).Execute(); errUpdate != nil { + if _, _, errUpdate := conn.OrganizationsApi.UpdateOrgSettings(ctx, orgID, newOrganizationSettings(currentModel)).Execute(); errUpdate != nil { return handleError(response, constants.CREATE, err) } @@ -175,11 +175,11 @@ func Update(req handler.Request, prevModel *Model, currentModel *Model) (handler setDefaultsIfNotDefined(currentModel) atlasOrg := admin.AtlasOrganization{Id: currentModel.OrgId, Name: *currentModel.Name, SkipDefaultAlertsSettings: currentModel.SkipDefaultAlertsSettings} - if _, response, err := conn.OrganizationsApi.UpdateOrganization(ctx, *currentModel.OrgId, &atlasOrg).Execute(); err != nil { + if _, response, err := conn.OrganizationsApi.UpdateOrg(ctx, *currentModel.OrgId, &atlasOrg).Execute(); err != nil { return handleError(response, constants.UPDATE, err) } - if _, response, err := conn.OrganizationsApi.UpdateOrganizationSettings(ctx, *currentModel.OrgId, newOrganizationSettings(currentModel)).Execute(); err != nil { + if _, response, err := conn.OrganizationsApi.UpdateOrgSettings(ctx, *currentModel.OrgId, newOrganizationSettings(currentModel)).Execute(); err != nil { return handleError(response, constants.UPDATE, err) } @@ -221,7 +221,7 @@ func Delete(req handler.Request, prevModel *Model, currentModel *Model) (handler return handleError(response, constants.DELETE, err) } - deleteRequest := conn.OrganizationsApi.DeleteOrganization(ctx, *currentModel.OrgId) + deleteRequest := conn.OrganizationsApi.DeleteOrg(ctx, *currentModel.OrgId) // Since the Delete API is synchronous and takes more than 1 minute most of the time, // we need to make the call in a goroutine and return a progress event @@ -298,7 +298,7 @@ func List(req handler.Request, prevModel *Model, currentModel *Model) (handler.P } func (model *Model) getOrgDetails(ctx context.Context, conn *admin.APIClient, currentModel *Model) (responseModel *Model, response *http.Response, err error) { - org, response, err := conn.OrganizationsApi.GetOrganization(ctx, *currentModel.OrgId).Execute() + org, response, err := conn.OrganizationsApi.GetOrg(ctx, *currentModel.OrgId).Execute() if err != nil { return nil, response, err } @@ -307,7 +307,7 @@ func (model *Model) getOrgDetails(ctx context.Context, conn *admin.APIClient, cu model.IsDeleted = org.IsDeleted model.SkipDefaultAlertsSettings = org.SkipDefaultAlertsSettings - settings, _, err := conn.OrganizationsApi.GetOrganizationSettings(ctx, org.GetId()).Execute() + settings, _, err := conn.OrganizationsApi.GetOrgSettings(ctx, org.GetId()).Execute() if err != nil { return nil, response, err } diff --git a/cfn-resources/resource-policy/cmd/resource/mappings.go b/cfn-resources/resource-policy/cmd/resource/mappings.go index abddcc624..1a90cbf8e 100644 --- a/cfn-resources/resource-policy/cmd/resource/mappings.go +++ b/cfn-resources/resource-policy/cmd/resource/mappings.go @@ -15,7 +15,7 @@ package resource import ( - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" "github.com/mongodb/mongodbatlas-cloudformation-resources/util" ) diff --git a/cfn-resources/resource-policy/cmd/resource/mappings_test.go b/cfn-resources/resource-policy/cmd/resource/mappings_test.go index 168c0535b..5b40ff3fb 100644 --- a/cfn-resources/resource-policy/cmd/resource/mappings_test.go +++ b/cfn-resources/resource-policy/cmd/resource/mappings_test.go @@ -17,7 +17,7 @@ package resource_test import ( "testing" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" "github.com/aws/smithy-go/ptr" "github.com/mongodb/mongodbatlas-cloudformation-resources/resource-policy/cmd/resource" diff --git a/cfn-resources/resource-policy/cmd/resource/resource.go b/cfn-resources/resource-policy/cmd/resource/resource.go index 26598a020..f09f24e90 100644 --- a/cfn-resources/resource-policy/cmd/resource/resource.go +++ b/cfn-resources/resource-policy/cmd/resource/resource.go @@ -19,7 +19,7 @@ import ( "fmt" "net/http" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" "github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler" "github.com/aws/aws-sdk-go-v2/service/cloudformation/types" diff --git a/cfn-resources/test/e2e/cluster/cluster_test.go b/cfn-resources/test/e2e/cluster/cluster_test.go index 8296a17c2..1fa4eff6e 100644 --- a/cfn-resources/test/e2e/cluster/cluster_test.go +++ b/cfn-resources/test/e2e/cluster/cluster_test.go @@ -25,7 +25,7 @@ import ( "github.com/mongodb/mongodbatlas-cloudformation-resources/util" "github.com/stretchr/testify/assert" admin20231115014 "go.mongodb.org/atlas-sdk/v20231115014/admin" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" ) type localTestContext struct { diff --git a/cfn-resources/test/e2e/flex-cluster/flexcluster_test.go b/cfn-resources/test/e2e/flex-cluster/flexcluster_test.go index 039385d1c..fb441b0f2 100644 --- a/cfn-resources/test/e2e/flex-cluster/flexcluster_test.go +++ b/cfn-resources/test/e2e/flex-cluster/flexcluster_test.go @@ -22,7 +22,7 @@ import ( "github.com/mongodb/mongodbatlas-cloudformation-resources/test/e2e/utility" "github.com/stretchr/testify/assert" admin20231115014 "go.mongodb.org/atlas-sdk/v20231115014/admin" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" ) type localTestContext struct { diff --git a/cfn-resources/test/e2e/utility/atlas_helper.go b/cfn-resources/test/e2e/utility/atlas_helper.go index 6bf53c19c..47c392c02 100644 --- a/cfn-resources/test/e2e/utility/atlas_helper.go +++ b/cfn-resources/test/e2e/utility/atlas_helper.go @@ -24,7 +24,7 @@ import ( "github.com/mongodb-forks/digest" "github.com/mongodb/mongodbatlas-cloudformation-resources/util" admin20231115014 "go.mongodb.org/atlas-sdk/v20231115014/admin" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" ) type AtlasEnvOptions struct { diff --git a/cfn-resources/test/e2e/utility/util.go b/cfn-resources/test/e2e/utility/util.go index 5abbb6984..b9f4bbb79 100644 --- a/cfn-resources/test/e2e/utility/util.go +++ b/cfn-resources/test/e2e/utility/util.go @@ -27,7 +27,7 @@ import ( "testing" admin20231115014 "go.mongodb.org/atlas-sdk/v20231115014/admin" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" cfn "github.com/aws/aws-sdk-go-v2/service/cloudformation" ) diff --git a/cfn-resources/util/util.go b/cfn-resources/util/util.go index 3836663e1..58421737c 100644 --- a/cfn-resources/util/util.go +++ b/cfn-resources/util/util.go @@ -28,7 +28,7 @@ import ( admin20231115002 "go.mongodb.org/atlas-sdk/v20231115002/admin" admin20231115014 "go.mongodb.org/atlas-sdk/v20231115014/admin" - "go.mongodb.org/atlas-sdk/v20250312006/admin" + "go.mongodb.org/atlas-sdk/v20250312010/admin" "github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler" "github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/logging"