Open lockenj opened 3 weeks ago
Thanks for opening this issue! Please make sure to provide the following information to help us reproduce the issue:
Thanks for opening this issue. The ticket CLOUDP-252074 was created for internal tracking.
After changing the name of my cluster to something with less than 21 characters and specifying and uncommenting // clusterName: this.#_clusterName,
the above works.
However I've now discovered that the deployment will NOT finish if the database/collections are not created up front.
There are a lot of "scenarios" or specifics around these CDK resources that do NOT appear to reflected anywhere.
How can we get some of that knowledge captured to help future developers not burn energy/time exploring like I am doing at the moment?
Is there an existing issue for this?
CDK package version
v3.5.2
CFN Resource version
N/A
CFN Resource Region
us-east-2
Current Behavior
According to the example https://github.com/mongodb/awscdk-resources-mongodbatlas/blob/main/examples/l1-resources/online-archive.ts
clusterName
is not required however if its omitted I get this error:` Properties validation failed for resource MongoAtlasConstructeventruntimeeventdetailB11AA3A2 with message:
: required key [ClusterName] not found`
Whats worse if I include it using the same name I created my cluster with I get an error stating the string does conform to the pattern when the cluster name I am using is perfectly fine (based on the cluster creating successfully).
Properties validation failed for resource MongoAtlasConstructeventruntimeeventdetailCEA3BD2F with message: [#/ClusterName: string [core-environment-manual-test] does not match pattern ^([a-zA-Z0-9]([a-zA-Z0-9-]){0,21}(?<!-)([\w]{0,42}))$]
AWS CDK code to reproduce the issue
Steps To Reproduce
Use these properties to reproduce the issue... { organizationId: process.env.MONGO_ATLAS_ORGANIZATION_ID, projectId: process.env.MONGO_ATLAS_PROJECT_ID, projectName: process.env.MONGO_ATLAS_PROJECT_NAME, clusterName: 'core-env-test', secretName: 'core-env-test', dbRootUserName: 'core-env-test-root', size: 'small', projectProps: {}, clusterProps: { backupPolicy: { pitEnabled: false, }, archivePolicy: { archives: [ { collName: 'event-detail', dbName: 'event-runtime', collectionType: CfnOnlineArchivePropsCollectionType.STANDARD, criteria: { type: CriteriaViewType.CUSTOM, query: '{ __toBeArchived: true }', }, //ScheduleView Regular frequency and duration when archiving process occurs. //Below is 2am-4am EST schedule: { type: ScheduleViewType.DAILY, startHour: 6, //number Hour of the day when the when the scheduled window to run one online archive starts. startMinute: 0, //number Minute of the hour when the scheduled window to run one online archive starts. endHour: 8, //number Hour of the day when the scheduled window to run one online archive ends. endMinute: 0, //number Minute of the hour when the scheduled window to run one online archive ends. }, }, ] } }, }
cdk synth
Code of Conduct