Skip to content

Conversation

@lantoli
Copy link
Member

@lantoli lantoli commented Sep 5, 2025

Proposed changes

Create CfnFlexCluster. Generate index.ts file from the corresponding CloudFormation resource. Add the other supporting files.

Jira ticket: CLOUDP-342590

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 8, 2025 11:30
Copilot AI review requested due to automatic review settings September 8, 2025 11:30
@lantoli lantoli requested a review from a team as a code owner September 8, 2025 11:30
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 creates a new CfnFlexCluster resource for MongoDB Atlas Flex clusters, which are flexible, scalable, and cost-optimized clusters for low-traffic applications with variable workloads.

Key changes:

  • Generates CloudFormation resource bindings for MongoDB::Atlas::FlexCluster
  • Adds comprehensive type definitions for flex cluster configuration
  • Provides example implementation and integration test

Reviewed Changes

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

Show a summary per file
File Description
src/l1-resources/flex-cluster/index.ts Core flex cluster resource with TypeScript interfaces and CloudFormation bindings
src/l1-resources/flex-cluster/integ.default.ts Integration test demonstrating basic flex cluster creation
src/l1-resources/flex-cluster/README.md Documentation with usage examples and API references
src/index.ts Main export file updated to include flex cluster types with conflict resolution
examples/l1-resources/flex-cluster.ts Complete example showing project and flex cluster creation
API.md Auto-generated API documentation for the new flex cluster resource
.projenrc.js Build configuration updated with additional ignore patterns
.npmignore Package ignore list updated to exclude development files

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

@@ -0,0 +1,76 @@
# flex-cluster

The official [MongoDB Atlas](https://www.mongodb.com/) AWS CDK resource for Node.js.
Copy link
Collaborator

Choose a reason for hiding this comment

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

n00b question, why do we mention Node.js here

Copy link
Member Author

Choose a reason for hiding this comment

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

similarly to doc in the other resources, they can also be used in Java, C#, Go, Python, this directoy has the Node resource definition


The flex cluster resource provides access to your flex cluster configurations. The resource lets you create, edit and delete flex clusters. The resource requires your Project ID.

MongoDB Atlas Flex clusters provide a flexible, scalable, and cost-optimized solution for low-traffic applications and variable workloads. Flex clusters automatically scale compute and storage resources based on demand, offering a pay-as-you-go model.
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this copy / pasted from somewhere? Can you add a link to the official MongoDB ATlas docs? https://www.mongodb.com/docs/atlas/create-database-deployment/#flex-clusters

Copy link
Member Author

Choose a reason for hiding this comment

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

changed to use the link instead: 197861a

Copy link
Member Author

Choose a reason for hiding this comment

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

BTW, this is one of the files that the docs team will update

@lantoli lantoli merged commit b5cbec6 into main Sep 8, 2025
14 checks passed
@lantoli lantoli deleted the CLOUDP-342590_flex_cluster branch September 8, 2025 14:16
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.

4 participants