Skip to content

Conversation

@lantoli
Copy link
Member

@lantoli lantoli commented Sep 10, 2025

Proposed changes

Update CfnCluster with flex support

Jira ticket: CLOUDP-342591

Please include a summary of the fix/feature/change, including any relevant motivation and context.

Link to any related issue(s):

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • This change requires a documentation update

Required Checklist:

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • I have tested the CDK constructor in a CFN stack. See TESTING.md
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@lantoli lantoli marked this pull request as ready for review September 10, 2025 19:31
@lantoli lantoli requested a review from a team as a code owner September 10, 2025 19:31
Copilot AI review requested due to automatic review settings September 10, 2025 19:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for FLEX provider in MongoDB Atlas clusters by updating the CfnCluster resource definition. The main purpose is to enable users to create flex clusters through the CDK construct.

  • Added FLEX as a new provider option in the AdvancedRegionConfigProviderName enum
  • Made Tag interface properties required (key and value are no longer optional)
  • Updated documentation with example usage of flex clusters

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/l1-resources/cluster/index.ts Added FLEX enum value and made Tag properties required
src/l1-resources/cluster/README.md Added example showing how to create a flex cluster
TESTING.md Updated testing instructions for better clarity
API.md Generated API documentation reflecting the FLEX enum addition

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


```

You can also create a flex cluster using CfnCluster, for example:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

example of creating a flex cluster with CfnCluster so docs team can update this README file to reference it

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/[email protected]"
```
Copy link
Member Author

@lantoli lantoli Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is better and you can do changes in our provider and generate the file again without having to copy it over and over again

```
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.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover

@lantoli lantoli merged commit aed9178 into main Sep 11, 2025
25 of 26 checks passed
@lantoli lantoli deleted the CLOUDP-342591_cluster branch September 11, 2025 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants