From 77d4289fcb3f8529c7ea54eff52b19e220adba13 Mon Sep 17 00:00:00 2001 From: Jeroen Vervaeke Date: Fri, 31 Jan 2025 14:43:04 +0000 Subject: [PATCH 1/2] Improved M2 and M5 flex documentation --- docs/command/atlas-clusters-create.txt | 2 ++ docs/command/atlas-clusters-update.txt | 2 ++ internal/cli/clusters/clusters.go | 2 +- internal/cli/clusters/create.go | 2 ++ internal/cli/clusters/update.go | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/command/atlas-clusters-create.txt b/docs/command/atlas-clusters-create.txt index 92014bab8f..a7c4a2c298 100644 --- a/docs/command/atlas-clusters-create.txt +++ b/docs/command/atlas-clusters-create.txt @@ -17,6 +17,8 @@ Create a cluster for your project. To get started quickly, specify a name for your cluster, a cloud provider, and a region to deploy a three-member replica set with the latest MongoDB server version. For full control of your deployment, or to create multi-cloud clusters, provide a JSON configuration file with the --file flag. +Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. + To use this command, you must authenticate with a user account or an API key with the Project Owner role. Syntax diff --git a/docs/command/atlas-clusters-update.txt b/docs/command/atlas-clusters-update.txt index 858079e5a8..76b8732ce6 100644 --- a/docs/command/atlas-clusters-update.txt +++ b/docs/command/atlas-clusters-update.txt @@ -20,6 +20,8 @@ You can't change the name of the cluster or downgrade the MongoDB version of you You can only update a replica set to a single-shard cluster; you cannot update a replica set to a multi-sharded cluster. To learn more, see https://www.mongodb.com/docs/atlas/scale-cluster/#convert-a-replica-set-to-a-sharded-cluster and https://www.mongodb.com/docs/upcoming/tutorial/convert-replica-set-to-replicated-shard-cluster. +Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. + To use this command, you must authenticate with a user account or an API key with the Project Cluster Manager role. Atlas supports this command only for M10+ clusters diff --git a/internal/cli/clusters/clusters.go b/internal/cli/clusters/clusters.go index f72cbfb414..478f717aff 100644 --- a/internal/cli/clusters/clusters.go +++ b/internal/cli/clusters/clusters.go @@ -35,7 +35,7 @@ var errFailedToLoadClusterFileMessage = errors.New("failed to parse JSON file") const ( cannotUseFlexWithClusterApisErrorCode = "CANNOT_USE_FLEX_CLUSTER_IN_CLUSTER_API" - deprecateMessageSharedTier = "The '%s' tier is deprecated. Please use '--tier FLEX' instead. For the migration guide and timeline, visit: https://dochub.mongodb.org/core/flex-migration.\n" + deprecateMessageSharedTier = "Deprecation note: the M2 and M5 tiers are now deprecated ('%s' was selected); when selecting M2 or M5, a FLEX tier will be created instead. For the migration guide and timeline, visit: https://dochub.mongodb.org/core/flex-migration.\n" ) func Builder() *cobra.Command { diff --git a/internal/cli/clusters/create.go b/internal/cli/clusters/create.go index 3af41770c7..9f298cba64 100644 --- a/internal/cli/clusters/create.go +++ b/internal/cli/clusters/create.go @@ -358,6 +358,8 @@ func CreateBuilder() *cobra.Command { Long: `To get started quickly, specify a name for your cluster, a cloud provider, and a region to deploy a three-member replica set with the latest MongoDB server version. For full control of your deployment, or to create multi-cloud clusters, provide a JSON configuration file with the --file flag. +Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. + ` + fmt.Sprintf(usage.RequiredRole, "Project Owner"), Example: ` # Deploy a free cluster named myCluster for the project with the ID 5e2211c17a3e5a48f5497de3: atlas cluster create myCluster --projectId 5e2211c17a3e5a48f5497de3 --provider AWS --region US_EAST_1 --tier M0 diff --git a/internal/cli/clusters/update.go b/internal/cli/clusters/update.go index be55d24864..4495b85e25 100644 --- a/internal/cli/clusters/update.go +++ b/internal/cli/clusters/update.go @@ -262,6 +262,8 @@ You can't change the name of the cluster or downgrade the MongoDB version of you You can only update a replica set to a single-shard cluster; you cannot update a replica set to a multi-sharded cluster. To learn more, see https://www.mongodb.com/docs/atlas/scale-cluster/#convert-a-replica-set-to-a-sharded-cluster and https://www.mongodb.com/docs/upcoming/tutorial/convert-replica-set-to-replicated-shard-cluster. +Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. + ` + fmt.Sprintf("%s\n%s", fmt.Sprintf(usage.RequiredRole, "Project Cluster Manager"), "Atlas supports this command only for M10+ clusters"), Example: ` # Update the tier for a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3: atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --tier M50 From c9cf81da45eadd7a23bf2e3b7521f0653cad25f9 Mon Sep 17 00:00:00 2001 From: Jeroen Vervaeke Date: Fri, 31 Jan 2025 15:55:46 +0000 Subject: [PATCH 2/2] Added link to dochub, removed the word timeline --- docs/command/atlas-clusters-create.txt | 2 +- docs/command/atlas-clusters-update.txt | 2 +- internal/cli/clusters/clusters.go | 2 +- internal/cli/clusters/create.go | 2 +- internal/cli/clusters/update.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/command/atlas-clusters-create.txt b/docs/command/atlas-clusters-create.txt index a7c4a2c298..c14ab60040 100644 --- a/docs/command/atlas-clusters-create.txt +++ b/docs/command/atlas-clusters-create.txt @@ -17,7 +17,7 @@ Create a cluster for your project. To get started quickly, specify a name for your cluster, a cloud provider, and a region to deploy a three-member replica set with the latest MongoDB server version. For full control of your deployment, or to create multi-cloud clusters, provide a JSON configuration file with the --file flag. -Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. +Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. For the migration guide, visit: https://dochub.mongodb.org/core/flex-migration.\n To use this command, you must authenticate with a user account or an API key with the Project Owner role. diff --git a/docs/command/atlas-clusters-update.txt b/docs/command/atlas-clusters-update.txt index 76b8732ce6..e241238fbf 100644 --- a/docs/command/atlas-clusters-update.txt +++ b/docs/command/atlas-clusters-update.txt @@ -20,7 +20,7 @@ You can't change the name of the cluster or downgrade the MongoDB version of you You can only update a replica set to a single-shard cluster; you cannot update a replica set to a multi-sharded cluster. To learn more, see https://www.mongodb.com/docs/atlas/scale-cluster/#convert-a-replica-set-to-a-sharded-cluster and https://www.mongodb.com/docs/upcoming/tutorial/convert-replica-set-to-replicated-shard-cluster. -Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. +Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. For the migration guide, visit: https://dochub.mongodb.org/core/flex-migration.\n To use this command, you must authenticate with a user account or an API key with the Project Cluster Manager role. Atlas supports this command only for M10+ clusters diff --git a/internal/cli/clusters/clusters.go b/internal/cli/clusters/clusters.go index 478f717aff..495ef3f182 100644 --- a/internal/cli/clusters/clusters.go +++ b/internal/cli/clusters/clusters.go @@ -35,7 +35,7 @@ var errFailedToLoadClusterFileMessage = errors.New("failed to parse JSON file") const ( cannotUseFlexWithClusterApisErrorCode = "CANNOT_USE_FLEX_CLUSTER_IN_CLUSTER_API" - deprecateMessageSharedTier = "Deprecation note: the M2 and M5 tiers are now deprecated ('%s' was selected); when selecting M2 or M5, a FLEX tier will be created instead. For the migration guide and timeline, visit: https://dochub.mongodb.org/core/flex-migration.\n" + deprecateMessageSharedTier = "Deprecation note: the M2 and M5 tiers are now deprecated ('%s' was selected); when selecting M2 or M5, a FLEX tier will be created instead. For the migration guide, visit: https://dochub.mongodb.org/core/flex-migration.\n" ) func Builder() *cobra.Command { diff --git a/internal/cli/clusters/create.go b/internal/cli/clusters/create.go index 9f298cba64..91503898b1 100644 --- a/internal/cli/clusters/create.go +++ b/internal/cli/clusters/create.go @@ -358,7 +358,7 @@ func CreateBuilder() *cobra.Command { Long: `To get started quickly, specify a name for your cluster, a cloud provider, and a region to deploy a three-member replica set with the latest MongoDB server version. For full control of your deployment, or to create multi-cloud clusters, provide a JSON configuration file with the --file flag. -Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. +Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. For the migration guide, visit: https://dochub.mongodb.org/core/flex-migration.\n ` + fmt.Sprintf(usage.RequiredRole, "Project Owner"), Example: ` # Deploy a free cluster named myCluster for the project with the ID 5e2211c17a3e5a48f5497de3: diff --git a/internal/cli/clusters/update.go b/internal/cli/clusters/update.go index 4495b85e25..55585c55a2 100644 --- a/internal/cli/clusters/update.go +++ b/internal/cli/clusters/update.go @@ -262,7 +262,7 @@ You can't change the name of the cluster or downgrade the MongoDB version of you You can only update a replica set to a single-shard cluster; you cannot update a replica set to a multi-sharded cluster. To learn more, see https://www.mongodb.com/docs/atlas/scale-cluster/#convert-a-replica-set-to-a-sharded-cluster and https://www.mongodb.com/docs/upcoming/tutorial/convert-replica-set-to-replicated-shard-cluster. -Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. +Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M5, a FLEX tier will be created instead. For the migration guide, visit: https://dochub.mongodb.org/core/flex-migration.\n ` + fmt.Sprintf("%s\n%s", fmt.Sprintf(usage.RequiredRole, "Project Cluster Manager"), "Atlas supports this command only for M10+ clusters"), Example: ` # Update the tier for a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3: