Skip to content

Commit

Permalink
doc: Fixes wordings in the new advanced_cluster sharding guide. (#2524)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosuma authored Aug 26, 2024
1 parent cba054c commit a9f4887
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/advanced_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ data "mongodbatlas_advanced_cluster" "example" {
}
```

## Example using latest sharding schema with independent shard scaling in the cluster
## Example using latest sharding configurations with independent shard scaling in the cluster

```terraform
resource "mongodbatlas_advanced_cluster" "example" {
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/advanced_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data "mongodbatlas_advanced_clusters" "example" {
}
```

## Example using latest sharding schema with independent shard scaling in the cluster
## Example using latest sharding configurations with independent shard scaling in the cluster

```terraform
resource "mongodbatlas_advanced_cluster" "example" {
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/1.18.0-upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Terraform MongoDB Atlas Provider version 1.18.0 has a number of new and exci

**New Resources, Data Sources, and Features:**

- You can now scale the instance size and disk IOPS independently for each individual shard for sharded and geo-sharded clusters defined with `mongodbatlas_advanced_cluster`. To learn more, see the [Advanced Cluster New Sharding Schema Migration Guide](advanced-cluster-new-sharding-schema). As part of these changes two new attributes are added:
- You can now scale the instance size and disk IOPS independently for each individual shard for sharded and geo-sharded clusters defined with `mongodbatlas_advanced_cluster`. To learn more, see the [Advanced Cluster New Sharding Configurations Migration Guide](advanced-cluster-new-sharding-schema). As part of these changes two new attributes are added:
- Use the `replication_specs.*.zone_id` attribute in the `mongodbatlas_advanced_cluster` resource and data sources to identify the zone of each `replication_specs` object.
- Use the `use_replication_spec_per_shard` attribute in the `mongodbatlas_advanced_cluster` data sources to specify whether to obtain `replication_specs` objects for each shard.

Expand Down
24 changes: 12 additions & 12 deletions docs/guides/advanced-cluster-new-sharding-schema.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
page_title: "Migration Guide: Advanced Cluster New Sharding Schema"
page_title: "Migration Guide: Advanced Cluster New Sharding Configurations"
---

# Migration Guide: Advanced Cluster New Sharding Schema
# Migration Guide: Advanced Cluster New Sharding Configurations

**Objective**: Use this guide to migrate your existing `advanced_cluster` configurations to the new sharding schema introduced in version 1.18.0. The new sharding schema allows you to scale shards independently. Existing sharding configurations continue to work, although the software issues deprecation messages if you use the legacy schema.
**Objective**: Use this guide to migrate your existing `advanced_cluster` resources to support new sharding configurations introduced in version 1.18.0. The new sharding configurations allow you to scale shards independently. Existing sharding configurations continue to work, but you will receive deprecation messages if you continue to use them.

- [Migration Guide: Advanced Cluster New Sharding Schema](#migration-guide-advanced-cluster-new-sharding-schema)
- [Overview of schema changes](#overview-of-schema-changes)
- [Migration Guide: Advanced Cluster New Sharding Configurations](#migration-guide-advanced-cluster-new-sharding-schema)
- [Changes Overview](#changes-overview)
- [Migrate advanced\_cluster type `SHARDED`](#migrate-advanced_cluster-type-sharded)
- [Migrate advanced\_cluster type `GEOSHARDED`](#migrate-advanced_cluster-type-geosharded)
- [Migrate advanced\_cluster type `REPLICASET`](#migrate-advanced_cluster-type-replicaset)
- [Use Independent Shard Scaling](#use-independent-shard-scaling)

<a id="overview"></a>
## Overview of schema changes
## Changes Overview

`replication_specs` attribute now represents each individual cluster's shard with a unique replication spec element.
When you use the new sharding schema, the schema no longer uses the existing attribute `num_shards`, and instead the number of shards are defined by the number of `replication_specs` elements.
When you use the new sharding configurations, it will no longer use the existing attribute `num_shards`, and instead the number of shards are defined by the number of `replication_specs` elements.

<a id="migration-sharded"></a>
### Migrate advanced_cluster type `SHARDED`
Expand Down Expand Up @@ -46,7 +46,7 @@ resource "mongodbatlas_advanced_cluster" "test" {
}
```

In order to update our configuration to the new schema, we will remove the use of `num_shards` and add a new identical `replication_specs` element for each shard. Note that these 2 changes must be done at the same time.
In order to use our new sharding configurations, we will remove the use of `num_shards` and add a new identical `replication_specs` element for each shard. Note that these 2 changes must be done at the same time.

```
resource "mongodbatlas_advanced_cluster" "test" {
Expand Down Expand Up @@ -128,7 +128,7 @@ resource "mongodbatlas_advanced_cluster" "test" {
}
```

In order to update our configuration to the new schema, we will remove the use of `num_shards` and add a new identical `replication_specs` element for each shard. Note that these two changes must be done at the same time.
In order to use our new sharding configurations, we will remove the use of `num_shards` and add a new identical `replication_specs` element for each shard. Note that these two changes must be done at the same time.

```
resource "mongodbatlas_advanced_cluster" "test" {
Expand Down Expand Up @@ -244,7 +244,7 @@ resource "mongodbatlas_advanced_cluster" "test" {
}
```

Once the cluster type is adjusted accordingly, we can proceed to add a new shard using the new schema:
Once the cluster type is adjusted accordingly, we can proceed to add a new shard:

```
resource "mongodbatlas_advanced_cluster" "test" {
Expand Down Expand Up @@ -283,7 +283,7 @@ Note: The first time `terraform apply` command is run **after** updating the con
<a id="use-iss"></a>
### Use Independent Shard Scaling

Use the new sharding schema. Each shard must be represented with a unique replication_specs element and `num_shards` must not be used, as illustrated in the following example.
Use the new sharding configurations. Each shard must be represented with a unique `replication_specs` element and `num_shards` must not be used, as illustrated in the following example.

```
resource "mongodbatlas_advanced_cluster" "test" {
Expand Down Expand Up @@ -353,4 +353,4 @@ resource "mongodbatlas_advanced_cluster" "test" {
}
```

-> **NOTE:** For any cluster leveraging the new schema and defining independently scaled shards, users should also update corresponding `mongodbatlas_cloud_backup_schedule` resource & data sources. This involves updating any existing Terraform configurations of the resource to use `copy_settings.#.zone_id` instead of `copy_settings.#.replication_spec_id`. This is needed as `mongodbatlas_advanced_cluster` resource and data source will no longer have `replication_specs.#.id` present when shards are scaled independently. To learn more, review the [1.18.0 Migration Guide](1.18.0-upgrade-guide.md#transition-cloud-backup-schedules-for-clusters-to-use-zones).
-> **NOTE:** For any cluster leveraging the new sharding configurations and defining independently scaled shards, users should also update corresponding `mongodbatlas_cloud_backup_schedule` resource & data sources. This involves updating any existing Terraform configurations of the resource to use `copy_settings.#.zone_id` instead of `copy_settings.#.replication_spec_id`. This is needed as `mongodbatlas_advanced_cluster` resource and data source will no longer have `replication_specs.#.id` present when shards are scaled independently. To learn more, review the [1.18.0 Migration Guide](1.18.0-upgrade-guide.md#transition-cloud-backup-schedules-for-clusters-to-use-zones).
2 changes: 1 addition & 1 deletion docs/guides/cluster-to-advanced-cluster-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ page_title: "Migration Guide: Cluster to Advanced Cluster"
2. Provider Settings: Moved from the top level to the replication spec allowing you to create multi-cloud clusters.
3. Auto Scaling: Moved from the top level to the replication spec allowing you to scale replication specs individually.
4. Backup Configuration: Renamed from `cloud_backup` to `backup_enabled`.
5. See the [Migration Guide: Advanced Cluster New Sharding Schema](advanced-cluster-new-sharding-schema#migration-sharded) for changes to `num_shards` and the new `zone_id`.
5. See the [Migration Guide: Advanced Cluster New Sharding Configurations](advanced-cluster-new-sharding-schema#migration-sharded) for changes to `num_shards` and the new `zone_id`.

### Example 1: Old Configuration (`mongodbatlas_cluster`)

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/advanced_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ This parameter defaults to false.
* `labels` - (Optional) Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See [below](#labels). **DEPRECATED** Use `tags` instead.
* `mongo_db_major_version` - (Optional) Version of the cluster to deploy. Atlas supports the following MongoDB versions for M10+ clusters: `4.4`, `5.0`, `6.0` or `7.0`. If omitted, Atlas deploys a cluster that runs MongoDB 7.0. If `replication_specs#.region_configs#.<type>Specs.instance_size`: `M0`, `M2` or `M5`, Atlas deploys MongoDB 4.4. Atlas always deploys the cluster with the latest stable release of the specified version. If you set a value to this parameter and set `version_release_system` `CONTINUOUS`, the resource returns an error. Either clear this parameter or set `version_release_system`: `LTS`.
* `pit_enabled` - (Optional) - Flag that indicates if the cluster uses Continuous Cloud Backup.
* `replication_specs` - List of settings that configure your cluster regions. This attribute has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. If for each replication_spec `num_shards` is configured with a value greater than 1 (using deprecated sharding schema), then each object represents a zone with one or more shards. See [below](#replication_specs)
* `replication_specs` - List of settings that configure your cluster regions. This attribute has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. If for each replication_spec `num_shards` is configured with a value greater than 1 (using deprecated sharding configurations), then each object represents a zone with one or more shards. See [below](#replication_specs)
* `root_cert_type` - (Optional) - Certificate Authority that MongoDB Atlas clusters use. You can specify ISRGROOTX1 (for ISRG Root X1).
* `termination_protection_enabled` - Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
* `version_release_system` - (Optional) - Release cadence that Atlas uses for this cluster. This parameter defaults to `LTS`. If you set this field to `CONTINUOUS`, you must omit the `mongo_db_major_version` field. Atlas accepts:
Expand Down

0 comments on commit a9f4887

Please sign in to comment.