From 78df901ceed42bdf8b5bf083951cc06fb0e21139 Mon Sep 17 00:00:00 2001 From: Oriol Arbusi Date: Tue, 29 Oct 2024 11:38:39 +0100 Subject: [PATCH 01/23] wip: migration guides --- docs/guides/1.22.0-upgrade-guide.md | 27 +++++++++++++++++++ docs/guides/flex-cluster-migration-guide.md | 3 +++ .../serverless-deprecation-migration-guide.md | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 docs/guides/1.22.0-upgrade-guide.md create mode 100644 docs/guides/flex-cluster-migration-guide.md create mode 100644 docs/guides/serverless-deprecation-migration-guide.md diff --git a/docs/guides/1.22.0-upgrade-guide.md b/docs/guides/1.22.0-upgrade-guide.md new file mode 100644 index 0000000000..c9e6faeb18 --- /dev/null +++ b/docs/guides/1.22.0-upgrade-guide.md @@ -0,0 +1,27 @@ +--- +page_title: "Upgrade Guide 1.22.0" +--- + +# MongoDB Atlas Provider 1.22.0: Upgrade and Information Guide + +The Terraform MongoDB Atlas Provider version 1.22.0 has a number of new and exciting features. + +## New Resources, Data Sources, and Features + +- You can now manage Flex Clusters with the new `mongodbatlas_flex_cluster` resource and corresponding data sources. The feature is available as a preview feature. To learn more, please review `mongodbatlas_flex_cluster` [resource documentation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/flex_cluster). + +## Deprecations and removals + +Serverless deprecation. To learn more, please ee the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide) + +## Terraform MongoDB Atlas modules + +You can now leverage our [Terraform Modules](https://registry.terraform.io/namespaces/terraform-mongodbatlas-modules) to easily get started with MongoDB Atlas and critical features like [Push-based log export](https://registry.terraform.io/modules/terraform-mongodbatlas-modules/push-based-log-export/mongodbatlas/latest), [Private Endpoints](https://registry.terraform.io/modules/terraform-mongodbatlas-modules/private-endpoint/mongodbatlas/latest), etc. + +## Helpful Links + +* [Report bugs](https://github.com/mongodb/terraform-provider-mongodbatlas/issues) + +* [Request Features](https://feedback.mongodb.com/forums/924145-atlas?category_id=370723) + +* [Contact Support](https://docs.atlas.mongodb.com/support/) covered by MongoDB Atlas support plans, Developer and above. diff --git a/docs/guides/flex-cluster-migration-guide.md b/docs/guides/flex-cluster-migration-guide.md new file mode 100644 index 0000000000..3d3a9d8578 --- /dev/null +++ b/docs/guides/flex-cluster-migration-guide.md @@ -0,0 +1,3 @@ +--- +page_title: "Migration Guide: Migration to Flex Cluster" +--- \ No newline at end of file diff --git a/docs/guides/serverless-deprecation-migration-guide.md b/docs/guides/serverless-deprecation-migration-guide.md new file mode 100644 index 0000000000..b62dc616a6 --- /dev/null +++ b/docs/guides/serverless-deprecation-migration-guide.md @@ -0,0 +1,3 @@ +--- +page_title: "Migration Guide: Serverless Deprecation" +--- \ No newline at end of file From 5aa221327afcec04d69af5d8fa58d2480cc8ed1a Mon Sep 17 00:00:00 2001 From: Oriol Arbusi Date: Tue, 29 Oct 2024 11:59:11 +0100 Subject: [PATCH 02/23] add details on 1.22 guide --- docs/guides/1.22.0-upgrade-guide.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/guides/1.22.0-upgrade-guide.md b/docs/guides/1.22.0-upgrade-guide.md index c9e6faeb18..338062d8fe 100644 --- a/docs/guides/1.22.0-upgrade-guide.md +++ b/docs/guides/1.22.0-upgrade-guide.md @@ -12,7 +12,10 @@ The Terraform MongoDB Atlas Provider version 1.22.0 has a number of new and exci ## Deprecations and removals -Serverless deprecation. To learn more, please ee the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide) +- `continuous_backup_enabled` attribute has been deprecated in `mongodbatlas_serverless_instance` resource and data sources. To learn more, please see the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide). +- `auto_indexing` attribute has been deprecated in `mongodbatlas_serverless_instance` resource and data sources. To learn more, please see the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide). +- `mongodbatlas_privatelink_endpoint_serverless` resource has been deprecated. To learn more, please see the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide). +- `mongodbatlas_privatelink_endpoint_service_serverless` resource, `mongodbatlas_privatelink_endpoint_service_serverless` and `mongodbatlas_privatelink_endpoints_service_serverless` data sources have been deprecated. To learn more, please see the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide). ## Terraform MongoDB Atlas modules From b4ff40d7f6b55a8dc5bda6d2c932d5c4134092e8 Mon Sep 17 00:00:00 2001 From: Oriol Arbusi Date: Tue, 29 Oct 2024 12:11:03 +0100 Subject: [PATCH 03/23] remove guide, will be in resource docs --- docs/guides/flex-cluster-migration-guide.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 docs/guides/flex-cluster-migration-guide.md diff --git a/docs/guides/flex-cluster-migration-guide.md b/docs/guides/flex-cluster-migration-guide.md deleted file mode 100644 index 3d3a9d8578..0000000000 --- a/docs/guides/flex-cluster-migration-guide.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -page_title: "Migration Guide: Migration to Flex Cluster" ---- \ No newline at end of file From d995b5bf031a80624764eb5b124356c1ff786165 Mon Sep 17 00:00:00 2001 From: Oriol Arbusi Date: Tue, 29 Oct 2024 12:41:04 +0100 Subject: [PATCH 04/23] wip: correct details on 1.22 guide --- docs/guides/1.22.0-upgrade-guide.md | 8 ++++---- .../serverless-deprecation-migration-guide.md | 3 --- .../serverless-shared-migration-guide.md | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-) delete mode 100644 docs/guides/serverless-deprecation-migration-guide.md create mode 100644 docs/guides/serverless-shared-migration-guide.md diff --git a/docs/guides/1.22.0-upgrade-guide.md b/docs/guides/1.22.0-upgrade-guide.md index 338062d8fe..961e7ddbe6 100644 --- a/docs/guides/1.22.0-upgrade-guide.md +++ b/docs/guides/1.22.0-upgrade-guide.md @@ -12,10 +12,10 @@ The Terraform MongoDB Atlas Provider version 1.22.0 has a number of new and exci ## Deprecations and removals -- `continuous_backup_enabled` attribute has been deprecated in `mongodbatlas_serverless_instance` resource and data sources. To learn more, please see the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide). -- `auto_indexing` attribute has been deprecated in `mongodbatlas_serverless_instance` resource and data sources. To learn more, please see the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide). -- `mongodbatlas_privatelink_endpoint_serverless` resource has been deprecated. To learn more, please see the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide). -- `mongodbatlas_privatelink_endpoint_service_serverless` resource, `mongodbatlas_privatelink_endpoint_service_serverless` and `mongodbatlas_privatelink_endpoints_service_serverless` data sources have been deprecated. To learn more, please see the [Migration Guide: Serverless Deprecation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-deprecation-migration-guide). +- `continuous_backup_enabled` attribute has been deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload needs this feature, we recommend to switch to Atlas Dedicated clusters instead. For more details please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). +- `auto_indexing` attribute has been deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload needs this feature, we recommend to switch to Atlas Dedicated clusters instead. For more details please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). +- `mongodbatlas_privatelink_endpoint_serverless` resource has been deprecated. If your workload needs this feature, we recommend to switch to Atlas Dedicated clusters instead. For more details please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). +- `mongodbatlas_privatelink_endpoint_service_serverless` resource, `mongodbatlas_privatelink_endpoint_service_serverless` and `mongodbatlas_privatelink_endpoints_service_serverless` data sources have been deprecated.If your workload needs this feature, we recommend to switch to Atlas Dedicated clusters instead. For more details please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). ## Terraform MongoDB Atlas modules diff --git a/docs/guides/serverless-deprecation-migration-guide.md b/docs/guides/serverless-deprecation-migration-guide.md deleted file mode 100644 index b62dc616a6..0000000000 --- a/docs/guides/serverless-deprecation-migration-guide.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -page_title: "Migration Guide: Serverless Deprecation" ---- \ No newline at end of file diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md new file mode 100644 index 0000000000..95c660b9b7 --- /dev/null +++ b/docs/guides/serverless-shared-migration-guide.md @@ -0,0 +1,19 @@ +--- +page_title: "Migration Guide: Transition out of Serverless Instances and Shared-tier clusters" +--- + +# Migration Guide: Transition out of Serverless Instances and Shared-tier clusters + +The goal of this guide is to help users transition out of Serverless Instances (`mongodbatlas_serverless_instance`) and Shared-tier clusters (M2 and M5) in favor of Flex or Dedicated Clusters. + +## From M2/M5 clusters to Flex + + +## From Serverless to Flex + + +## From Serverless to Dedicated + + +## From Serverless to Free + From 251b8afc84de1f9c40a591cd706e6c60412f503d Mon Sep 17 00:00:00 2001 From: Melanija Cvetic Date: Wed, 30 Oct 2024 16:31:24 +0000 Subject: [PATCH 05/23] added migration guide for serverless to flex and serverless to dedicated --- .../serverless-shared-migration-guide.md | 79 ++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index 95c660b9b7..b5db4dbe59 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -6,14 +6,91 @@ page_title: "Migration Guide: Transition out of Serverless Instances and Shared- The goal of this guide is to help users transition out of Serverless Instances (`mongodbatlas_serverless_instance`) and Shared-tier clusters (M2 and M5) in favor of Flex or Dedicated Clusters. +After March 2025, all Serverless instances and Shared-tier clusters will be automatically converted to Flex/Dedicated clusters, results in configuration drift in Terraform. Migration from Serverless instances and Shared-tier clusters to Flex/Dedicated clusters can be done manually before March 2025. + +If a Serverless instance/Shared-tier cluster does not fit the constraints of a Flex cluster, it will be converted into a Dedicated cluster which will result in downtime and workload disruption. It will otherwise be converted into a Flex cluster. + +**Note:** We recommend to wait until March 2025 for Serverless instances and Shared-tier clusters to be autoconverted. + ## From M2/M5 clusters to Flex ## From Serverless to Flex +### Pre-Autoconversion Migration Procedure + +1. Create a new Flex Cluster directly from your `.tf` file, e.g.: + + ```terraform + resource "mongodbatlas_flex_cluster" "flex_cluster" { + project_id = var.project_id + name = "clusterName" + provider_settings = { + backing_provider_name = "AWS" + region_name = "US_EAST_1" + } + termination_protection_enabled = true + } + ``` +2. Run `terraform apply` to create the new resource. +3. Migrate data from Serverless Instance to Flex Cluster using `mongodump` and `mongostore`. + + Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) + + Verify that your data is present within the desired Flex cluster before proceeding. +4. Remove serverless instance from your terraform state by deleting its resource block and run `terraform apply` to destory the Serverless Instance. + +### Post-Autoconversion Migration Procedure + +Given your Serverless Instance fits the constraints of a Flex cluster, it alongisde all its data will have been automatically converted into a Flex cluster in Atlas. The following will resolve the configuration drift in Terraform. + +1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` +2. Add an import block per cluster to one of your `.tf` files: + ```terraform + import { + to = mongodbatlas_flex_cluster.flex_cluster + id = "664619d870c247237f4b86a6-flexClusterName" # from step 1 + } + ``` +3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. +4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` +5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration will have static values. Look in your previous configuration for: + - variables, for example: `var.project_id` + - Terraform keywords, for example: `for_each`, `count`, and `depends_on` +6. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform will create a plan to delete your existing cluster. +7. Remove the import block created in step 2. +8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` + ## From Serverless to Dedicated +Migration from Serverless to Dedicated cannot be done using the Terraform provider. -## From Serverless to Free +**Note:** We recommend waiting until January 2025 for a UI based migration tool. + +### Pre-Autoconversion Migration Procedure + +To migrate from Serverless to Dedicated prior to January 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) +### Post-Autoconversion Migration Procedure +Given your Serverless Instance did not fit the constraints of a Flex cluster, it alongisde all its data will have been automatically converted into a Dedicated cluster in Atlas. The following will resolve the configuration drift in Terraform. + +1. Find the import IDs of the Dedicated clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-advancedClusterName` +2. Add an import block per cluster to one of your `.tf` files: + ```terraform + import { + to = mongodbatlas_advanced_cluster.advanced_cluster + id = "664619d870c247237f4b86a6-advancedClusterName" # from step 1 + } + ``` +3. Run `terraform plan -generate-config-out=adv_cluster.tf`. This should generate a `adv_cluster.tf` file with your Dedicated cluster in it. +4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` +5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration will have static values. Look in your previous configuration for: + - variables, for example: `var.project_id` + - Terraform keywords, for example: `for_each`, `count`, and `depends_on` +6. Replace your existing clusters with the ones from `adv_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform will create a plan to delete your existing cluster. +7. Remove the import block created in step 2. +8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` + + +## From Serverless to Free From 946a842b5d9e5abe8e8bb70f752c1f3cf4798097 Mon Sep 17 00:00:00 2001 From: Melanija Cvetic Date: Thu, 31 Oct 2024 17:31:33 +0000 Subject: [PATCH 06/23] added migration guide for shared-tier to flex --- .../serverless-shared-migration-guide.md | 61 +++++++++++++++++-- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index b5db4dbe59..c1e053f832 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -6,13 +6,60 @@ page_title: "Migration Guide: Transition out of Serverless Instances and Shared- The goal of this guide is to help users transition out of Serverless Instances (`mongodbatlas_serverless_instance`) and Shared-tier clusters (M2 and M5) in favor of Flex or Dedicated Clusters. -After March 2025, all Serverless instances and Shared-tier clusters will be automatically converted to Flex/Dedicated clusters, results in configuration drift in Terraform. Migration from Serverless instances and Shared-tier clusters to Flex/Dedicated clusters can be done manually before March 2025. +After March 2025, all Serverless instances and Shared-tier clusters will be automatically converted to Flex/Dedicated clusters, results in configuration drift in Terraform. If a Serverless instance/Shared-tier cluster does not fit the constraints of a Flex cluster, it will be converted into a Dedicated cluster which will result in downtime and workload disruption. It will otherwise be converted into a Flex cluster. -If a Serverless instance/Shared-tier cluster does not fit the constraints of a Flex cluster, it will be converted into a Dedicated cluster which will result in downtime and workload disruption. It will otherwise be converted into a Flex cluster. +Migration from Serverless instances and Shared-tier clusters to Flex/Dedicated clusters can be done manually before March 2025. **Note:** We recommend to wait until March 2025 for Serverless instances and Shared-tier clusters to be autoconverted. ## From M2/M5 clusters to Flex +### Pre-Autoconversion Migration Procedure + +1. Create a new Flex Cluster directly from your `.tf` file, e.g.: + + ```terraform + resource "mongodbatlas_flex_cluster" "flex_cluster" { + project_id = var.project_id + name = "clusterName" + provider_settings = { + backing_provider_name = "AWS" + region_name = "US_EAST_1" + } + termination_protection_enabled = true + } + ``` +2. Run `terraform apply` to create the new resource. +3. Migrate data from your Shared-tier cluster to the Flex cluster using `mongodump` and `mongostore`. + + Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) + + Verify that your data is present within the Flex cluster before proceeding. +4. Delete the Shared-tier cluster by running a destory command targetting the Shared-tier cluster: + + `terraform destroy -target=mongodbatlas_advanced_cluster.` + + 5. You may now safely remove the resource block for the Shared-tier cluster from your `.tf` file. + +### Post-Autoconversion Migration Procedure + +Given your Shared-tier cluster fits the constraints of a Flex cluster, it alongisde all its data will have been automatically converted into a Flex cluster in Atlas. The following will resolve the configuration drift in Terraform. + +1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` +2. Add an import block per cluster to one of your `.tf` files: + ```terraform + import { + to = mongodbatlas_flex_cluster.flex_cluster + id = "664619d870c247237f4b86a6-flexClusterName" # from step 1 + } + ``` +3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. +4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` +5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration will have static values. Look in your previous configuration for: + - variables, for example: `var.project_id` + - Terraform keywords, for example: `for_each`, `count`, and `depends_on` +6. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_advanced_cluster.advClusterName`. Without this step, Terraform will create a plan to delete your existing cluster. +7. Remove the import block created in step 2. +8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` ## From Serverless to Flex @@ -33,12 +80,16 @@ If a Serverless instance/Shared-tier cluster does not fit the constraints of a F } ``` 2. Run `terraform apply` to create the new resource. -3. Migrate data from Serverless Instance to Flex Cluster using `mongodump` and `mongostore`. +3. Migrate data from your Serverless Instance to the Flex cluster using `mongodump` and `mongostore`. Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) - Verify that your data is present within the desired Flex cluster before proceeding. -4. Remove serverless instance from your terraform state by deleting its resource block and run `terraform apply` to destory the Serverless Instance. + Verify that your data is present within the Flex cluster before proceeding. +4. Delete the Shared-tier cluster by running a destory command targetting the Shared-tier cluster: + + `terraform destroy -target=mongodbatlas_serverless_instance.` + + 5. You may now safely remove the resource block for the Serverless Instance from your `.tf` file. ### Post-Autoconversion Migration Procedure From 026c32e5773b5968b258dd20e2b84f91fabc5b90 Mon Sep 17 00:00:00 2001 From: Melanija Cvetic Date: Thu, 31 Oct 2024 18:00:53 +0000 Subject: [PATCH 07/23] added migration guide for serverless to free --- .../serverless-shared-migration-guide.md | 64 +++++++++++++++++-- 1 file changed, 60 insertions(+), 4 deletions(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index c1e053f832..3a27c07a01 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -20,7 +20,7 @@ Migration from Serverless instances and Shared-tier clusters to Flex/Dedicated c ```terraform resource "mongodbatlas_flex_cluster" "flex_cluster" { project_id = var.project_id - name = "clusterName" + name = "flexClusterName" provider_settings = { backing_provider_name = "AWS" region_name = "US_EAST_1" @@ -28,7 +28,7 @@ Migration from Serverless instances and Shared-tier clusters to Flex/Dedicated c termination_protection_enabled = true } ``` -2. Run `terraform apply` to create the new resource. +2. Run `terraform apply` to create the new resource. 3. Migrate data from your Shared-tier cluster to the Flex cluster using `mongodump` and `mongostore`. Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) @@ -71,7 +71,7 @@ Given your Shared-tier cluster fits the constraints of a Flex cluster, it alongi ```terraform resource "mongodbatlas_flex_cluster" "flex_cluster" { project_id = var.project_id - name = "clusterName" + name = "flexClusterName" provider_settings = { backing_provider_name = "AWS" region_name = "US_EAST_1" @@ -85,7 +85,7 @@ Given your Shared-tier cluster fits the constraints of a Flex cluster, it alongi Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) Verify that your data is present within the Flex cluster before proceeding. -4. Delete the Shared-tier cluster by running a destory command targetting the Shared-tier cluster: +4. Delete the Serverless Instance by running a destory command targetting the Serverless Instance: `terraform destroy -target=mongodbatlas_serverless_instance.` @@ -145,3 +145,59 @@ Given your Serverless Instance did not fit the constraints of a Flex cluster, it ## From Serverless to Free + +### Pre-Autoconversion Migration Procedure + +1. Create a new Free Cluster directly from your `.tf` file, e.g.: + + ```terraform + resource "mongodbatlas_advanced_cluster" "free-cluster" { + project_id = var.atlas_project_id + name = "freeClusterName" + cluster_type = "REPLICASET" + + replication_specs { + region_configs { + electable_specs { + instance_size = "M0" + } + provider_name = "TENANT" + backing_provider_name = "AWS" + region_name = "US_EAST_1" + priority = 7 + } + } + } + ``` +2. Run `terraform apply` to create the new resource. +3. Migrate data from your Serverless Instance to the Free cluster using `mongodump` and `mongostore`. + + Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) + + Verify that your data is present within the Free cluster before proceeding. +4. Delete the Serverless Instance by running a destory command targetting the Serverless Instance: + + `terraform destroy -target=mongodbatlas_serverless_instance.` + + 5. You may now safely remove the resource block for the Serverless Instance from your `.tf` file. + +### Post-Autoconversion Migration Procedure + +Given your Serverless Instance has $0 MRR, it alongisde all its data will have been automatically converted into a Free cluster in Atlas. The following will resolve the configuration drift in Terraform. + +1. Find the import IDs of the Free clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-freeClusterName` +2. Add an import block per cluster to one of your `.tf` files: + ```terraform + import { + to = mongodbatlas_advanced_cluster.free_cluster + id = "664619d870c247237f4b86a6-freeClusterName" # from step 1 + } + ``` +3. Run `terraform plan -generate-config-out=free_cluster.tf`. This should generate a `free_cluster.tf` file with your Free cluster in it. +4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` +5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration will have static values. Look in your previous configuration for: + - variables, for example: `var.project_id` + - Terraform keywords, for example: `for_each`, `count`, and `depends_on` +6. Replace your existing clusters with the ones from `free_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform will create a plan to delete your existing cluster. +7. Remove the import block created in step 2. +8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` From 6b433793610ef86f747e2716b70154a2fe06441d Mon Sep 17 00:00:00 2001 From: Melanija Cvetic Date: Mon, 4 Nov 2024 16:45:00 +0000 Subject: [PATCH 08/23] implementing review feedback --- .../serverless-shared-migration-guide.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index 3a27c07a01..af026f1205 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -4,13 +4,13 @@ page_title: "Migration Guide: Transition out of Serverless Instances and Shared- # Migration Guide: Transition out of Serverless Instances and Shared-tier clusters -The goal of this guide is to help users transition out of Serverless Instances (`mongodbatlas_serverless_instance`) and Shared-tier clusters (M2 and M5) in favor of Flex or Dedicated Clusters. +The goal of this guide is to help users transition from Serverless Instances (`mongodbatlas_serverless_instance`) and Shared-tier clusters (M2 and M5) to Flex or Dedicated Clusters. -After March 2025, all Serverless instances and Shared-tier clusters will be automatically converted to Flex/Dedicated clusters, results in configuration drift in Terraform. If a Serverless instance/Shared-tier cluster does not fit the constraints of a Flex cluster, it will be converted into a Dedicated cluster which will result in downtime and workload disruption. It will otherwise be converted into a Flex cluster. +After March 2025, all Serverless instances and Shared-tier clusters will automatically convert to Flex/Dedicated clusters, resulting in configuration drift in Terraform. If a Serverless instance or Shared-tier cluster does not fit the constraints of a Flex cluster, it will convert into a Dedicated cluster, resulting in downtime and workload disruption. Otherwise, it will convert to a Flex cluster. -Migration from Serverless instances and Shared-tier clusters to Flex/Dedicated clusters can be done manually before March 2025. +You can migrate from Serverless instances and Shared-tier clusters to Flex or Dedicated clusters manually before March 2025. -**Note:** We recommend to wait until March 2025 for Serverless instances and Shared-tier clusters to be autoconverted. +**Note:** We recommend waiting until March 2025 for Serverless instances and Shared-tier clusters to autoconvert. ## From M2/M5 clusters to Flex ### Pre-Autoconversion Migration Procedure @@ -34,15 +34,15 @@ Migration from Serverless instances and Shared-tier clusters to Flex/Dedicated c Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) Verify that your data is present within the Flex cluster before proceeding. -4. Delete the Shared-tier cluster by running a destory command targetting the Shared-tier cluster: +4. Delete the Shared-tier cluster by running a destroy command against it: `terraform destroy -target=mongodbatlas_advanced_cluster.` - 5. You may now safely remove the resource block for the Shared-tier cluster from your `.tf` file. + 5. Remove the resource block for the Shared-tier cluster from your `.tf` file. ### Post-Autoconversion Migration Procedure -Given your Shared-tier cluster fits the constraints of a Flex cluster, it alongisde all its data will have been automatically converted into a Flex cluster in Atlas. The following will resolve the configuration drift in Terraform. +Given your Shared-tier cluster fits the constraints of a Flex cluster, it will automatically convert to a Flex cluster in Atlas, retaining all data. The following resolves the configuration drift in Terraform: 1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` 2. Add an import block per cluster to one of your `.tf` files: @@ -54,10 +54,10 @@ Given your Shared-tier cluster fits the constraints of a Flex cluster, it alongi ``` 3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration will have static values. Look in your previous configuration for: +5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_advanced_cluster.advClusterName`. Without this step, Terraform will create a plan to delete your existing cluster. +6. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_advanced_cluster.advClusterName`. Without this step, Terraform creates a plan to delete your existing cluster. 7. Remove the import block created in step 2. 8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` @@ -85,7 +85,7 @@ Given your Shared-tier cluster fits the constraints of a Flex cluster, it alongi Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) Verify that your data is present within the Flex cluster before proceeding. -4. Delete the Serverless Instance by running a destory command targetting the Serverless Instance: +4. Delete the Serverless Instance by running a destroy command against it: `terraform destroy -target=mongodbatlas_serverless_instance.` @@ -93,7 +93,7 @@ Given your Shared-tier cluster fits the constraints of a Flex cluster, it alongi ### Post-Autoconversion Migration Procedure -Given your Serverless Instance fits the constraints of a Flex cluster, it alongisde all its data will have been automatically converted into a Flex cluster in Atlas. The following will resolve the configuration drift in Terraform. +Given your Serverless Instance fits the constraints of a Flex cluster, it will automatically convert into a Flex cluster in Atlas, retaining all data. The following resolves the configuration drift in Terraform. 1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` 2. Add an import block per cluster to one of your `.tf` files: @@ -105,26 +105,26 @@ Given your Serverless Instance fits the constraints of a Flex cluster, it alongi ``` 3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration will have static values. Look in your previous configuration for: +5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform will create a plan to delete your existing cluster. +6. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform creates a plan to delete your existing cluster. 7. Remove the import block created in step 2. 8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` ## From Serverless to Dedicated -Migration from Serverless to Dedicated cannot be done using the Terraform provider. +You cannot migrate from Serverless to Dedicated using the Terraform provider. -**Note:** We recommend waiting until January 2025 for a UI based migration tool. +**Note:** We recommend waiting until January 2025 for a UI-based migration tool. ### Pre-Autoconversion Migration Procedure To migrate from Serverless to Dedicated prior to January 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) ### Post-Autoconversion Migration Procedure -Given your Serverless Instance did not fit the constraints of a Flex cluster, it alongisde all its data will have been automatically converted into a Dedicated cluster in Atlas. The following will resolve the configuration drift in Terraform. +Given your Serverless Instance doesn't fit the constraints of a Flex cluster, it will automatically convert into a Dedicated cluster in Atlas, retaining all data. The following resolves the configuration drift in Terraform: 1. Find the import IDs of the Dedicated clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-advancedClusterName` 2. Add an import block per cluster to one of your `.tf` files: @@ -136,10 +136,10 @@ Given your Serverless Instance did not fit the constraints of a Flex cluster, it ``` 3. Run `terraform plan -generate-config-out=adv_cluster.tf`. This should generate a `adv_cluster.tf` file with your Dedicated cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration will have static values. Look in your previous configuration for: +5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Replace your existing clusters with the ones from `adv_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform will create a plan to delete your existing cluster. +6. Replace your existing clusters with the ones from `adv_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform creates a plan to delete your existing cluster. 7. Remove the import block created in step 2. 8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` @@ -175,15 +175,15 @@ Given your Serverless Instance did not fit the constraints of a Flex cluster, it Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) Verify that your data is present within the Free cluster before proceeding. -4. Delete the Serverless Instance by running a destory command targetting the Serverless Instance: +4. Delete the Serverless Instance by running a destroy command against the Serverless Instance: `terraform destroy -target=mongodbatlas_serverless_instance.` - 5. You may now safely remove the resource block for the Serverless Instance from your `.tf` file. + 5. Remove the resource block for the Serverless Instance from your `.tf` file. ### Post-Autoconversion Migration Procedure -Given your Serverless Instance has $0 MRR, it alongisde all its data will have been automatically converted into a Free cluster in Atlas. The following will resolve the configuration drift in Terraform. +Given your Serverless Instance has $0 MRR, it automatically converts into a Free cluster in Atlas, retaining all data. The following resolves the configuration drift in Terraform. 1. Find the import IDs of the Free clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-freeClusterName` 2. Add an import block per cluster to one of your `.tf` files: @@ -195,9 +195,9 @@ Given your Serverless Instance has $0 MRR, it alongisde all its data will have b ``` 3. Run `terraform plan -generate-config-out=free_cluster.tf`. This should generate a `free_cluster.tf` file with your Free cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration will have static values. Look in your previous configuration for: +5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Replace your existing clusters with the ones from `free_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform will create a plan to delete your existing cluster. +6. Replace your existing clusters with the ones from `free_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform creates a plan to delete your existing cluster. 7. Remove the import block created in step 2. 8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` From d8e929a18e43abbcde0594fe70faa7a23e570518 Mon Sep 17 00:00:00 2001 From: Melanija Cvetic Date: Mon, 4 Nov 2024 17:11:46 +0000 Subject: [PATCH 09/23] implementing feedback to guide --- docs/guides/1.22.0-upgrade-guide.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guides/1.22.0-upgrade-guide.md b/docs/guides/1.22.0-upgrade-guide.md index 961e7ddbe6..3ff6d5358d 100644 --- a/docs/guides/1.22.0-upgrade-guide.md +++ b/docs/guides/1.22.0-upgrade-guide.md @@ -12,10 +12,10 @@ The Terraform MongoDB Atlas Provider version 1.22.0 has a number of new and exci ## Deprecations and removals -- `continuous_backup_enabled` attribute has been deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload needs this feature, we recommend to switch to Atlas Dedicated clusters instead. For more details please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). -- `auto_indexing` attribute has been deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload needs this feature, we recommend to switch to Atlas Dedicated clusters instead. For more details please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). -- `mongodbatlas_privatelink_endpoint_serverless` resource has been deprecated. If your workload needs this feature, we recommend to switch to Atlas Dedicated clusters instead. For more details please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). -- `mongodbatlas_privatelink_endpoint_service_serverless` resource, `mongodbatlas_privatelink_endpoint_service_serverless` and `mongodbatlas_privatelink_endpoints_service_serverless` data sources have been deprecated.If your workload needs this feature, we recommend to switch to Atlas Dedicated clusters instead. For more details please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). +- `continuous_backup_enabled` attribute is deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). +- `auto_indexing` attribute is deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). +- `mongodbatlas_privatelink_endpoint_serverless` resource has been deprecated. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). +- `mongodbatlas_privatelink_endpoint_service_serverless` resource, `mongodbatlas_privatelink_endpoint_service_serverless` and `mongodbatlas_privatelink_endpoints_service_serverless` data sources have been deprecated. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). ## Terraform MongoDB Atlas modules From ade2baf4d347b2a83a80314b086fe98769814d77 Mon Sep 17 00:00:00 2001 From: Melanija Cvetic Date: Thu, 7 Nov 2024 12:13:36 +0000 Subject: [PATCH 10/23] changes to migration guide --- .../serverless-shared-migration-guide.md | 209 +++++++++++------- 1 file changed, 124 insertions(+), 85 deletions(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index af026f1205..6f0a3e6139 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -4,21 +4,33 @@ page_title: "Migration Guide: Transition out of Serverless Instances and Shared- # Migration Guide: Transition out of Serverless Instances and Shared-tier clusters -The goal of this guide is to help users transition from Serverless Instances (`mongodbatlas_serverless_instance`) and Shared-tier clusters (M2 and M5) to Flex or Dedicated Clusters. +The goal of this guide is to help users transition from Serverless Instances and Shared-tier clusters (M2/M5) to Free, Flex or Dedicated Clusters. -After March 2025, all Serverless instances and Shared-tier clusters will automatically convert to Flex/Dedicated clusters, resulting in configuration drift in Terraform. If a Serverless instance or Shared-tier cluster does not fit the constraints of a Flex cluster, it will convert into a Dedicated cluster, resulting in downtime and workload disruption. Otherwise, it will convert to a Flex cluster. +After March 2025, all Shared-tier clusters (`mongodbatlas_cluster` and `mongodbatlas_advanced_cluster`) will automatically convert to Flex clusters and all Serverless instances (`mongodb_serverless_instance`) will be converted into Free/Flex/Dedicated clusters, resulting in configuration drift in Terraform. -You can migrate from Serverless instances and Shared-tier clusters to Flex or Dedicated clusters manually before March 2025. -**Note:** We recommend waiting until March 2025 for Serverless instances and Shared-tier clusters to autoconvert. +You can migrate from Serverless instances and Shared-tier clusters manually before March 2025. -## From M2/M5 clusters to Flex +**NOTE:** We recommend waiting until March 2025 for Serverless instances and Shared-tier clusters to autoconvert. + +If a Serverless instance has $0 MRR, it automatically converts into a Free cluster. Else, if it does not fit the constraints of a Flex cluster, it will convert into a Dedicated cluster, resulting in downtime and workload disruption. Otherwise, it will convert to a Flex cluster. + + +We are working on enhancing the User Experience such that, in future, Terraform Atlas Providers users can make even fewer required changes to their scripts from what is shown below. More updates to come over the next few months. For more details reach out to: zuhair.ahmed@mongodb.com + +### Jump to: +- [Shared-tier to Flex](#from-shared-tier-clusters-to-flex) +- [Serverless to Free](#from-serverless-to-free) +- [Serverless to Flex](#from-serverless-to-flex) +- [Serverless to Dedicated](#from-serverless-to-dedicated) + +## From Shared-tier clusters to Flex ### Pre-Autoconversion Migration Procedure 1. Create a new Flex Cluster directly from your `.tf` file, e.g.: ```terraform - resource "mongodbatlas_flex_cluster" "flex_cluster" { + resource "mongodbatlas_flex_cluster" "this" { project_id = var.project_id name = "flexClusterName" provider_settings = { @@ -34,21 +46,29 @@ You can migrate from Serverless instances and Shared-tier clusters to Flex or De Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) Verify that your data is present within the Flex cluster before proceeding. -4. Delete the Shared-tier cluster by running a destroy command against it: +4. Delete the Shared-tier cluster by running a destroy command against it. + + For *mongodbatlas_advanced_cluster*: + + `terraform destroy -target=mongodbatlas_advanced_cluster.this` - `terraform destroy -target=mongodbatlas_advanced_cluster.` + For *mongodbatlas_cluster*: + + `terraform destroy -target=mongodbatlas_cluster.this` 5. Remove the resource block for the Shared-tier cluster from your `.tf` file. ### Post-Autoconversion Migration Procedure -Given your Shared-tier cluster fits the constraints of a Flex cluster, it will automatically convert to a Flex cluster in Atlas, retaining all data. The following resolves the configuration drift in Terraform: +Shared-tier clusters will automatically convert in March 2025 to Flex clusters in Atlas, retaining all data. + +The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: 1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` 2. Add an import block per cluster to one of your `.tf` files: ```terraform import { - to = mongodbatlas_flex_cluster.flex_cluster + to = mongodbatlas_flex_cluster.this id = "664619d870c247237f4b86a6-flexClusterName" # from step 1 } ``` @@ -57,10 +77,80 @@ Given your Shared-tier cluster fits the constraints of a Flex cluster, it will a 5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_advanced_cluster.advClusterName`. Without this step, Terraform creates a plan to delete your existing cluster. -7. Remove the import block created in step 2. -8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` +6. Update the references from your previous cluster resource: `mongodbatlas_advanced_cluster.this.X` or `mongodbatlas_cluster.this.X` to the new `mongodbatlas_flex_cluster.this.X`. +7. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. +8. Replace your existing clusters with the ones from `flex_cluster.tf` and run + + `terraform state rm mongodbatlas_advanced_cluster.this` + + or `terraform state rm mongodbatlas_cluster.this`. + + Without this step, Terraform creates a plan to delete your existing cluster. + +9. Remove the import block created in step 2. +10. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` + +## From Serverless to Free + +### Pre-Autoconversion Migration Procedure + +1. Create a new Free Cluster directly from your `.tf` file, e.g.: + ```terraform + resource "mongodbatlas_advanced_cluster" "this" { + project_id = var.atlas_project_id + name = "freeClusterName" + cluster_type = "REPLICASET" + + replication_specs { + region_configs { + electable_specs { + instance_size = "M0" + } + provider_name = "TENANT" + backing_provider_name = "AWS" + region_name = "US_EAST_1" + priority = 7 + } + } + } + ``` +2. Run `terraform apply` to create the new resource. +3. Migrate data from your Serverless Instance to the Free cluster using `mongodump` and `mongostore`. + + Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) + + Verify that your data is present within the Free cluster before proceeding. +4. Delete the Serverless Instance by running a destroy command against the Serverless Instance: + + `terraform destroy -target=mongodbatlas_serverless_instance.this` + + 5. Remove the resource block for the Serverless Instance from your `.tf` file. + +### Post-Autoconversion Migration Procedure + +Given your Serverless Instance has $0 MRR, it will automatically convert in March 2025 into a Free cluster in Atlas, retaining all data. + +The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: + +1. Find the import IDs of the Free clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-freeClusterName` +2. Add an import block per cluster to one of your `.tf` files: + ```terraform + import { + to = mongodbatlas_advanced_cluster.this + id = "664619d870c247237f4b86a6-freeClusterName" # from step 1 + } + ``` +3. Run `terraform plan -generate-config-out=free_cluster.tf`. This should generate a `free_cluster.tf` file with your Free cluster in it. +4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` +5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: + - variables, for example: `var.project_id` + - Terraform keywords, for example: `for_each`, `count`, and `depends_on` +6. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_advanced_cluster.this.X`. +7. Update any shared-tier data source blocks to refer to `mongodbatlas_advanced_cluster`. +8. Replace your existing clusters with the ones from `free_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. +9. Remove the import block created in step 2. +10. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` ## From Serverless to Flex @@ -69,7 +159,7 @@ Given your Shared-tier cluster fits the constraints of a Flex cluster, it will a 1. Create a new Flex Cluster directly from your `.tf` file, e.g.: ```terraform - resource "mongodbatlas_flex_cluster" "flex_cluster" { + resource "mongodbatlas_flex_cluster" "this" { project_id = var.project_id name = "flexClusterName" provider_settings = { @@ -87,19 +177,21 @@ Given your Shared-tier cluster fits the constraints of a Flex cluster, it will a Verify that your data is present within the Flex cluster before proceeding. 4. Delete the Serverless Instance by running a destroy command against it: - `terraform destroy -target=mongodbatlas_serverless_instance.` + `terraform destroy -target=mongodbatlas_serverless_instance.this` 5. You may now safely remove the resource block for the Serverless Instance from your `.tf` file. ### Post-Autoconversion Migration Procedure -Given your Serverless Instance fits the constraints of a Flex cluster, it will automatically convert into a Flex cluster in Atlas, retaining all data. The following resolves the configuration drift in Terraform. +Given your Serverless Instance fits the constraints of a Flex cluster, it will automatically convert in March 2025 into a Flex cluster in Atlas, retaining all data. + +The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: 1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` 2. Add an import block per cluster to one of your `.tf` files: ```terraform import { - to = mongodbatlas_flex_cluster.flex_cluster + to = mongodbatlas_flex_cluster.this id = "664619d870c247237f4b86a6-flexClusterName" # from step 1 } ``` @@ -108,9 +200,11 @@ Given your Serverless Instance fits the constraints of a Flex cluster, it will a 5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform creates a plan to delete your existing cluster. -7. Remove the import block created in step 2. -8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` +6. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_flex_cluster.this.X`. +7. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. +8. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. +9. Remove the import block created in step 2. +10. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` ## From Serverless to Dedicated @@ -124,80 +218,25 @@ You cannot migrate from Serverless to Dedicated using the Terraform provider. To migrate from Serverless to Dedicated prior to January 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) ### Post-Autoconversion Migration Procedure -Given your Serverless Instance doesn't fit the constraints of a Flex cluster, it will automatically convert into a Dedicated cluster in Atlas, retaining all data. The following resolves the configuration drift in Terraform: +Given your Serverless Instance doesn't fit the constraints of a Flex cluster, it will automatically convert in March 2025 into a Dedicated cluster in Atlas, retaining all data. + +The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: 1. Find the import IDs of the Dedicated clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-advancedClusterName` 2. Add an import block per cluster to one of your `.tf` files: ```terraform import { - to = mongodbatlas_advanced_cluster.advanced_cluster + to = mongodbatlas_advanced_cluster.this id = "664619d870c247237f4b86a6-advancedClusterName" # from step 1 } ``` -3. Run `terraform plan -generate-config-out=adv_cluster.tf`. This should generate a `adv_cluster.tf` file with your Dedicated cluster in it. -4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - - variables, for example: `var.project_id` - - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Replace your existing clusters with the ones from `adv_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform creates a plan to delete your existing cluster. -7. Remove the import block created in step 2. -8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` - - -## From Serverless to Free - -### Pre-Autoconversion Migration Procedure - -1. Create a new Free Cluster directly from your `.tf` file, e.g.: - - ```terraform - resource "mongodbatlas_advanced_cluster" "free-cluster" { - project_id = var.atlas_project_id - name = "freeClusterName" - cluster_type = "REPLICASET" - - replication_specs { - region_configs { - electable_specs { - instance_size = "M0" - } - provider_name = "TENANT" - backing_provider_name = "AWS" - region_name = "US_EAST_1" - priority = 7 - } - } - } - ``` -2. Run `terraform apply` to create the new resource. -3. Migrate data from your Serverless Instance to the Free cluster using `mongodump` and `mongostore`. - - Please see the following guide on how to retrieve data from one cluster and store it in another cluster: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) - - Verify that your data is present within the Free cluster before proceeding. -4. Delete the Serverless Instance by running a destroy command against the Serverless Instance: - - `terraform destroy -target=mongodbatlas_serverless_instance.` - - 5. Remove the resource block for the Serverless Instance from your `.tf` file. - -### Post-Autoconversion Migration Procedure - -Given your Serverless Instance has $0 MRR, it automatically converts into a Free cluster in Atlas, retaining all data. The following resolves the configuration drift in Terraform. - -1. Find the import IDs of the Free clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-freeClusterName` -2. Add an import block per cluster to one of your `.tf` files: - ```terraform - import { - to = mongodbatlas_advanced_cluster.free_cluster - id = "664619d870c247237f4b86a6-freeClusterName" # from step 1 - } - ``` -3. Run `terraform plan -generate-config-out=free_cluster.tf`. This should generate a `free_cluster.tf` file with your Free cluster in it. +3. Run `terraform plan -generate-config-out=dedicated_cluster.tf`. This should generate a `dedicated_cluster.tf` file with your Dedicated cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` 5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Replace your existing clusters with the ones from `free_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.serverlessInstanceName`. Without this step, Terraform creates a plan to delete your existing cluster. -7. Remove the import block created in step 2. -8. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` +6. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_advanced_cluster.this.X`. +7. Update any shared-tier data source blocks to refer to `mongodbatlas_advanced_cluster`. +8. Replace your existing clusters with the ones from `dedicated_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. +9. Remove the import block created in step 2. +10. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` From 7ef130c4e626a5055cecccf42839be86dac99313 Mon Sep 17 00:00:00 2001 From: Melanija Cvetic Date: Fri, 8 Nov 2024 15:24:26 +0000 Subject: [PATCH 11/23] Adjustments to migration guides --- .../serverless-shared-migration-guide.md | 88 ++++++++++++------- 1 file changed, 56 insertions(+), 32 deletions(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index 6f0a3e6139..20539cd861 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -6,17 +6,17 @@ page_title: "Migration Guide: Transition out of Serverless Instances and Shared- The goal of this guide is to help users transition from Serverless Instances and Shared-tier clusters (M2/M5) to Free, Flex or Dedicated Clusters. -After March 2025, all Shared-tier clusters (`mongodbatlas_cluster` and `mongodbatlas_advanced_cluster`) will automatically convert to Flex clusters and all Serverless instances (`mongodb_serverless_instance`) will be converted into Free/Flex/Dedicated clusters, resulting in configuration drift in Terraform. +Starting in March 2025, all Shared-tier clusters (in both `mongodbatlas_cluster` and `mongodbatlas_advanced_cluster`) will automatically convert to Flex clusters. Similarly, all Serverless instances (`mongodb_serverless_instance`) will be converted into Free/Flex/Dedicated clusters, [depending on your existing configuration](PLACEHOLDER). +These conversions will result in configuration drift in Terraform. You can migrate from Serverless instances and Shared-tier clusters manually before March 2025. -**NOTE:** We recommend waiting until March 2025 for Serverless instances and Shared-tier clusters to autoconvert. +**--> NOTE:** We recommend waiting until March 2025 or later for Serverless instances and Shared-tier clusters to autoconvert. If a Serverless instance has $0 MRR, it automatically converts into a Free cluster. Else, if it does not fit the constraints of a Flex cluster, it will convert into a Dedicated cluster, resulting in downtime and workload disruption. Otherwise, it will convert to a Flex cluster. - -We are working on enhancing the User Experience such that, in future, Terraform Atlas Providers users can make even fewer required changes to their scripts from what is shown below. More updates to come over the next few months. For more details reach out to: zuhair.ahmed@mongodb.com +For Shared-tier clusters, we are working on enhancing the User Experience such that Terraform Atlas Providers users can make even fewer required changes to their scripts from what is shown below. More updates to come over the next few months. For more details reach out to: zuhair.ahmed@mongodb.com ### Jump to: - [Shared-tier to Flex](#from-shared-tier-clusters-to-flex) @@ -27,6 +27,8 @@ We are working on enhancing the User Experience such that, in future, Terraform ## From Shared-tier clusters to Flex ### Pre-Autoconversion Migration Procedure +**NOTE:** We recommend waiting until March 2025 or later for Shared-tier clusters to autoconvert. + 1. Create a new Flex Cluster directly from your `.tf` file, e.g.: ```terraform @@ -60,7 +62,7 @@ We are working on enhancing the User Experience such that, in future, Terraform ### Post-Autoconversion Migration Procedure -Shared-tier clusters will automatically convert in March 2025 to Flex clusters in Atlas, retaining all data. +Shared-tier clusters will automatically convert in March 2025 or later to Flex clusters in Atlas, retaining all data. The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: @@ -74,12 +76,13 @@ The following steps resolve the configuration drift in Terraform and does not af ``` 3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: +5. Remove the "default" fields. Many fields of this resource are optional. Look for fields with a `null` or `0` value. +6. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Update the references from your previous cluster resource: `mongodbatlas_advanced_cluster.this.X` or `mongodbatlas_cluster.this.X` to the new `mongodbatlas_flex_cluster.this.X`. -7. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. -8. Replace your existing clusters with the ones from `flex_cluster.tf` and run +7. Update the references from your previous cluster resource: `mongodbatlas_advanced_cluster.this.X` or `mongodbatlas_cluster.this.X` to the new `mongodbatlas_flex_cluster.this.X`. +8. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. +9. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_advanced_cluster.this` @@ -87,13 +90,18 @@ The following steps resolve the configuration drift in Terraform and does not af Without this step, Terraform creates a plan to delete your existing cluster. -9. Remove the import block created in step 2. -10. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` +10. Remove the import block created in step 2. +11. Re-run `terraform plan` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` ## From Serverless to Free +**Please ensure your Serverless instance meets the following requirements to migrate to Free:** +- $0 MRR + ### Pre-Autoconversion Migration Procedure +**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. + 1. Create a new Free Cluster directly from your `.tf` file, e.g.: ```terraform @@ -143,19 +151,27 @@ The following steps resolve the configuration drift in Terraform and does not af ``` 3. Run `terraform plan -generate-config-out=free_cluster.tf`. This should generate a `free_cluster.tf` file with your Free cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: +5. Remove the "default" fields. Many fields of this resource are optional. Look for fields with a `null` or `0` value. +6. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_advanced_cluster.this.X`. -7. Update any shared-tier data source blocks to refer to `mongodbatlas_advanced_cluster`. -8. Replace your existing clusters with the ones from `free_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. -9. Remove the import block created in step 2. -10. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` +7. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_advanced_cluster.this.X`. +8. Update any shared-tier data source blocks to refer to `mongodbatlas_advanced_cluster`. +9. Replace your existing clusters with the ones from `free_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. +10. Remove the import block created in step 2. +11. Re-run `terraform plan` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` ## From Serverless to Flex +**Please ensure your Serverless instance meets the following requirements to migrate to Flex:** +- <= 5GB of data +- no privatelink or continuous backup +- < 500 ops/sec consistently. + ### Pre-Autoconversion Migration Procedure +**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. + 1. Create a new Flex Cluster directly from your `.tf` file, e.g.: ```terraform @@ -197,25 +213,32 @@ The following steps resolve the configuration drift in Terraform and does not af ``` 3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: +5. Remove the "default" fields. Many fields of this resource are optional. Look for fields with a `null` or `0` value. +6. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_flex_cluster.this.X`. -7. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. -8. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. -9. Remove the import block created in step 2. -10. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` +7. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_flex_cluster.this.X`. +8. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. +9. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. +10. Remove the import block created in step 2. +11. Re-run `terraform plan` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` ## From Serverless to Dedicated +**Please note your Serverless instance will need to migrate to Decidated if it meets the following requirements:** +- \>= 5GB of data +- needs privatelink or continuous backup +- \> 500 ops/sec consistently. You cannot migrate from Serverless to Dedicated using the Terraform provider. -**Note:** We recommend waiting until January 2025 for a UI-based migration tool. - ### Pre-Autoconversion Migration Procedure -To migrate from Serverless to Dedicated prior to January 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) +**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. + +In early 2025, a UI-based migration tool will be released to assist you in migrating your workload prior to the autoconversion. + +To migrate from Serverless to Dedicated prior to early 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) ### Post-Autoconversion Migration Procedure Given your Serverless Instance doesn't fit the constraints of a Flex cluster, it will automatically convert in March 2025 into a Dedicated cluster in Atlas, retaining all data. @@ -232,11 +255,12 @@ The following steps resolve the configuration drift in Terraform and does not af ``` 3. Run `terraform plan -generate-config-out=dedicated_cluster.tf`. This should generate a `dedicated_cluster.tf` file with your Dedicated cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: +5. Remove the "default" fields. Many fields of this resource are optional. Look for fields with a `null` or `0` value. +6. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -6. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_advanced_cluster.this.X`. -7. Update any shared-tier data source blocks to refer to `mongodbatlas_advanced_cluster`. -8. Replace your existing clusters with the ones from `dedicated_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. -9. Remove the import block created in step 2. -10. Re-run `terraform apply` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` +7. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_advanced_cluster.this.X`. +8. Update any shared-tier data source blocks to refer to `mongodbatlas_advanced_cluster`. +9. Replace your existing clusters with the ones from `dedicated_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. +10. Remove the import block created in step 2. +11. Re-run `terraform plan` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` From 2336fa21d0be0857410b9427bdaa6a8c3a19e3d4 Mon Sep 17 00:00:00 2001 From: Oriol Arbusi Date: Mon, 18 Nov 2024 17:01:27 +0100 Subject: [PATCH 12/23] put URL instead of placeholder --- docs/guides/serverless-shared-migration-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index 20539cd861..d7ef60516b 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -6,7 +6,7 @@ page_title: "Migration Guide: Transition out of Serverless Instances and Shared- The goal of this guide is to help users transition from Serverless Instances and Shared-tier clusters (M2/M5) to Free, Flex or Dedicated Clusters. -Starting in March 2025, all Shared-tier clusters (in both `mongodbatlas_cluster` and `mongodbatlas_advanced_cluster`) will automatically convert to Flex clusters. Similarly, all Serverless instances (`mongodb_serverless_instance`) will be converted into Free/Flex/Dedicated clusters, [depending on your existing configuration](PLACEHOLDER). +Starting in March 2025, all Shared-tier clusters (in both `mongodbatlas_cluster` and `mongodbatlas_advanced_cluster`) will automatically convert to Flex clusters. Similarly, all Serverless instances (`mongodb_serverless_instance`) will be converted into Free/Flex/Dedicated clusters, [depending on your existing configuration](https://www.mongodb.com/docs/atlas/flex-migration/). These conversions will result in configuration drift in Terraform. From 4a430662c2f2ee317a486cfdf28e7a58424dc5f3 Mon Sep 17 00:00:00 2001 From: Oriol Arbusi Date: Wed, 20 Nov 2024 10:48:18 +0100 Subject: [PATCH 13/23] move post before pre autoconversion guides, clarify serverless to dedicated --- .../serverless-shared-migration-guide.md | 132 +++++++++--------- 1 file changed, 67 insertions(+), 65 deletions(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index d7ef60516b..15cdac1464 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -25,6 +25,40 @@ For Shared-tier clusters, we are working on enhancing the User Experience such t - [Serverless to Dedicated](#from-serverless-to-dedicated) ## From Shared-tier clusters to Flex + +### Post-Autoconversion Migration Procedure + +Shared-tier clusters will automatically convert in March 2025 or later to Flex clusters in Atlas, retaining all data. + +The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: + +1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` +2. Add an import block per cluster to one of your `.tf` files: + ```terraform + import { + to = mongodbatlas_flex_cluster.this + id = "664619d870c247237f4b86a6-flexClusterName" # from step 1 + } + ``` +3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. +4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` +5. Remove the "default" fields. Many fields of this resource are optional. Look for fields with a `null` or `0` value. +6. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: + - variables, for example: `var.project_id` + - Terraform keywords, for example: `for_each`, `count`, and `depends_on` +7. Update the references from your previous cluster resource: `mongodbatlas_advanced_cluster.this.X` or `mongodbatlas_cluster.this.X` to the new `mongodbatlas_flex_cluster.this.X`. +8. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. +9. Replace your existing clusters with the ones from `flex_cluster.tf` and run + + `terraform state rm mongodbatlas_advanced_cluster.this` + + or `terraform state rm mongodbatlas_cluster.this`. + + Without this step, Terraform creates a plan to delete your existing cluster. + +10. Remove the import block created in step 2. +11. Re-run `terraform plan` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` + ### Pre-Autoconversion Migration Procedure **NOTE:** We recommend waiting until March 2025 or later for Shared-tier clusters to autoconvert. @@ -60,44 +94,37 @@ For Shared-tier clusters, we are working on enhancing the User Experience such t 5. Remove the resource block for the Shared-tier cluster from your `.tf` file. +## From Serverless to Free + +**Please ensure your Serverless instance meets the following requirements to migrate to Free:** +- $0 MRR + ### Post-Autoconversion Migration Procedure -Shared-tier clusters will automatically convert in March 2025 or later to Flex clusters in Atlas, retaining all data. +Given your Serverless Instance has $0 MRR, it will automatically convert in March 2025 into a Free cluster in Atlas, retaining all data. The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: -1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` +1. Find the import IDs of the Free clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-freeClusterName` 2. Add an import block per cluster to one of your `.tf` files: ```terraform import { - to = mongodbatlas_flex_cluster.this - id = "664619d870c247237f4b86a6-flexClusterName" # from step 1 + to = mongodbatlas_advanced_cluster.this + id = "664619d870c247237f4b86a6-freeClusterName" # from step 1 } ``` -3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. +3. Run `terraform plan -generate-config-out=free_cluster.tf`. This should generate a `free_cluster.tf` file with your Free cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` 5. Remove the "default" fields. Many fields of this resource are optional. Look for fields with a `null` or `0` value. 6. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -7. Update the references from your previous cluster resource: `mongodbatlas_advanced_cluster.this.X` or `mongodbatlas_cluster.this.X` to the new `mongodbatlas_flex_cluster.this.X`. -8. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. -9. Replace your existing clusters with the ones from `flex_cluster.tf` and run - - `terraform state rm mongodbatlas_advanced_cluster.this` - - or `terraform state rm mongodbatlas_cluster.this`. - - Without this step, Terraform creates a plan to delete your existing cluster. - +7. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_advanced_cluster.this.X`. +8. Update any shared-tier data source blocks to refer to `mongodbatlas_advanced_cluster`. +9. Replace your existing clusters with the ones from `free_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. 10. Remove the import block created in step 2. 11. Re-run `terraform plan` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` -## From Serverless to Free - -**Please ensure your Serverless instance meets the following requirements to migrate to Free:** -- $0 MRR - ### Pre-Autoconversion Migration Procedure **NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. @@ -135,39 +162,39 @@ The following steps resolve the configuration drift in Terraform and does not af 5. Remove the resource block for the Serverless Instance from your `.tf` file. +## From Serverless to Flex + +**Please ensure your Serverless instance meets the following requirements to migrate to Flex:** +- <= 5GB of data +- no privatelink or continuous backup +- < 500 ops/sec consistently. + ### Post-Autoconversion Migration Procedure -Given your Serverless Instance has $0 MRR, it will automatically convert in March 2025 into a Free cluster in Atlas, retaining all data. +Given your Serverless Instance fits the constraints of a Flex cluster, it will automatically convert in March 2025 into a Flex cluster in Atlas, retaining all data. The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: -1. Find the import IDs of the Free clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-freeClusterName` +1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` 2. Add an import block per cluster to one of your `.tf` files: ```terraform import { - to = mongodbatlas_advanced_cluster.this - id = "664619d870c247237f4b86a6-freeClusterName" # from step 1 + to = mongodbatlas_flex_cluster.this + id = "664619d870c247237f4b86a6-flexClusterName" # from step 1 } ``` -3. Run `terraform plan -generate-config-out=free_cluster.tf`. This should generate a `free_cluster.tf` file with your Free cluster in it. +3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. 4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` 5. Remove the "default" fields. Many fields of this resource are optional. Look for fields with a `null` or `0` value. 6. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - variables, for example: `var.project_id` - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -7. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_advanced_cluster.this.X`. -8. Update any shared-tier data source blocks to refer to `mongodbatlas_advanced_cluster`. -9. Replace your existing clusters with the ones from `free_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. +7. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_flex_cluster.this.X`. +8. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. +9. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. 10. Remove the import block created in step 2. 11. Re-run `terraform plan` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` -## From Serverless to Flex - -**Please ensure your Serverless instance meets the following requirements to migrate to Flex:** -- <= 5GB of data -- no privatelink or continuous backup -- < 500 ops/sec consistently. - ### Pre-Autoconversion Migration Procedure **NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. @@ -197,34 +224,8 @@ The following steps resolve the configuration drift in Terraform and does not af 5. You may now safely remove the resource block for the Serverless Instance from your `.tf` file. -### Post-Autoconversion Migration Procedure - -Given your Serverless Instance fits the constraints of a Flex cluster, it will automatically convert in March 2025 into a Flex cluster in Atlas, retaining all data. - -The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: - -1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` -2. Add an import block per cluster to one of your `.tf` files: - ```terraform - import { - to = mongodbatlas_flex_cluster.this - id = "664619d870c247237f4b86a6-flexClusterName" # from step 1 - } - ``` -3. Run `terraform plan -generate-config-out=flex_cluster.tf`. This should generate a `flex_cluster.tf` file with your Flex cluster in it. -4. Run `terraform apply`. You should see the resource(s) imported: `Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.` -5. Remove the "default" fields. Many fields of this resource are optional. Look for fields with a `null` or `0` value. -6. Re-use existing [Terraform expressions](https://developer.hashicorp.com/terraform/language/expressions). All fields in the generated configuration have static values. Look in your previous configuration for: - - variables, for example: `var.project_id` - - Terraform keywords, for example: `for_each`, `count`, and `depends_on` -7. Update the references from your previous cluster resource: `mongodbatlas_serverless_instance.this.X` to the new `mongodbatlas_flex_cluster.this.X`. -8. Update any shared-tier data source blocks to refer to `mongodbatlas_flex_cluster`. -9. Replace your existing clusters with the ones from `flex_cluster.tf` and run `terraform state rm mongodbatlas_serverless_instance.this`. Without this step, Terraform creates a plan to delete your existing cluster. -10. Remove the import block created in step 2. -11. Re-run `terraform plan` to ensure you have no planned changes: `No changes. Your infrastructure matches the configuration.` - - ## From Serverless to Dedicated + **Please note your Serverless instance will need to migrate to Decidated if it meets the following requirements:** - \>= 5GB of data - needs privatelink or continuous backup @@ -234,13 +235,14 @@ You cannot migrate from Serverless to Dedicated using the Terraform provider. ### Pre-Autoconversion Migration Procedure -**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. - -In early 2025, a UI-based migration tool will be released to assist you in migrating your workload prior to the autoconversion. +**NOTE:** In early 2025, a UI-based tool will be released to assist you in migrating your workloads from Serverless instances to Dedicated clusters. This tool will ensure correct migration and you will not need to change connection strings. There will be some downtime while using this tool. To migrate from Serverless to Dedicated prior to early 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) ### Post-Autoconversion Migration Procedure + +**NOTE:** Auto-conversion from Serverless to Dedicated will cause downtime and workload disruption. This guide is only valid after the auto-conversion is done. + Given your Serverless Instance doesn't fit the constraints of a Flex cluster, it will automatically convert in March 2025 into a Dedicated cluster in Atlas, retaining all data. The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: From b6944698fdb057950b42b5163edcda5449344094 Mon Sep 17 00:00:00 2001 From: Oriol Arbusi Date: Wed, 20 Nov 2024 11:16:30 +0100 Subject: [PATCH 14/23] pr comment --- docs/guides/serverless-shared-migration-guide.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index 15cdac1464..477d583773 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -6,8 +6,8 @@ page_title: "Migration Guide: Transition out of Serverless Instances and Shared- The goal of this guide is to help users transition from Serverless Instances and Shared-tier clusters (M2/M5) to Free, Flex or Dedicated Clusters. -Starting in March 2025, all Shared-tier clusters (in both `mongodbatlas_cluster` and `mongodbatlas_advanced_cluster`) will automatically convert to Flex clusters. Similarly, all Serverless instances (`mongodb_serverless_instance`) will be converted into Free/Flex/Dedicated clusters, [depending on your existing configuration](https://www.mongodb.com/docs/atlas/flex-migration/). -These conversions will result in configuration drift in Terraform. +Starting in January 2025, all Shared-tier clusters (in both `mongodbatlas_cluster` and `mongodbatlas_advanced_cluster`) will automatically convert to Flex clusters. Similarly, in March 2025 all Serverless instances (`mongodb_serverless_instance`) will be converted into Free/Flex/Dedicated clusters, [depending on your existing configuration](https://www.mongodb.com/docs/atlas/flex-migration/). +Some of these conversions will result in configuration drift in Terraform. You can migrate from Serverless instances and Shared-tier clusters manually before March 2025. @@ -28,9 +28,9 @@ For Shared-tier clusters, we are working on enhancing the User Experience such t ### Post-Autoconversion Migration Procedure -Shared-tier clusters will automatically convert in March 2025 or later to Flex clusters in Atlas, retaining all data. +Shared-tier clusters will automatically convert in January 2025 to Flex clusters in Atlas, retaining all data. We recommend to migrate to `mongodbatlas_flex_cluster` resource once the autoconversion is done. -The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: +The following steps explain how to move your exising Shared-tier cluster resource to the new `mongodbatlas_flex_cluster` resource and does not affect the underlying cluster infrastructure: 1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` 2. Add an import block per cluster to one of your `.tf` files: @@ -171,9 +171,9 @@ The following steps resolve the configuration drift in Terraform and does not af ### Post-Autoconversion Migration Procedure -Given your Serverless Instance fits the constraints of a Flex cluster, it will automatically convert in March 2025 into a Flex cluster in Atlas, retaining all data. +Given your Serverless Instance fits the constraints of a Flex cluster, it will automatically convert in March 2025 into a Flex cluster in Atlas, retaining all data. We recommend to migrate to `mongodbatlas_flex_cluster` resource once the autoconversion is done. -The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: +The following steps explain how to move your exising Serverless instance resource to the new `mongodbatlas_flex_cluster` resource and does not affect the underlying cluster infrastructure: 1. Find the import IDs of the Flex clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-flexClusterName` 2. Add an import block per cluster to one of your `.tf` files: From c5f4719ed46345e27e0ca0a2880c6bd66cdb21b6 Mon Sep 17 00:00:00 2001 From: Oriol Arbusi Date: Wed, 20 Nov 2024 12:00:49 +0100 Subject: [PATCH 15/23] pr comments --- docs/guides/serverless-shared-migration-guide.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index 477d583773..e754ae2e6a 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -7,6 +7,7 @@ page_title: "Migration Guide: Transition out of Serverless Instances and Shared- The goal of this guide is to help users transition from Serverless Instances and Shared-tier clusters (M2/M5) to Free, Flex or Dedicated Clusters. Starting in January 2025, all Shared-tier clusters (in both `mongodbatlas_cluster` and `mongodbatlas_advanced_cluster`) will automatically convert to Flex clusters. Similarly, in March 2025 all Serverless instances (`mongodb_serverless_instance`) will be converted into Free/Flex/Dedicated clusters, [depending on your existing configuration](https://www.mongodb.com/docs/atlas/flex-migration/). +If a Serverless instance has $0 MRR, it automatically converts into a Free cluster. Else, if it does not fit the constraints of a Flex cluster, it will convert into a Dedicated cluster, resulting in downtime and workload disruption. Otherwise, it will convert to a Flex cluster. Some of these conversions will result in configuration drift in Terraform. @@ -14,8 +15,6 @@ You can migrate from Serverless instances and Shared-tier clusters manually befo **--> NOTE:** We recommend waiting until March 2025 or later for Serverless instances and Shared-tier clusters to autoconvert. -If a Serverless instance has $0 MRR, it automatically converts into a Free cluster. Else, if it does not fit the constraints of a Flex cluster, it will convert into a Dedicated cluster, resulting in downtime and workload disruption. Otherwise, it will convert to a Flex cluster. - For Shared-tier clusters, we are working on enhancing the User Experience such that Terraform Atlas Providers users can make even fewer required changes to their scripts from what is shown below. More updates to come over the next few months. For more details reach out to: zuhair.ahmed@mongodb.com ### Jump to: @@ -61,7 +60,7 @@ The following steps explain how to move your exising Shared-tier cluster resourc ### Pre-Autoconversion Migration Procedure -**NOTE:** We recommend waiting until March 2025 or later for Shared-tier clusters to autoconvert. +**NOTE:** We recommend waiting until March 2025 or later for Shared-tier clusters to autoconvert. Manually doing the migration can cause downtime and workload disruption. 1. Create a new Flex Cluster directly from your `.tf` file, e.g.: @@ -127,7 +126,7 @@ The following steps resolve the configuration drift in Terraform and does not af ### Pre-Autoconversion Migration Procedure -**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. +**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. Manually doing the migration can cause downtime and workload disruption. 1. Create a new Free Cluster directly from your `.tf` file, e.g.: @@ -197,7 +196,7 @@ The following steps explain how to move your exising Serverless instance resourc ### Pre-Autoconversion Migration Procedure -**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. +**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. Manually doing the migration can cause downtime and workload disruption. 1. Create a new Flex Cluster directly from your `.tf` file, e.g.: @@ -237,7 +236,7 @@ You cannot migrate from Serverless to Dedicated using the Terraform provider. **NOTE:** In early 2025, a UI-based tool will be released to assist you in migrating your workloads from Serverless instances to Dedicated clusters. This tool will ensure correct migration and you will not need to change connection strings. There will be some downtime while using this tool. -To migrate from Serverless to Dedicated prior to early 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/) +To migrate from Serverless to Dedicated prior to early 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/). **NOTE:** Manually doing the migration can cause downtime and workload disruption. ### Post-Autoconversion Migration Procedure From 80b84ecf227bbcdb3f8477f8bd21d9fcd962f2dc Mon Sep 17 00:00:00 2001 From: Oriol Date: Wed, 20 Nov 2024 17:44:27 +0100 Subject: [PATCH 16/23] Update docs/guides/1.22.0-upgrade-guide.md Co-authored-by: lmkerbey-mdb <105309825+lmkerbey-mdb@users.noreply.github.com> --- docs/guides/1.22.0-upgrade-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/1.22.0-upgrade-guide.md b/docs/guides/1.22.0-upgrade-guide.md index 3ff6d5358d..9b980effc1 100644 --- a/docs/guides/1.22.0-upgrade-guide.md +++ b/docs/guides/1.22.0-upgrade-guide.md @@ -14,7 +14,7 @@ The Terraform MongoDB Atlas Provider version 1.22.0 has a number of new and exci - `continuous_backup_enabled` attribute is deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). - `auto_indexing` attribute is deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). -- `mongodbatlas_privatelink_endpoint_serverless` resource has been deprecated. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). +- `mongodbatlas_privatelink_endpoint_serverless` resource is deprecated. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). - `mongodbatlas_privatelink_endpoint_service_serverless` resource, `mongodbatlas_privatelink_endpoint_service_serverless` and `mongodbatlas_privatelink_endpoints_service_serverless` data sources have been deprecated. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). ## Terraform MongoDB Atlas modules From a9d5c7585a2487393c9375fb4194f58ba7f0b367 Mon Sep 17 00:00:00 2001 From: Oriol Date: Wed, 20 Nov 2024 17:44:39 +0100 Subject: [PATCH 17/23] Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: lmkerbey-mdb <105309825+lmkerbey-mdb@users.noreply.github.com> --- docs/guides/serverless-shared-migration-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index e754ae2e6a..0c36ea7b86 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -102,7 +102,7 @@ The following steps explain how to move your exising Shared-tier cluster resourc Given your Serverless Instance has $0 MRR, it will automatically convert in March 2025 into a Free cluster in Atlas, retaining all data. -The following steps resolve the configuration drift in Terraform and does not affect the underlying cluster infrastructure: +The following steps resolve the configuration drift in Terraform without affecting the underlying cluster infrastructure: 1. Find the import IDs of the Free clusters: `{PROJECT_ID}-{CLUSTER_NAME}`, such as `664619d870c247237f4b86a6-freeClusterName` 2. Add an import block per cluster to one of your `.tf` files: From 619faf2172c17c1cfffd410eb6f506a241c50e4b Mon Sep 17 00:00:00 2001 From: Oriol Date: Wed, 20 Nov 2024 17:44:53 +0100 Subject: [PATCH 18/23] Update docs/guides/1.22.0-upgrade-guide.md Co-authored-by: lmkerbey-mdb <105309825+lmkerbey-mdb@users.noreply.github.com> --- docs/guides/1.22.0-upgrade-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/1.22.0-upgrade-guide.md b/docs/guides/1.22.0-upgrade-guide.md index 9b980effc1..7f0f96cb1d 100644 --- a/docs/guides/1.22.0-upgrade-guide.md +++ b/docs/guides/1.22.0-upgrade-guide.md @@ -15,7 +15,7 @@ The Terraform MongoDB Atlas Provider version 1.22.0 has a number of new and exci - `continuous_backup_enabled` attribute is deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). - `auto_indexing` attribute is deprecated in `mongodbatlas_serverless_instance` resource and data sources. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). - `mongodbatlas_privatelink_endpoint_serverless` resource is deprecated. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). -- `mongodbatlas_privatelink_endpoint_service_serverless` resource, `mongodbatlas_privatelink_endpoint_service_serverless` and `mongodbatlas_privatelink_endpoints_service_serverless` data sources have been deprecated. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). +- `mongodbatlas_privatelink_endpoint_service_serverless` resource, `mongodbatlas_privatelink_endpoint_service_serverless` and `mongodbatlas_privatelink_endpoints_service_serverless` data sources are deprecated. If your workload requires this feature, we recommend switching to Atlas Dedicated clusters. To learn more, please see the [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide). ## Terraform MongoDB Atlas modules From 6fd06e68118848654f518c9f7c14ab9888dde87e Mon Sep 17 00:00:00 2001 From: Oriol Date: Wed, 20 Nov 2024 17:45:34 +0100 Subject: [PATCH 19/23] Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: lmkerbey-mdb <105309825+lmkerbey-mdb@users.noreply.github.com> --- docs/guides/serverless-shared-migration-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index 0c36ea7b86..e0457416c7 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -196,7 +196,7 @@ The following steps explain how to move your exising Serverless instance resourc ### Pre-Autoconversion Migration Procedure -**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. Manually doing the migration can cause downtime and workload disruption. +**NOTE:** We recommend waiting until March 2025 or later for Serverless instances to autoconvert. Manual migration can cause downtime and workload disruption. 1. Create a new Flex Cluster directly from your `.tf` file, e.g.: From 1a50e3f1b7626c4a8ebd58180b57e47af25661d0 Mon Sep 17 00:00:00 2001 From: Oriol Date: Wed, 20 Nov 2024 17:45:58 +0100 Subject: [PATCH 20/23] Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: lmkerbey-mdb <105309825+lmkerbey-mdb@users.noreply.github.com> --- docs/guides/serverless-shared-migration-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index e0457416c7..c67fa255cc 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -234,7 +234,7 @@ You cannot migrate from Serverless to Dedicated using the Terraform provider. ### Pre-Autoconversion Migration Procedure -**NOTE:** In early 2025, a UI-based tool will be released to assist you in migrating your workloads from Serverless instances to Dedicated clusters. This tool will ensure correct migration and you will not need to change connection strings. There will be some downtime while using this tool. +**NOTE:** In early 2025, we will release a UI-based tool for migrating your workloads from Serverless instances to Dedicated clusters. This tool will ensure correct migration with little downtime. You won't need to change connection strings. To migrate from Serverless to Dedicated prior to early 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/). **NOTE:** Manually doing the migration can cause downtime and workload disruption. From 78ecddefda4b224d62ddfb24457e455d4b1898c2 Mon Sep 17 00:00:00 2001 From: Oriol Date: Wed, 20 Nov 2024 17:46:11 +0100 Subject: [PATCH 21/23] Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: lmkerbey-mdb <105309825+lmkerbey-mdb@users.noreply.github.com> --- docs/guides/serverless-shared-migration-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index c67fa255cc..6ed48e9d4b 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -236,7 +236,7 @@ You cannot migrate from Serverless to Dedicated using the Terraform provider. **NOTE:** In early 2025, we will release a UI-based tool for migrating your workloads from Serverless instances to Dedicated clusters. This tool will ensure correct migration with little downtime. You won't need to change connection strings. -To migrate from Serverless to Dedicated prior to early 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/). **NOTE:** Manually doing the migration can cause downtime and workload disruption. +To migrate from Serverless to Dedicated prior to early 2025, please see the following guide: [Convert a Serverless Instance to a Dedicated Cluster](https://www.mongodb.com/docs/atlas/tutorial/convert-serverless-to-dedicated/). **NOTE:** Manual migration can cause downtime and workload disruption. ### Post-Autoconversion Migration Procedure From 3d2a257927c6d2638727afa6f3f0893f3d2f7725 Mon Sep 17 00:00:00 2001 From: Oriol Date: Thu, 21 Nov 2024 14:12:31 +0100 Subject: [PATCH 22/23] Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: cveticm <119604954+cveticm@users.noreply.github.com> --- docs/guides/serverless-shared-migration-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index 6ed48e9d4b..b8f05259dd 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -60,7 +60,7 @@ The following steps explain how to move your exising Shared-tier cluster resourc ### Pre-Autoconversion Migration Procedure -**NOTE:** We recommend waiting until March 2025 or later for Shared-tier clusters to autoconvert. Manually doing the migration can cause downtime and workload disruption. +**NOTE:** We recommend waiting until January 2025 or later for Shared-tier clusters to autoconvert. Manually doing the migration can cause downtime and workload disruption. 1. Create a new Flex Cluster directly from your `.tf` file, e.g.: From e162b5edb0565c6c2f8196bf199103fa7755b85c Mon Sep 17 00:00:00 2001 From: Oriol Date: Thu, 21 Nov 2024 14:12:40 +0100 Subject: [PATCH 23/23] Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: cveticm <119604954+cveticm@users.noreply.github.com> --- docs/guides/serverless-shared-migration-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/serverless-shared-migration-guide.md b/docs/guides/serverless-shared-migration-guide.md index b8f05259dd..84aec3ab43 100644 --- a/docs/guides/serverless-shared-migration-guide.md +++ b/docs/guides/serverless-shared-migration-guide.md @@ -11,7 +11,7 @@ If a Serverless instance has $0 MRR, it automatically converts into a Free clust Some of these conversions will result in configuration drift in Terraform. -You can migrate from Serverless instances and Shared-tier clusters manually before March 2025. +You can migrate from Serverless instances and Shared-tier clusters manually before autoconversion. **--> NOTE:** We recommend waiting until March 2025 or later for Serverless instances and Shared-tier clusters to autoconvert.