mongodb / mongodbatlas-cloudformation-resources

MongoDB Atlas CloudFormation Resources: Deploy, update, and manage MongoDB Atlas infrastructure as code through AWS CloudFormation
https://www.mongodb.com/atlas/aws-cloudformation
Apache License 2.0
58 stars 38 forks source link

Unable to build resources #26

Closed jasonmimick closed 4 years ago

jasonmimick commented 4 years ago

After pulling a fresh clone of the repo I'm not able to build any resource in order to cfn submit. Looks like some sdk or go-library change. Here is the error: (Note I added some debugging log lines to the cfn python to figure out another issue, please disregard that in the following output.)

 mongodbatlas-cloudformation-resources git:(master) ✗ cd project 
➜  project git:(master) ✗ make
cfn generate
prop=/properties/Id
path=('properties', 'Id')
prop=/properties/Created
path=('properties', 'Created')
prop=/properties/ClusterCount
path=('properties', 'ClusterCount')
Generated files for MongoDB::Atlas::Project
env GOOS=linux go build -ldflags="-s -w" -tags="logging callback scheduler" -o bin/handler cmd/main.go
# github.com/mongodb/mongodbatlas-cloudformation-resources/project/cmd/resource
cmd/resource/resource.go:16:73: currentModel.ApiKeys.PublicKey.Value undefined (type *string has no field or method Value)
cmd/resource/resource.go:16:115: currentModel.ApiKeys.PrivateKey.Value undefined (type *string has no field or method Value)
cmd/resource/resource.go:22:28: currentModel.Name.Value undefined (type *string has no field or method Value)
cmd/resource/resource.go:23:29: currentModel.OrgId.Value undefined (type *string has no field or method Value)
cmd/resource/resource.go:29:18: cannot use encoding.NewString(project.ID) (type *encoding.String) as type *string in assignment
cmd/resource/resource.go:30:23: cannot use encoding.NewString(project.Created) (type *encoding.String) as type *string in assignment
cmd/resource/resource.go:31:28: cannot use encoding.NewInt(int64(project.ClusterCount)) (type *encoding.Int) as type *int in assignment
cmd/resource/resource.go:42:73: currentModel.ApiKeys.PublicKey.Value undefined (type *string has no field or method Value)
cmd/resource/resource.go:42:115: currentModel.ApiKeys.PrivateKey.Value undefined (type *string has no field or method Value)
cmd/resource/resource.go:47:24: currentModel.Id.Value undefined (type *string has no field or method Value)
cmd/resource/resource.go:47:24: too many errors
make: *** [Makefile:5: build] Error 2
jasonmimick commented 4 years ago

Duplicate of #19