|
1 | 1 | --- |
2 | | -page_title: "Migration Guide: Advanced Cluster New Sharding Configurations" |
| 2 | +page_title: "Guide: Advanced Cluster New Sharding Configurations" |
3 | 3 | --- |
4 | 4 |
|
5 | | -# Migration Guide: Advanced Cluster New Sharding Configurations |
6 | 5 |
|
7 | | -**Objective**: Use this guide to migrate your existing `mongodbatlas_advanced_cluster` resources that may be using the legacy sharding schema _(i.e. using `num_shards` which was deprecated in v1.18.0 and removed in 2.0.0)_ to support the new sharding configurations instead. The new sharding configurations allow you to scale shards independently. Additionally, compute auto-scaling supports scaling instance sizes independently for each shard when using the new sharding configuration. |
| 6 | +**Objective**: This guide explains the new sharding configuration for `mongodbatlas_advanced_cluster` that allows you to scale shards independently, hence, you may also come across the term "Independent shard scaling configuration" in our documentation. |
| 7 | +Additionally, compute auto-scaling supports scaling instance sizes independently for each shard when using the new sharding configuration. |
8 | 8 |
|
9 | | -Note: Once applied, the `mongodbatlas_advanced_cluster` resource making use of the new sharding configuration will not be able to transition back to the old sharding configuration. |
| 9 | +**You may find this guide useful if:** |
| 10 | +- You are considering upgrading from v1.x of our provider to v2.0.0 or later which ONLY supports this new configuration. |
| 11 | +- You currently use the legacy sharding schema (i.e. using `num_shards` which was deprecated in v1.18.0 and removed in 2.0.0). |
| 12 | +- You want to understand the new sharding configuration and how a `replication_specs` element now represents each shard individually, allowing you to scale or modify each shard independently. |
| 13 | +- You are considering upgrading to a sharded cluster and you want to understand the new sharding configuration. |
10 | 14 |
|
11 | | -- [Prerequisites](#prerequisites) |
12 | | -- [Migration Guide: Advanced Cluster New Sharding Configurations](#migration-guide-advanced-cluster-new-sharding-schema) |
13 | | - - [Changes Overview](#changes-overview) |
| 15 | + |
| 16 | +If you are still using the deprecated `mongodbatlas_cluster` resource, use [Migration Guide: Cluster → Advanced Cluster instead](./cluster-to-advanced-cluster-migration-guide.md). |
| 17 | + |
| 18 | +If you are already using `mongodbatlas_advanced_cluster` and want to upgrade to our Terraform Provider v2.0.0 or later from v1.x, also review [Migration Guide: Moving to Advanced Cluster v2.0.0](./migrate-to-advanced-cluster-2.0.md) |
| 19 | +--- |
| 20 | + |
| 21 | +- [Changes Overview](#changes-overview) |
14 | 22 | - [Migrate advanced\_cluster type `SHARDED`](#migrate-advanced_cluster-type-sharded) |
15 | 23 | - [Migrate advanced\_cluster type `GEOSHARDED`](#migrate-advanced_cluster-type-geosharded) |
16 | | - - [Migrate advanced\_cluster type `REPLICASET`](#migrate-advanced_cluster-type-replicaset) |
| 24 | + - [Upgrade type `REPLICASET` to `SHARDED`](#migrate-advanced_cluster-type-replicaset) |
17 | 25 | - [Use Independent Shard Scaling](#use-independent-shard-scaling) |
18 | 26 | - [Use Auto-Scaling Per Shard](#use-auto-scaling-per-shard) |
19 | 27 | - [Resources and Data Sources Impacted by Independent Shard Scaling](#resources-and-data-sources-impacted-by-independent-shard-scaling) |
20 | 28 | - [Data Source Transition for Asymmetric Clusters](#data-source-transition-for-asymmetric-clusters) |
21 | 29 |
|
22 | | -## Prerequisites |
23 | | -- Upgrade to MongoDB Atlas Terraform Provider 2.0.0 or later |
24 | | -- Ensure `mongodbatlas_advanced_cluster` resources configuration is updated to use the latest syntax changes as per **Step 1 & 2** of [Migration Guide: Advanced Cluster (v1.x → v2.0.0)](migrate-to-advanced-cluster-2.0.md#how-to-migrate). **Note:** Syntax changes in [Migration Guide: Advanced Cluster (v1.x → v2.0.0)](migrate-to-advanced-cluster-2.0.md#how-to-migrate) and the changes in this guide should be applied together in one go **once the plan is empty** i.e. you should not make these updates separately. |
25 | | - |
26 | 30 |
|
27 | 31 | ## Changes Overview |
28 | 32 |
|
@@ -189,7 +193,7 @@ resource "mongodbatlas_advanced_cluster" "test" { |
189 | 193 | } |
190 | 194 | ``` |
191 | 195 |
|
192 | | -### Migrate advanced_cluster type `REPLICASET` |
| 196 | +### Upgrade type `REPLICASET` to `SHARDED` |
193 | 197 |
|
194 | 198 | To learn more, see the documentation on [transitioning from a replica set to a sharded cluster](https://www.mongodb.com/docs/atlas/scale-cluster/#scale-your-replica-set-to-a-sharded-cluster). |
195 | 199 |
|
@@ -424,6 +428,7 @@ While the example initially defines 2 symmetric shards, auto-scaling of `electab |
424 | 428 |
|
425 | 429 | -> **NOTE:** See the table [below](#resources-and-data-sources-impacted-by-independent-shard-scaling) for other impacted resources when a cluster transitions to independently scaled shards. |
426 | 430 |
|
| 431 | + |
427 | 432 | ## Resources and Data Sources Impacted by Independent Shard Scaling |
428 | 433 |
|
429 | 434 | Name | Changes | Transition Guide |
|
0 commit comments