diff --git a/API.md b/API.md
index eba46541..b3320ad9 100644
--- a/API.md
+++ b/API.md
@@ -48349,6 +48349,7 @@ typesToActivate=["Cluster","Project"] this will actiate MongoDB::Atlas::Project
| GCP | GCP. |
| AZURE | AZURE. |
| TENANT | TENANT. |
+| FLEX | FLEX. |
---
@@ -48380,6 +48381,13 @@ TENANT.
---
+##### `FLEX`
+
+FLEX.
+
+---
+
+
### ApiAtlasDiskBackupShardedClusterSnapshotMemberViewCloudProvider
Human-readable label that identifies the cloud provider that stores this snapshot.
diff --git a/TESTING.md b/TESTING.md
index b26e4d25..25e9b331 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -38,7 +38,7 @@ npx projen test
## Testing the resource in a CFN stack:
1. Build the construct by running `npx projen build`.
-2. Navigate inside `/dist/js` and copy the`.tgz` file. You will use this in the next steps.
+2. It will generate a `.tgz` file in `dist/js` that we will reference later.
3. Create a CDK test app: We will be using a CDK app to test our construct by using the app to create, update and delete AWS CloudFormation stacks.
Create the CDK app by running the following in a terminal: ([refer AWS walkthrough for details](https://docs.aws.amazon.com/cdk/v2/guide/hello_world.html#hello_world_tutorial_create_app)):
```
@@ -48,10 +48,12 @@ cdk init app --language typescript
# build the app:
npm run build
```
-4. Copy the .tgz file from step #2 inside the node_modules folder in your CDK test app.
+4. Add a reference to the previous file in the `dependencies` section in `package.json` instead of using a published version, for example:
+```
+"awscdk-resources-mongodbatlas": "file:../dist/js/awscdk-resources-mongodbatlas@0.0.0.jsii.tgz"
+```
5. Import your CDK construct in a testing project.
6. Use the construct in your app with appropriate parameters.
- - [Optional, not applicable for L2/L3 constructs] If you need help getting test parameters to use with the constructs you can use `./cfn-resources/cfn-testing-helper.sh`. Refer “Getting test parameters” for creating a stack here for details.
7. Build your app again.
#### Create a stack:
@@ -79,4 +81,4 @@ cdk deploy
2. Stack **Outputs** should show required data correctly.
3. **Create** - Stack should complete successfully and resource should be created and correctly configured in Atlas account.
4. **Update** - Stack should complete successfully and resource should be updated and correctly configured in Atlas account.
-5. **Delete** - Stack should complete successfully and resource should be deleted from your Atlas account.
\ No newline at end of file
+5. **Delete** - Stack should complete successfully and resource should be deleted from your Atlas account.
diff --git a/src/l1-resources/cluster/README.md b/src/l1-resources/cluster/README.md
index 71587149..4faf66bf 100644
--- a/src/l1-resources/cluster/README.md
+++ b/src/l1-resources/cluster/README.md
@@ -90,6 +90,25 @@ const clusterRes = new CfnCluster(this, 'ClusterResource', {
```
+You can also create a flex cluster using CfnCluster, for example:
+```ts
+import { CfnCluster, AdvancedRegionConfigProviderName } from 'awscdk-resources-mongodbatlas';
+
+const flexClusterRes = new CfnCluster(this, 'FlexClusterResource', {
+ name: atlasProps.clusterName,
+ projectId: projectRes.attrId,
+ profile: atlasProps.profile,
+ replicationSpecs: [{
+ advancedRegionConfigs: [{
+ regionName: atlasProps.region,
+ providerName: AdvancedRegionConfigProviderName.FLEX,
+ backingProviderName: "AWS",
+ priority: 7,
+ }]
+ }]
+});
+```
+
## Feedback
This library is auto-generated and published to all supported programming languages by the [cdklabs/cdk-cloudformation] project based on the API schema published for `MongoDB::Atlas::Cluster`.
@@ -102,4 +121,4 @@ This library is auto-generated and published to all supported programming langua
## License
-Distributed under the Apache-2.0 License.
\ No newline at end of file
+Distributed under the Apache-2.0 License.
diff --git a/src/l1-resources/cluster/index.ts b/src/l1-resources/cluster/index.ts
index a9fc63e4..b22f807d 100644
--- a/src/l1-resources/cluster/index.ts
+++ b/src/l1-resources/cluster/index.ts
@@ -579,14 +579,14 @@ export interface Tag {
*
* @schema tag#Key
*/
- readonly key?: string;
+ readonly key: string;
/**
* Variable that belongs to the set of the tag. For example, production in the environment : production tag.
*
* @schema tag#Value
*/
- readonly value?: string;
+ readonly value: string;
}
/**
@@ -747,6 +747,8 @@ export enum AdvancedRegionConfigProviderName {
AZURE = "AZURE",
/** TENANT */
TENANT = "TENANT",
+ /** FLEX */
+ FLEX = "FLEX",
}
/**