diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 52f3f841b..6b32da6c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,10 @@ After the above 2 steps are completed and we've agreed on a path forward: 4. Commit and push your changes to your branch then submit a pull request against the current release branch, not master. The naming scheme of the branch is `release-staging-v#.#.#`. **Note**: There will only be one release branch at a time. 5. A repo maintainer will review the your pull request, and may either request additional changes or merge the pull request. +## Requirements + +- Resources configurations, specifcally `.rpdk-config` and `Makefile` build commands, are compatible with cloudformation-cli (`cfn`) versions 0.2.34 and above. + ## Testing We have a `/test/README.md` for every resource in `cfn-resources`. You will also find [TESTING.md](./TESTING.md) which provides testing practices common to all resources. Please follow below guidelines for testing to ensure quality: diff --git a/cfn-resources/access-list-api-key/.rpdk-config b/cfn-resources/access-list-api-key/.rpdk-config index ebc386b7c..13d5a6ecf 100644 --- a/cfn-resources/access-list-api-key/.rpdk-config +++ b/cfn-resources/access-list-api-key/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::AccessListAPIKey", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/access-list-api-key/Makefile b/cfn-resources/access-list-api-key/Makefile index 09a5341c6..51a3531da 100644 --- a/cfn-resources/access-list-api-key/Makefile +++ b/cfn-resources/access-list-api-key/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/access-list-api-key/template.yml b/cfn-resources/access-list-api-key/template.yml index 6e3f79a4e..41c2283de 100644 --- a/cfn-resources/access-list-api-key/template.yml +++ b/cfn-resources/access-list-api-key/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/alert-configuration/.rpdk-config b/cfn-resources/alert-configuration/.rpdk-config index 9c0230c04..a5a8fb916 100644 --- a/cfn-resources/alert-configuration/.rpdk-config +++ b/cfn-resources/alert-configuration/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::AlertConfiguration", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/alert-configuration/Makefile b/cfn-resources/alert-configuration/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/alert-configuration/Makefile +++ b/cfn-resources/alert-configuration/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/alert-configuration/template.yml b/cfn-resources/alert-configuration/template.yml index 5c2b3e53f..75e3760e8 100644 --- a/cfn-resources/alert-configuration/template.yml +++ b/cfn-resources/alert-configuration/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/api-key/.rpdk-config b/cfn-resources/api-key/.rpdk-config index e34a0204e..db0d701b8 100644 --- a/cfn-resources/api-key/.rpdk-config +++ b/cfn-resources/api-key/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::APIKey", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/api-key/Makefile b/cfn-resources/api-key/Makefile index 01d2f614b..296ff567e 100644 --- a/cfn-resources/api-key/Makefile +++ b/cfn-resources/api-key/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/api-key/template.yml b/cfn-resources/api-key/template.yml index f9f24942f..2b489ab1f 100644 --- a/cfn-resources/api-key/template.yml +++ b/cfn-resources/api-key/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/auditing/.rpdk-config b/cfn-resources/auditing/.rpdk-config index fdc6f4525..8f5205ddc 100644 --- a/cfn-resources/auditing/.rpdk-config +++ b/cfn-resources/auditing/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::Auditing", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, @@ -19,4 +19,4 @@ "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } -} \ No newline at end of file +} diff --git a/cfn-resources/auditing/Makefile b/cfn-resources/auditing/Makefile index 4f7aae6b3..a9158f2d9 100644 --- a/cfn-resources/auditing/Makefile +++ b/cfn-resources/auditing/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/auditing/template.yml b/cfn-resources/auditing/template.yml index ba2476f2c..bc4ab5d42 100644 --- a/cfn-resources/auditing/template.yml +++ b/cfn-resources/auditing/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/autogen/templateMakeFile b/cfn-resources/autogen/templateMakeFile index f507687f3..aa7e6b334 100644 --- a/cfn-resources/autogen/templateMakeFile +++ b/cfn-resources/autogen/templateMakeFile @@ -7,11 +7,11 @@ ldXflags=github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLo ldXflagsD=github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="-s -w -X '$(ldXflags)'" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="-s -w -X '$(ldXflags)'" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="-s -w -X '$(ldXflagsD)'" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="-s -w -X '$(ldXflagsD)'" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: - rm -rf bin \ No newline at end of file + rm -rf bin diff --git a/cfn-resources/cloud-backup-restore-jobs/.rpdk-config b/cfn-resources/cloud-backup-restore-jobs/.rpdk-config index ef7d8ed9e..1e3275a72 100644 --- a/cfn-resources/cloud-backup-restore-jobs/.rpdk-config +++ b/cfn-resources/cloud-backup-restore-jobs/.rpdk-config @@ -3,10 +3,10 @@ "typeName": "MongoDB::Atlas::CloudBackUpRestoreJobs", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/cloud-backup-restore-jobs", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/cloud-backup-restore-jobs", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } diff --git a/cfn-resources/cloud-backup-restore-jobs/Makefile b/cfn-resources/cloud-backup-restore-jobs/Makefile index f87a766df..a63d470a2 100644 --- a/cfn-resources/cloud-backup-restore-jobs/Makefile +++ b/cfn-resources/cloud-backup-restore-jobs/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/cloud-backup-restore-jobs/template.yml b/cfn-resources/cloud-backup-restore-jobs/template.yml index ea446e4fc..dd546d738 100644 --- a/cfn-resources/cloud-backup-restore-jobs/template.yml +++ b/cfn-resources/cloud-backup-restore-jobs/template.yml @@ -10,14 +10,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/cloud-backup-schedule/.rpdk-config b/cfn-resources/cloud-backup-schedule/.rpdk-config index 10677ff06..1abc02e63 100644 --- a/cfn-resources/cloud-backup-schedule/.rpdk-config +++ b/cfn-resources/cloud-backup-schedule/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::CloudBackupSchedule", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/cloud-backup-schedule/Makefile b/cfn-resources/cloud-backup-schedule/Makefile index 6602c87f8..f325497fc 100644 --- a/cfn-resources/cloud-backup-schedule/Makefile +++ b/cfn-resources/cloud-backup-schedule/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/cloud-backup-schedule/template.yml b/cfn-resources/cloud-backup-schedule/template.yml index 004267b16..b2bc8bce0 100644 --- a/cfn-resources/cloud-backup-schedule/template.yml +++ b/cfn-resources/cloud-backup-schedule/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/cloud-backup-snapshot-export-bucket/.rpdk-config b/cfn-resources/cloud-backup-snapshot-export-bucket/.rpdk-config index ef97ee775..b7d6e4f29 100644 --- a/cfn-resources/cloud-backup-snapshot-export-bucket/.rpdk-config +++ b/cfn-resources/cloud-backup-snapshot-export-bucket/.rpdk-config @@ -2,10 +2,10 @@ "typeName": "MongoDB::Atlas::CloudBackupSnapshotExportBucket", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/cloud-backup-snapshot-export-bucket", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/cloud-backup-snapshot-export-bucket", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } diff --git a/cfn-resources/cloud-backup-snapshot-export-bucket/Makefile b/cfn-resources/cloud-backup-snapshot-export-bucket/Makefile index 6602c87f8..f325497fc 100644 --- a/cfn-resources/cloud-backup-snapshot-export-bucket/Makefile +++ b/cfn-resources/cloud-backup-snapshot-export-bucket/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/cloud-backup-snapshot-export-bucket/template.yml b/cfn-resources/cloud-backup-snapshot-export-bucket/template.yml index b8ef26377..53427fc4b 100644 --- a/cfn-resources/cloud-backup-snapshot-export-bucket/template.yml +++ b/cfn-resources/cloud-backup-snapshot-export-bucket/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/cloud-backup-snapshot/.rpdk-config b/cfn-resources/cloud-backup-snapshot/.rpdk-config index ca171eeb0..bd9b80a8e 100644 --- a/cfn-resources/cloud-backup-snapshot/.rpdk-config +++ b/cfn-resources/cloud-backup-snapshot/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::CloudBackupSnapshot", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/cloud-backup-snapshot", diff --git a/cfn-resources/cloud-backup-snapshot/Makefile b/cfn-resources/cloud-backup-snapshot/Makefile index 6602c87f8..f325497fc 100644 --- a/cfn-resources/cloud-backup-snapshot/Makefile +++ b/cfn-resources/cloud-backup-snapshot/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/cloud-backup-snapshot/template.yml b/cfn-resources/cloud-backup-snapshot/template.yml index a8313d4c2..94055b28c 100644 --- a/cfn-resources/cloud-backup-snapshot/template.yml +++ b/cfn-resources/cloud-backup-snapshot/template.yml @@ -12,14 +12,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/cluster-outage-simulation/.rpdk-config b/cfn-resources/cluster-outage-simulation/.rpdk-config index 2bad660f5..3bed63fba 100644 --- a/cfn-resources/cluster-outage-simulation/.rpdk-config +++ b/cfn-resources/cluster-outage-simulation/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::ClusterOutageSimulation", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/cluster-outage-simulation", "protocolVersion": "2.0.0", diff --git a/cfn-resources/cluster-outage-simulation/Makefile b/cfn-resources/cluster-outage-simulation/Makefile index 66201c81e..0f28e7481 100644 --- a/cfn-resources/cluster-outage-simulation/Makefile +++ b/cfn-resources/cluster-outage-simulation/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/cluster-outage-simulation/template.yml b/cfn-resources/cluster-outage-simulation/template.yml index f4c6139f1..9d848d20b 100644 --- a/cfn-resources/cluster-outage-simulation/template.yml +++ b/cfn-resources/cluster-outage-simulation/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/cluster/.rpdk-config b/cfn-resources/cluster/.rpdk-config index 99b7ea5a8..b5c1f229b 100644 --- a/cfn-resources/cluster/.rpdk-config +++ b/cfn-resources/cluster/.rpdk-config @@ -2,10 +2,10 @@ "typeName": "MongoDB::Atlas::Cluster", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/cluster", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/cluster", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } diff --git a/cfn-resources/cluster/Makefile b/cfn-resources/cluster/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/cluster/Makefile +++ b/cfn-resources/cluster/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/cluster/template.yml b/cfn-resources/cluster/template.yml index b8c14335a..9813bbc48 100644 --- a/cfn-resources/cluster/template.yml +++ b/cfn-resources/cluster/template.yml @@ -10,14 +10,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/custom-db-role/.rpdk-config b/cfn-resources/custom-db-role/.rpdk-config index 0b1531ce6..c94d8dcf4 100644 --- a/cfn-resources/custom-db-role/.rpdk-config +++ b/cfn-resources/custom-db-role/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::CustomDBRole", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/custom-db-role/Makefile b/cfn-resources/custom-db-role/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/custom-db-role/Makefile +++ b/cfn-resources/custom-db-role/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/custom-db-role/template.yml b/cfn-resources/custom-db-role/template.yml index 44d75ab94..ab263e2ee 100644 --- a/cfn-resources/custom-db-role/template.yml +++ b/cfn-resources/custom-db-role/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/custom-dns-configuration-cluster-aws/.rpdk-config b/cfn-resources/custom-dns-configuration-cluster-aws/.rpdk-config index bece9b21c..ac95b2237 100644 --- a/cfn-resources/custom-dns-configuration-cluster-aws/.rpdk-config +++ b/cfn-resources/custom-dns-configuration-cluster-aws/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::CustomDnsConfigurationClusterAws", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/custom-dns-configuration-cluster-aws/Makefile b/cfn-resources/custom-dns-configuration-cluster-aws/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/custom-dns-configuration-cluster-aws/Makefile +++ b/cfn-resources/custom-dns-configuration-cluster-aws/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/custom-dns-configuration-cluster-aws/template.yml b/cfn-resources/custom-dns-configuration-cluster-aws/template.yml index b076e7560..0b4e04f69 100644 --- a/cfn-resources/custom-dns-configuration-cluster-aws/template.yml +++ b/cfn-resources/custom-dns-configuration-cluster-aws/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/data-lake-pipeline/.rpdk-config b/cfn-resources/data-lake-pipeline/.rpdk-config index 6e39c82a2..a52370338 100644 --- a/cfn-resources/data-lake-pipeline/.rpdk-config +++ b/cfn-resources/data-lake-pipeline/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::DataLakePipeline", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/data-lake-pipeline/Makefile b/cfn-resources/data-lake-pipeline/Makefile index 13f78469c..296ff567e 100644 --- a/cfn-resources/data-lake-pipeline/Makefile +++ b/cfn-resources/data-lake-pipeline/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin @@ -30,4 +30,4 @@ run-contract-testing: @echo "==> Run contract testing" make build sam local start-lambda & - cfn test --function-name TestEntrypoint --verbose \ No newline at end of file + cfn test --function-name TestEntrypoint --verbose diff --git a/cfn-resources/data-lake-pipeline/template.yml b/cfn-resources/data-lake-pipeline/template.yml index d8f92a17c..520d8789a 100644 --- a/cfn-resources/data-lake-pipeline/template.yml +++ b/cfn-resources/data-lake-pipeline/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/database-user/.rpdk-config b/cfn-resources/database-user/.rpdk-config index d3d8eed7b..1777a8e8c 100644 --- a/cfn-resources/database-user/.rpdk-config +++ b/cfn-resources/database-user/.rpdk-config @@ -2,10 +2,10 @@ "typeName": "MongoDB::Atlas::DatabaseUser", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/database-user", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/database-user", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } diff --git a/cfn-resources/database-user/Makefile b/cfn-resources/database-user/Makefile index 3b88a1df3..6df18d210 100644 --- a/cfn-resources/database-user/Makefile +++ b/cfn-resources/database-user/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/database-user/template.yml b/cfn-resources/database-user/template.yml index 345d71c64..9b4180613 100644 --- a/cfn-resources/database-user/template.yml +++ b/cfn-resources/database-user/template.yml @@ -10,14 +10,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/datalakes/.rpdk-config b/cfn-resources/datalakes/.rpdk-config index ec386b300..0a155b2f9 100644 --- a/cfn-resources/datalakes/.rpdk-config +++ b/cfn-resources/datalakes/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::DataLakes", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/datalakes/Makefile b/cfn-resources/datalakes/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/datalakes/Makefile +++ b/cfn-resources/datalakes/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/datalakes/template.yml b/cfn-resources/datalakes/template.yml index 61b403780..0456a3dda 100644 --- a/cfn-resources/datalakes/template.yml +++ b/cfn-resources/datalakes/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/encryption-at-rest/.rpdk-config b/cfn-resources/encryption-at-rest/.rpdk-config index d4c5ce5d5..1bb329a1b 100644 --- a/cfn-resources/encryption-at-rest/.rpdk-config +++ b/cfn-resources/encryption-at-rest/.rpdk-config @@ -3,10 +3,10 @@ "typeName": "MongoDB::Atlas::EncryptionAtRest", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/encryption-at-rest", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/encryption-at-rest", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } diff --git a/cfn-resources/encryption-at-rest/Makefile b/cfn-resources/encryption-at-rest/Makefile index 6602c87f8..f325497fc 100644 --- a/cfn-resources/encryption-at-rest/Makefile +++ b/cfn-resources/encryption-at-rest/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/encryption-at-rest/template.yml b/cfn-resources/encryption-at-rest/template.yml index b31e90f71..404222b83 100644 --- a/cfn-resources/encryption-at-rest/template.yml +++ b/cfn-resources/encryption-at-rest/template.yml @@ -10,14 +10,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/federated-database-instance/.rpdk-config b/cfn-resources/federated-database-instance/.rpdk-config index 45ad460ce..e2b292309 100644 --- a/cfn-resources/federated-database-instance/.rpdk-config +++ b/cfn-resources/federated-database-instance/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::FederatedDatabaseInstance", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/federated-database-instance/Makefile b/cfn-resources/federated-database-instance/Makefile index f319847fe..c900b8d71 100644 --- a/cfn-resources/federated-database-instance/Makefile +++ b/cfn-resources/federated-database-instance/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin @@ -29,4 +29,4 @@ run-contract-testing: @echo "==> Run contract testing" make build sam local start-lambda & - cfn test --function-name TestEntrypoint --verbose \ No newline at end of file + cfn test --function-name TestEntrypoint --verbose diff --git a/cfn-resources/federated-database-instance/template.yml b/cfn-resources/federated-database-instance/template.yml index 7811979a6..2c6b808aa 100644 --- a/cfn-resources/federated-database-instance/template.yml +++ b/cfn-resources/federated-database-instance/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/federated-query-limit/.rpdk-config b/cfn-resources/federated-query-limit/.rpdk-config index e7e22de25..bef752cca 100644 --- a/cfn-resources/federated-query-limit/.rpdk-config +++ b/cfn-resources/federated-query-limit/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::FederatedQueryLimit", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/federated-query-limit/Makefile b/cfn-resources/federated-query-limit/Makefile index 01d2f614b..296ff567e 100644 --- a/cfn-resources/federated-query-limit/Makefile +++ b/cfn-resources/federated-query-limit/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/federated-query-limit/template.yml b/cfn-resources/federated-query-limit/template.yml index 80d1f43be..dc8672450 100644 --- a/cfn-resources/federated-query-limit/template.yml +++ b/cfn-resources/federated-query-limit/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/federated-settings-org-role-mapping/.rpdk-config b/cfn-resources/federated-settings-org-role-mapping/.rpdk-config index 4907a6859..862cfed5f 100644 --- a/cfn-resources/federated-settings-org-role-mapping/.rpdk-config +++ b/cfn-resources/federated-settings-org-role-mapping/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::FederatedSettingsOrgRoleMapping", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/federated-settings-org-role-mapping/Makefile b/cfn-resources/federated-settings-org-role-mapping/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/federated-settings-org-role-mapping/Makefile +++ b/cfn-resources/federated-settings-org-role-mapping/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/federated-settings-org-role-mapping/template.yml b/cfn-resources/federated-settings-org-role-mapping/template.yml index 9f77dc6e6..1c464c1bb 100644 --- a/cfn-resources/federated-settings-org-role-mapping/template.yml +++ b/cfn-resources/federated-settings-org-role-mapping/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/global-cluster-config/.rpdk-config b/cfn-resources/global-cluster-config/.rpdk-config index 0a9295f07..591bc80e1 100644 --- a/cfn-resources/global-cluster-config/.rpdk-config +++ b/cfn-resources/global-cluster-config/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::GlobalClusterConfig", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/global-cluster-config/Makefile b/cfn-resources/global-cluster-config/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/global-cluster-config/Makefile +++ b/cfn-resources/global-cluster-config/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/global-cluster-config/template.yml b/cfn-resources/global-cluster-config/template.yml index 99f527e21..8b65ac28a 100644 --- a/cfn-resources/global-cluster-config/template.yml +++ b/cfn-resources/global-cluster-config/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/ldap-configuration/.rpdk-config b/cfn-resources/ldap-configuration/.rpdk-config index 7dfbe4e85..b91998487 100644 --- a/cfn-resources/ldap-configuration/.rpdk-config +++ b/cfn-resources/ldap-configuration/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::LDAPConfiguration", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/ldap-configuration/Makefile b/cfn-resources/ldap-configuration/Makefile index 6602c87f8..f325497fc 100644 --- a/cfn-resources/ldap-configuration/Makefile +++ b/cfn-resources/ldap-configuration/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/ldap-configuration/template.yml b/cfn-resources/ldap-configuration/template.yml index 8d4156731..ad82c65f5 100644 --- a/cfn-resources/ldap-configuration/template.yml +++ b/cfn-resources/ldap-configuration/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/ldap-verify/.rpdk-config b/cfn-resources/ldap-verify/.rpdk-config index 9439dc3e0..674489628 100644 --- a/cfn-resources/ldap-verify/.rpdk-config +++ b/cfn-resources/ldap-verify/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::LDAPVerify", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/ldap-verify/Makefile b/cfn-resources/ldap-verify/Makefile index 6602c87f8..f325497fc 100644 --- a/cfn-resources/ldap-verify/Makefile +++ b/cfn-resources/ldap-verify/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/ldap-verify/template.yml b/cfn-resources/ldap-verify/template.yml index 0185b642e..24d7b26f9 100644 --- a/cfn-resources/ldap-verify/template.yml +++ b/cfn-resources/ldap-verify/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/maintenance-window/.rpdk-config b/cfn-resources/maintenance-window/.rpdk-config index 44c1a13cb..6166f81a3 100644 --- a/cfn-resources/maintenance-window/.rpdk-config +++ b/cfn-resources/maintenance-window/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::MaintenanceWindow", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/maintenance-window/Makefile b/cfn-resources/maintenance-window/Makefile index 6602c87f8..f325497fc 100644 --- a/cfn-resources/maintenance-window/Makefile +++ b/cfn-resources/maintenance-window/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/maintenance-window/template.yml b/cfn-resources/maintenance-window/template.yml index 8aa786963..e14127fe8 100644 --- a/cfn-resources/maintenance-window/template.yml +++ b/cfn-resources/maintenance-window/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/network-container/.rpdk-config b/cfn-resources/network-container/.rpdk-config index b010f3a5a..7f8eeddb1 100644 --- a/cfn-resources/network-container/.rpdk-config +++ b/cfn-resources/network-container/.rpdk-config @@ -3,10 +3,10 @@ "typeName": "MongoDB::Atlas::NetworkContainer", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/network-container", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/network-container", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } diff --git a/cfn-resources/network-container/Makefile b/cfn-resources/network-container/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/network-container/Makefile +++ b/cfn-resources/network-container/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/network-container/template.yml b/cfn-resources/network-container/template.yml index 787b40e17..03996ff6f 100644 --- a/cfn-resources/network-container/template.yml +++ b/cfn-resources/network-container/template.yml @@ -10,14 +10,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/network-peering/.rpdk-config b/cfn-resources/network-peering/.rpdk-config index ca83716d0..099e3aaaa 100644 --- a/cfn-resources/network-peering/.rpdk-config +++ b/cfn-resources/network-peering/.rpdk-config @@ -2,10 +2,10 @@ "typeName": "MongoDB::Atlas::NetworkPeering", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/network-peering", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/network-peering", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } diff --git a/cfn-resources/network-peering/Makefile b/cfn-resources/network-peering/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/network-peering/Makefile +++ b/cfn-resources/network-peering/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/network-peering/template.yml b/cfn-resources/network-peering/template.yml index e3e6eeb8c..f74afaead 100644 --- a/cfn-resources/network-peering/template.yml +++ b/cfn-resources/network-peering/template.yml @@ -10,14 +10,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/online-archive/.rpdk-config b/cfn-resources/online-archive/.rpdk-config index 34f6a0409..5d442192b 100644 --- a/cfn-resources/online-archive/.rpdk-config +++ b/cfn-resources/online-archive/.rpdk-config @@ -2,8 +2,8 @@ "typeName": "MongoDB::Atlas::OnlineArchive", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/online-archive/Makefile b/cfn-resources/online-archive/Makefile index f87a766df..a63d470a2 100644 --- a/cfn-resources/online-archive/Makefile +++ b/cfn-resources/online-archive/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/online-archive/template.yml b/cfn-resources/online-archive/template.yml index 35a079a31..49d02c4a2 100644 --- a/cfn-resources/online-archive/template.yml +++ b/cfn-resources/online-archive/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/org-invitation/.rpdk-config b/cfn-resources/org-invitation/.rpdk-config index 2774cf853..b9b259ee2 100644 --- a/cfn-resources/org-invitation/.rpdk-config +++ b/cfn-resources/org-invitation/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::OrgInvitation", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/org-invitation/Makefile b/cfn-resources/org-invitation/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/org-invitation/Makefile +++ b/cfn-resources/org-invitation/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/org-invitation/template.yml b/cfn-resources/org-invitation/template.yml index 4af8c2797..f489d2ad4 100644 --- a/cfn-resources/org-invitation/template.yml +++ b/cfn-resources/org-invitation/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/organization/.rpdk-config b/cfn-resources/organization/.rpdk-config index 0def45e6c..51adb312c 100644 --- a/cfn-resources/organization/.rpdk-config +++ b/cfn-resources/organization/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::Organization", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/organization/Makefile b/cfn-resources/organization/Makefile index 5b7513eba..296ff567e 100644 --- a/cfn-resources/organization/Makefile +++ b/cfn-resources/organization/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/organization/template.yml b/cfn-resources/organization/template.yml index 5501c008a..8070cfe62 100644 --- a/cfn-resources/organization/template.yml +++ b/cfn-resources/organization/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/private-endpoint-adl/.rpdk-config b/cfn-resources/private-endpoint-adl/.rpdk-config index b91d3544b..a5c0f2836 100644 --- a/cfn-resources/private-endpoint-adl/.rpdk-config +++ b/cfn-resources/private-endpoint-adl/.rpdk-config @@ -2,8 +2,8 @@ "typeName": "MongoDB::Atlas::PrivateEndpointADL", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/private-endpoint-adl/Makefile b/cfn-resources/private-endpoint-adl/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/private-endpoint-adl/Makefile +++ b/cfn-resources/private-endpoint-adl/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/private-endpoint-adl/template.yml b/cfn-resources/private-endpoint-adl/template.yml index bd669e4ee..d3fcbeb29 100644 --- a/cfn-resources/private-endpoint-adl/template.yml +++ b/cfn-resources/private-endpoint-adl/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/private-endpoint-aws/.rpdk-config b/cfn-resources/private-endpoint-aws/.rpdk-config index 995258ef6..61b6e4316 100644 --- a/cfn-resources/private-endpoint-aws/.rpdk-config +++ b/cfn-resources/private-endpoint-aws/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::PrivateEndpointAWS", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/private-endpoint-aws/Makefile b/cfn-resources/private-endpoint-aws/Makefile index 01d2f614b..296ff567e 100644 --- a/cfn-resources/private-endpoint-aws/Makefile +++ b/cfn-resources/private-endpoint-aws/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/private-endpoint-aws/template.yml b/cfn-resources/private-endpoint-aws/template.yml index 94e50dc75..918d3af7e 100644 --- a/cfn-resources/private-endpoint-aws/template.yml +++ b/cfn-resources/private-endpoint-aws/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/private-endpoint-regional-mode/.rpdk-config b/cfn-resources/private-endpoint-regional-mode/.rpdk-config index 779e4ba08..1e991d648 100644 --- a/cfn-resources/private-endpoint-regional-mode/.rpdk-config +++ b/cfn-resources/private-endpoint-regional-mode/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::PrivateEndPointRegionalMode", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/private-endpoint-regional-mode/Makefile b/cfn-resources/private-endpoint-regional-mode/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/private-endpoint-regional-mode/Makefile +++ b/cfn-resources/private-endpoint-regional-mode/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/private-endpoint-regional-mode/template.yml b/cfn-resources/private-endpoint-regional-mode/template.yml index b1838a258..7bda6706f 100644 --- a/cfn-resources/private-endpoint-regional-mode/template.yml +++ b/cfn-resources/private-endpoint-regional-mode/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/private-endpoint-service/.rpdk-config b/cfn-resources/private-endpoint-service/.rpdk-config index 97473d01f..8685d9824 100644 --- a/cfn-resources/private-endpoint-service/.rpdk-config +++ b/cfn-resources/private-endpoint-service/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::PrivateEndpointService", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/private-endpoint-service/Makefile b/cfn-resources/private-endpoint-service/Makefile index 01d2f614b..296ff567e 100644 --- a/cfn-resources/private-endpoint-service/Makefile +++ b/cfn-resources/private-endpoint-service/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/private-endpoint-service/template.yml b/cfn-resources/private-endpoint-service/template.yml index 0509c9d56..34305bbb4 100644 --- a/cfn-resources/private-endpoint-service/template.yml +++ b/cfn-resources/private-endpoint-service/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/private-endpoint/.rpdk-config b/cfn-resources/private-endpoint/.rpdk-config index 768421dbf..9451e0807 100644 --- a/cfn-resources/private-endpoint/.rpdk-config +++ b/cfn-resources/private-endpoint/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::PrivateEndpoint", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/private-endpoint/Makefile b/cfn-resources/private-endpoint/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/private-endpoint/Makefile +++ b/cfn-resources/private-endpoint/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/private-endpoint/template.yml b/cfn-resources/private-endpoint/template.yml index 0509c9d56..34305bbb4 100644 --- a/cfn-resources/private-endpoint/template.yml +++ b/cfn-resources/private-endpoint/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/.rpdk-config b/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/.rpdk-config index 45be3f1a6..6ee25912f 100644 --- a/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/.rpdk-config +++ b/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::PrivatelinkEndpointServiceDataFederationOnlineArchive", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/Makefile b/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/Makefile index 13f78469c..296ff567e 100644 --- a/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/Makefile +++ b/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin @@ -30,4 +30,4 @@ run-contract-testing: @echo "==> Run contract testing" make build sam local start-lambda & - cfn test --function-name TestEntrypoint --verbose \ No newline at end of file + cfn test --function-name TestEntrypoint --verbose diff --git a/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/template.yml b/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/template.yml index 93414cb5d..8a2ffbcf8 100644 --- a/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/template.yml +++ b/cfn-resources/privatelink-endpoint-service-data-federation-online-archive/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/project-invitation/.rpdk-config b/cfn-resources/project-invitation/.rpdk-config index 211000292..30207c149 100644 --- a/cfn-resources/project-invitation/.rpdk-config +++ b/cfn-resources/project-invitation/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::ProjectInvitation", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/project-invitation/Makefile b/cfn-resources/project-invitation/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/project-invitation/Makefile +++ b/cfn-resources/project-invitation/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/project-invitation/template.yml b/cfn-resources/project-invitation/template.yml index a7e456fb0..98930c1ba 100644 --- a/cfn-resources/project-invitation/template.yml +++ b/cfn-resources/project-invitation/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/project-ip-access-list/.rpdk-config b/cfn-resources/project-ip-access-list/.rpdk-config index e545f0bf8..9555e31e3 100644 --- a/cfn-resources/project-ip-access-list/.rpdk-config +++ b/cfn-resources/project-ip-access-list/.rpdk-config @@ -2,10 +2,10 @@ "typeName": "MongoDB::Atlas::ProjectIpAccessList", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/project-ip-access-list", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/project-ip-access-list", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } diff --git a/cfn-resources/project-ip-access-list/Makefile b/cfn-resources/project-ip-access-list/Makefile index 5c083efea..6df18d210 100644 --- a/cfn-resources/project-ip-access-list/Makefile +++ b/cfn-resources/project-ip-access-list/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: - rm -rf bin \ No newline at end of file + rm -rf bin diff --git a/cfn-resources/project-ip-access-list/template.yml b/cfn-resources/project-ip-access-list/template.yml index 826fd27ea..64fa62d41 100644 --- a/cfn-resources/project-ip-access-list/template.yml +++ b/cfn-resources/project-ip-access-list/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/project/.rpdk-config b/cfn-resources/project/.rpdk-config index e5f61f6d0..9d7e27a14 100644 --- a/cfn-resources/project/.rpdk-config +++ b/cfn-resources/project/.rpdk-config @@ -2,10 +2,10 @@ "typeName": "MongoDB::Atlas::Project", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/project", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/project", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } diff --git a/cfn-resources/project/Makefile b/cfn-resources/project/Makefile index 941b46836..db6b1dc7c 100644 --- a/cfn-resources/project/Makefile +++ b/cfn-resources/project/Makefile @@ -11,12 +11,12 @@ LINKER_FLAGS=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/u build: @echo "==> Building handler binary" cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(LINKER_FLAGS)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(LINKER_FLAGS)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: @echo "==> Building handler binary for debugging" cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -gcflags="$(DEBUG_FLAGS)" -ldflags="$(LINKER_FLAGS)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -gcflags="$(DEBUG_FLAGS)" -ldflags="$(LINKER_FLAGS)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: diff --git a/cfn-resources/project/template.yml b/cfn-resources/project/template.yml index f2918c10b..87ef780a4 100644 --- a/cfn-resources/project/template.yml +++ b/cfn-resources/project/template.yml @@ -10,14 +10,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/search-index/.rpdk-config b/cfn-resources/search-index/.rpdk-config index 13781c2de..7757fafa1 100644 --- a/cfn-resources/search-index/.rpdk-config +++ b/cfn-resources/search-index/.rpdk-config @@ -3,11 +3,11 @@ "typeName": "MongoDB::Atlas::SearchIndex", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { - "importpath": "github.com/mongodb/mongodbatlas-cloudformation-resources/search-index", + "import_path": "github.com/mongodb/mongodbatlas-cloudformation-resources/search-index", "protocolVersion": "2.0.0", "pluginVersion": "2.0.4" } -} \ No newline at end of file +} diff --git a/cfn-resources/search-index/Makefile b/cfn-resources/search-index/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/search-index/Makefile +++ b/cfn-resources/search-index/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/search-index/template.yml b/cfn-resources/search-index/template.yml index 594e3d70d..286007250 100644 --- a/cfn-resources/search-index/template.yml +++ b/cfn-resources/search-index/template.yml @@ -11,7 +11,7 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: @@ -22,7 +22,7 @@ Resources: TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/serverless-instance/.rpdk-config b/cfn-resources/serverless-instance/.rpdk-config index d821b9301..39ef1c169 100644 --- a/cfn-resources/serverless-instance/.rpdk-config +++ b/cfn-resources/serverless-instance/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::ServerlessInstance", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/serverless-instance/Makefile b/cfn-resources/serverless-instance/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/serverless-instance/Makefile +++ b/cfn-resources/serverless-instance/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/serverless-instance/template.yml b/cfn-resources/serverless-instance/template.yml index 65b2b9248..51c4a4af0 100644 --- a/cfn-resources/serverless-instance/template.yml +++ b/cfn-resources/serverless-instance/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/serverless-private-endpoint/.rpdk-config b/cfn-resources/serverless-private-endpoint/.rpdk-config index 1a62ee157..900419908 100644 --- a/cfn-resources/serverless-private-endpoint/.rpdk-config +++ b/cfn-resources/serverless-private-endpoint/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::ServerlessPrivateEndpoint", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/serverless-private-endpoint/Makefile b/cfn-resources/serverless-private-endpoint/Makefile index 13f78469c..296ff567e 100644 --- a/cfn-resources/serverless-private-endpoint/Makefile +++ b/cfn-resources/serverless-private-endpoint/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin @@ -30,4 +30,4 @@ run-contract-testing: @echo "==> Run contract testing" make build sam local start-lambda & - cfn test --function-name TestEntrypoint --verbose \ No newline at end of file + cfn test --function-name TestEntrypoint --verbose diff --git a/cfn-resources/serverless-private-endpoint/template.yml b/cfn-resources/serverless-private-endpoint/template.yml index 843edf826..f4060aeba 100644 --- a/cfn-resources/serverless-private-endpoint/template.yml +++ b/cfn-resources/serverless-private-endpoint/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/teams/.rpdk-config b/cfn-resources/teams/.rpdk-config index 67591b6ad..fe8fed250 100644 --- a/cfn-resources/teams/.rpdk-config +++ b/cfn-resources/teams/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::Teams", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/teams/Makefile b/cfn-resources/teams/Makefile index 06f7c91e7..f325497fc 100644 --- a/cfn-resources/teams/Makefile +++ b/cfn-resources/teams/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/teams/template.yml b/cfn-resources/teams/template.yml index 5d477e79b..cf88f8ca7 100644 --- a/cfn-resources/teams/template.yml +++ b/cfn-resources/teams/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/third-party-integration/.rpdk-config b/cfn-resources/third-party-integration/.rpdk-config index 2d8ad9a59..ea3b65fb5 100644 --- a/cfn-resources/third-party-integration/.rpdk-config +++ b/cfn-resources/third-party-integration/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::ThirdPartyIntegration", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/third-party-integration/Makefile b/cfn-resources/third-party-integration/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/third-party-integration/Makefile +++ b/cfn-resources/third-party-integration/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/third-party-integration/template.yml b/cfn-resources/third-party-integration/template.yml index 9913d2d50..b3bbffe4c 100644 --- a/cfn-resources/third-party-integration/template.yml +++ b/cfn-resources/third-party-integration/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/trigger/.rpdk-config b/cfn-resources/trigger/.rpdk-config index 639a65178..5384dab81 100644 --- a/cfn-resources/trigger/.rpdk-config +++ b/cfn-resources/trigger/.rpdk-config @@ -2,8 +2,8 @@ "typeName": "MongoDB::Atlas::Trigger", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/trigger/Makefile b/cfn-resources/trigger/Makefile index 102b4404d..6df18d210 100644 --- a/cfn-resources/trigger/Makefile +++ b/cfn-resources/trigger/Makefile @@ -5,15 +5,15 @@ goos=linux goarch=amd64 CFNREP_GIT_SHA?=$(shell git rev-parse HEAD) ldXflags=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=info -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} -ldXflagsD=-s -w -X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} +ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug -X github.com/mongodb/mongodbatlas-cloudformation-resources/version.Version=${CFNREP_GIT_SHA} build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/trigger/template.yml b/cfn-resources/trigger/template.yml index 7f9a240f6..ef6ecf7e5 100644 --- a/cfn-resources/trigger/template.yml +++ b/cfn-resources/trigger/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: diff --git a/cfn-resources/util/util.go b/cfn-resources/util/util.go index 794e3cedf..c6b073361 100644 --- a/cfn-resources/util/util.go +++ b/cfn-resources/util/util.go @@ -358,7 +358,7 @@ func newHTTPClient(p *profile.Profile) (*http.Client, error) { // more verbose logging. // For example, // env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="-s -w -X \ -// 'github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug'" -tags="$(tags)" -o bin/handler cmd/main.go +// 'github.com/mongodb/mongodbatlas-cloudformation-resources/util.defaultLogLevel=debug'" -tags="$(tags)" -o bin/bootstrap cmd/main.go func getLogLevel() logger.Level { levelString, exists := os.LookupEnv(envLogLevel) if !exists { diff --git a/cfn-resources/x509-authentication-database-user/.rpdk-config b/cfn-resources/x509-authentication-database-user/.rpdk-config index c14c54743..1ce4d353e 100644 --- a/cfn-resources/x509-authentication-database-user/.rpdk-config +++ b/cfn-resources/x509-authentication-database-user/.rpdk-config @@ -3,8 +3,8 @@ "typeName": "MongoDB::Atlas::X509AuthenticationDatabaseUser", "language": "go", "runtime": "go1.x", - "entrypoint": "handler", - "testEntrypoint": "handler", + "entrypoint": "bootstrap", + "testEntrypoint": "bootstrap", "settings": { "version": false, "subparser_name": null, diff --git a/cfn-resources/x509-authentication-database-user/Makefile b/cfn-resources/x509-authentication-database-user/Makefile index 6602c87f8..f325497fc 100644 --- a/cfn-resources/x509-authentication-database-user/Makefile +++ b/cfn-resources/x509-authentication-database-user/Makefile @@ -9,11 +9,11 @@ ldXflagsD=-X github.com/mongodb/mongodbatlas-cloudformation-resources/util.defau build: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflags)" -tags="$(tags)" -o bin/bootstrap cmd/main.go debug: cfn generate - env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/handler cmd/main.go + env GOOS=$(goos) CGO_ENABLED=$(cgo) GOARCH=$(goarch) go build -ldflags="$(ldXflagsD)" -tags="$(tags)" -o bin/bootstrap cmd/main.go clean: rm -rf bin diff --git a/cfn-resources/x509-authentication-database-user/template.yml b/cfn-resources/x509-authentication-database-user/template.yml index ac596d268..a489636af 100644 --- a/cfn-resources/x509-authentication-database-user/template.yml +++ b/cfn-resources/x509-authentication-database-user/template.yml @@ -11,14 +11,14 @@ Resources: TypeFunction: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ TestEntrypoint: Type: AWS::Serverless::Function Properties: - Handler: handler + Handler: bootstrap Runtime: go1.x CodeUri: bin/ Environment: