Important
As of February 2025, you can create Flex clusters, and can no longer
create M2 and M5 clusters or Serverless instances in the
Atlas UI, Atlas CLI, Atlas Administration API, Atlas Kubernetes Operator, HashiCorp Terraform,
or Atlas CloudFormation Resources.
Atlas no longer supports M2 and M5 clusters and Serverless instances. As of May 25, 2025, Atlas has migrated all existing M2 and M5
clusters to Flex clusters.
Atlas migrated Serverless instances to Free clusters, Flex clusters, or Dedicated clusters according to your usage. To see which tiers Atlas migrated your instances to, consult the All Clusters page in the Atlas UI.
All of the tools support Flex clusters. Update your code and replace all references to deprecated instance types with references to Flex Clusters.
Note
If your workloads require Private Endpoints or Continuous Backup and Point-in-Time Restore, use dedicated clusters.
Migrating API Configuration
The Cluster API endpoints listed in the table in this
section are compatible with M2/M5 clusters.
As of January 2025, these endpoints manage Flex clusters. You can
continue using these API endpoints without change until they reach End of Life
(EOL) in January 2026.
As of January 2025, API endpoints for Serverless Instances manage Flex clusters. As of March 2025, all existing Serverless instances have been migrated to Free clusters, Flex clusters, or dedicated clusters, according to your usage. If your Serverless instance is migrated to a Free cluster or dedicated cluster, you must use the Cluster API endpoint instead. To see which tiers Atlas will migrate your instances to, consult the All Clusters page in the Atlas UI.
If you attempt to create an M2 or M5 cluster using the
creategroupcluster endpoint, or a Serverless instance
using the creategroupserverlessinstance endpoint, between
January of 2025 and January of 2026, you will instead create a
Flex cluster. Support for these endpoints ends January 2026.
You must replace calls to Serverless instance API endpoints with appropriately configured calls to the Clusters API endpoints before your Serverless instances are migrated to Flex clusters.
The following changes also apply to the listed API endpoints beginning January of 2025.
Endpoint | Impact |
|---|---|
Deprecated for new Flex clusters. Returns an error because Serverless instances are migrated to Free, Flex or dedicated clusters as of May 2025. | |
When used on Flex clusters, | |
When used on Flex clusters, | |
When used on Flex clusters, | |
When used on Flex clusters, | |
When used on Flex clusters, |
Terraform Atlas Provider Migration
The HashiCorp Terraform Provider
supports Flex clusters. General Terraform support for M2/M5
clusters and Serverless instances will continue until January 2026.
You must update your Terraform configurations to operate on Flex clusters according to the following timelines, depending on which features you use:
Feature | Update Deadline |
|---|---|
April, 2025 | |
Serverless PrivateLink Endpoint Service for new Serverless instances | January, 2025 |
Serverless PrivateLink Endpoint Service for existing Serverless instances | May, 2025 |
All other features | January, 2026 |
Go SDK Migration
The Atlas Go SDK supports Flex clusters starting in November
of 2024. General SDK support for M2/M5 clusters and
Serverless instances continues until January 2026. You must
update your SDK scripts to operate on Flex clusters according to
the following timelines, depending on which features you use:
Feature | Update Deadline |
|---|---|
May, 2025 | |
All other features | January, 2026 |
Atlas CLI Migration
The Atlas CLI supports Flex clusters beginning December 2024. To learn more, see command reference and select the latest Atlas CLI version from the dropdown.
Support for continuous cloud backup on Serverless instances ended in January 2025. If you used continuous cloud backup on any of your Serverless instances, you must update your Atlas CLI workflows to remove Serverless Instance continuous cloud backup to avoid errors.
General Atlas CLI support for M2/M5 clusters and
Serverless instances continues until January 2026. Before January 2026,
you must remove all M2/M5 and Serverless Instance commands
from your Atlas CLI workflows.
Atlas Kubernetes Operator Migration
The Atlas Kubernetes Operator supports Flex clusters beginning February 2025.
Until January 2026, to preserve backwards compatibility for a period of time, Atlas allows you to manage migrated clusters through both the Serverless instances and Flex clusters APIs, including when you're using Atlas Kubernetes Operator.
You can create and manage Flex clusters in the same
AtlasDeploymentCustom Resources in which you created and managed Serverless instances andM2andM5clusters. To learn more, see the AtlasDeployment custom resource in the Atlas Kubernetes Operator documentation.You can't create NEW
M2/M5clusters and Serverless instances in Atlas. Attempting to do so creates a Flex cluster instead.Replace references to
spec.serverlessSpecin theAtlasDeploymentCustom Resource with the configuration forspec.flexSpec.Replace references to
spec.deploymentSpecin theAtlasDeploymentCustom Resource with the configuration forspec.flexSpec.If you receive errors during reconciliations related to private endpoints, you must upgrade to at least Atlas Kubernetes Operator 2.7.1 or later, or replace the
serverlessSpecconfiguration with the configuration forflexSpecin theAtlasDeploymentcustom resource.To avoid reconciliation errors that you might notice after the automigration,
make the following changes to your CRD configurations:
Remove the
spec.deploymentSpec.replicationSpecs.zoneNamesetting.Remove any of the
spec.deploymentSpec.replicationSpecs.regionConfigssettings after the first set of settings.Specify
replicasetonly in thespec.deploymentSpec.clusterType.
Alternatively, replace references to
spec.deploymentSpecin theAtlasDeploymentCustom Resource with the configuration forspec.flexSpec.By January 2026, you must remove all remaining
M2/M5and Serverless Instance configurations from your Atlas Kubernetes Operator custom resources because backwards compatibility of APIs ends January 2026. At that time, the old APIs will be removed and only APIs related to Flex clusters will remain in place. Releases of Atlas Kubernetes Operator after 2.7.1 don't support existing Serverless instances.
Atlas CloudFormation Migration
Atlas CloudFormation and Cloud Development Kit (CDK) now support Flex clusters.
General support for M2/M5 clusters continues until January 2026.
Support for Serverless Private Endpoints
and the Properties.ContinuousBackupEnabled parameter of the
Serverless Instance
resource ended when Atlas CloudFormation introduced Flex cluster
support. These resources are no longer available in CloudFormation or CDK.
Update your configurations to remove them. You must remove all
M2/M5 and Serverless instance features from your Atlas
CloudFormation and CDK resources before January 2026.
Important
Use the MongoDB::Atlas::Cluster resource in CloudFormation or the CfnCluster resource in CDK
instead of the MongoDB::Atlas::FlexCluster resource in CloudFormation or the CfnFlexCluster resource in CDK
to create and manage Flex clusters. MongoDB::Atlas::Cluster and CfnCluster support
Flex clusters, and future upgrades will be available only through these resources.
CloudFormation and CDK do not yet support migration between Flex clusters and other cluster types,
but support will be added in the future.
For more information, see: