Closed azec-pdx closed 1 year ago
@azec-pdx I'll respond on what I can but as the README notes this is still beta so it's safe to expect some issues until we can move forward w/ more development.
The m10 clusters and up is to provide a simpler first experience, as you saw the underlying API is slightly different when configuring M2/M5. If development continues we'll likely add in coverage for all options in the underlying API, similar to what we've done for Terraform.
@azec-pdx we have refreshed MongoDB Atlas resources and published to AWS CFN Third Party Public Registry in all 22 AWS regions where MongoDB Atlas is currently available in. Can you double check now if this has resolved your issue?
Closing out this issue, but feel free to re-open in case if you need anything else. Thank you.
This has not resolved the issue, an invalid reauest is returned as follows:
400 (request "INVALID_ENUM_VALUE") An invalid enumeration value M0 was specified
Here is the configuration in AWS CloudFormation:
AtlasCluster:
Type: 'MongoDB::Atlas::Cluster'
Properties:
ProjectId: !GetAtt
- AtlasProject
- Id
Name: !Ref AtlasClusterName
Profile: !Ref ProfileKey
ClusterType: REPLICASET
ReplicationSpecs:
- NumShards: '1'
AdvancedRegionConfigs:
- ElectableSpecs:
EbsVolumeType: STANDARD
InstanceSize: M0
NodeCount: '3'
RegionName: US_EAST_1
Unsurprisingly this issue also impacts the 'awscdk-resources-mongodbatlas' CDK library. There seems to be a lack of documentation surrounding this limitation.
Are we likely to see the CloudFormation templates extended to support the ProviderName
property, which would allow M0, M2 and M5 instance types (great for prototyping/ testing, and as a low-friction on-ramp to M10+ instance types).
Given an overview of whats needed, I'm happy to contribute.
I'm having the same trouble as the two commenters before me. There seems to be no support at all for shared clusters in the mongo cfn resources.
On our setup we're using shared instances for our development environment and larger clusters only for staging and production. So without support for shared instances, we cannot build a unified/reliable pipeline for our infrastructure.
@Zuhairahmed Could you please re-open this issue? Or should I create a new one?
We're also interested in getting M0, M2 and M5 included. Without it, we can't include mongo in our iac setup.
@BreitbandModem yes please open new GitHub issue. Thank you.
any updates for this? we'd like to have M0 in our IAC code
Hello,
I faced the same issue while trying to create a minimal sandbox cluster M0 using Terraform.
I selected AZURE as provider.
The error is shown below:
mongodbatlas_cluster.experiment_cluster: Creating...
│ Error: error creating MongoDB Cluster: POST 400 (request "INVALID_ENUM_VALUE") An invalid enumeration value M0 was specified.
Could you please provide advice on this issue.
Kind regards,
@macdi for us this was resolved a while ago already. Refer to https://github.com/mongodb/mongodbatlas-cloudformation-resources/issues/608
I have the same issue here using cdk:
const atlasBasic = new AtlasBasic(this, 'AtlasBasic', {
clusterProps: {
name: 'Cluster0',
clusterType: 'REPLICASET',
replicationSpecs: [
{
numShards: 1,
advancedRegionConfigs: [
{
analyticsSpecs: {
ebsVolumeType: "STANDARD",
instanceSize: "M0",
nodeCount: 1
},
electableSpecs: {
ebsVolumeType: "STANDARD",
instanceSize: "M0",
nodeCount: 3
},
priority: 7,
regionName: "EU_NORTH_1",
providerName: "AWS",
backingProviderName: "AWS"
}]
}]
},
projectProps: {
name: 'demo',
orgId: '<orgid>', //Static
},
ipAccessListProps: {
accessList: [
{ipAddress: '0.0.0.0', comment: 'All'}
]
},
profile: 'default',
});
AtlasBasic/cluster-AtlasBasic (AtlasBasicclusterAtlasBasic) Resource handler returned message: "https://cloud.mongodb.com/api/atlas/v2/groups/6552950c478827367c177538/clusters POST: HTTP 400 Bad Request (Error code: "INVALID_ENUM_VALUE") Detail: An invalid enumeration value M0 was specified. Reason: Bad Request. Params: [M 0]"
After creating resources:
M0 Sandbox
through MongoDB Atlas API at all (these are FREE and allowed only through UI)Then started reading https://docs.atlas.mongodb.com/reference/api/clusters-create-one/ and found this really interesting:
Looking at current spec of
MongoDB::Atlas::Cluster
, CloudFormation propertyProviderSettings
DOES NOT allow specifyingProviderName
, onlyBackingProviderName
property which is not enough to provision M2 and M5 tier clusters.This creates constraint that minimum possible tier that can be provisioned through CloudFormation (and
AWS
provider - duuh ) is M10 Cluster.I am curious if this is "by design" and intentional business decision vs. implementation opportunity? Answer to that question might determine if this issue should be treated as feature-request or canceled.
Additionally , I can see that example for cluster is using also M10. However, the same example is using
ProviderName
as top-level property on resource here, although it is nowhere specified in JSON Schema forMongoDB::Atlas::Cluster
and interestingly I did have it in my template (by pure copy-paste) and it didn't make resource fail :)SUMMARY:
ProviderSettings
MongoDB::Atlas::Cluster