Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cfn-resources/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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/v20241113004 v20241113004.1.0
go.mongodb.org/atlas-sdk/v20250312002 v20250312002.0.0
)

require (
Expand Down Expand Up @@ -50,7 +50,7 @@ require (
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/stretchr/objx v0.5.2 // indirect
go.mongodb.org/atlas v0.37.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/oauth2 v0.28.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
Expand Down
8 changes: 4 additions & 4 deletions cfn-resources/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ go.mongodb.org/atlas-sdk/v20231115002 v20231115002.1.0 h1:x6nnq2pUIP9mN4WLD4/Ese
go.mongodb.org/atlas-sdk/v20231115002 v20231115002.1.0/go.mod h1:el7cm23kEiiw72HAYimhNweKqp/ubHsNJk+Mk30yJhM=
go.mongodb.org/atlas-sdk/v20231115014 v20231115014.0.0 h1:hN7x3m6THf03q/tE48up1j0U/26lJmx+s1LXB/qvHHc=
go.mongodb.org/atlas-sdk/v20231115014 v20231115014.0.0/go.mod h1:pCl46YnWOIde8lq27whXDwUseNeUvtAy3vy5ZDeTcBA=
go.mongodb.org/atlas-sdk/v20241113004 v20241113004.1.0 h1:AvrgNUpVMFnqZZJo4m/Bynr0wlDWM4xjhugCSdX/7mM=
go.mongodb.org/atlas-sdk/v20241113004 v20241113004.1.0/go.mod h1:CABkQ0sbsqRBXR55UwS+0rX91Dx7et0xxq4QBB6qRog=
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
go.mongodb.org/atlas-sdk/v20250312002 v20250312002.0.0 h1:KX8PrYp3/PCSxG4NbGLcc3+EsNcfyhcvylGbe/oRlx8=
go.mongodb.org/atlas-sdk/v20250312002 v20250312002.0.0/go.mod h1:HHCmHxHPdJRr1bUXlvRIZbm7M4gRujjur1GnjE44YgA=
golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc=
golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
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=
Expand Down
4 changes: 2 additions & 2 deletions cfn-resources/organization/cmd/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"net/http"
"time"

"go.mongodb.org/atlas-sdk/v20241113004/admin"
"go.mongodb.org/atlas-sdk/v20250312002/admin"

"github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler"
"github.com/aws/aws-sdk-go/service/cloudformation"
Expand Down Expand Up @@ -230,7 +230,7 @@ func Delete(req handler.Request, prevModel *Model, currentModel *Model) (handler

responseChan := make(chan DeleteResponse, 1)
go func() {
_, response, err := deleteRequest.Execute()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed compile errors

response, err := deleteRequest.Execute()
responseChan <- DeleteResponse{Error: err, Response: response}
}()

Expand Down
2 changes: 1 addition & 1 deletion cfn-resources/resource-policy/cmd/resource/mappings.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package resource

import (
"github.com/mongodb/mongodbatlas-cloudformation-resources/util"
"go.mongodb.org/atlas-sdk/v20241113004/admin"
"go.mongodb.org/atlas-sdk/v20250312002/admin"
)

func NewResourcePolicyCreateReq(model *Model) *admin.ApiAtlasResourcePolicyCreate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package resource_test
import (
"testing"

"go.mongodb.org/atlas-sdk/v20241113004/admin"
"go.mongodb.org/atlas-sdk/v20250312002/admin"

"github.com/aws/smithy-go/ptr"
"github.com/mongodb/mongodbatlas-cloudformation-resources/resource-policy/cmd/resource"
Expand Down
6 changes: 4 additions & 2 deletions cfn-resources/resource-policy/cmd/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ import (
"fmt"
"net/http"

"go.mongodb.org/atlas-sdk/v20250312002/admin"

"github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler"
"github.com/aws/aws-sdk-go/service/cloudformation"

"github.com/mongodb/mongodbatlas-cloudformation-resources/util"
"github.com/mongodb/mongodbatlas-cloudformation-resources/util/constants"
progress_events "github.com/mongodb/mongodbatlas-cloudformation-resources/util/progressevent"
"github.com/mongodb/mongodbatlas-cloudformation-resources/util/validator"
"go.mongodb.org/atlas-sdk/v20241113004/admin"
)

var CreateRequiredFields = []string{"OrgId", "Name", "Policies"}
Expand Down Expand Up @@ -139,7 +141,7 @@ func Delete(req handler.Request, prevModel *Model, currentModel *Model) (handler

orgID := currentModel.OrgId
resourcePolicyID := currentModel.Id
_, apiResp, err := conn.ResourcePoliciesApi.DeleteAtlasResourcePolicy(ctx, *orgID, *resourcePolicyID).Execute()
apiResp, err := conn.ResourcePoliciesApi.DeleteAtlasResourcePolicy(ctx, *orgID, *resourcePolicyID).Execute()
if err != nil {
return handleError(apiResp, constants.DELETE, err)
}
Expand Down
2 changes: 1 addition & 1 deletion cfn-resources/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/v20241113004/admin"
"go.mongodb.org/atlas-sdk/v20250312002/admin"

"github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler"
"github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/logging"
Expand Down
Loading