-
Notifications
You must be signed in to change notification settings - Fork 205
doc: Updates guides & examples for removal of mongodbatlas_advanced_cluster
deprecated params
#3634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: CLOUDP-320243-dev-2.0.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - might need another pass or two from other team members
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -4,10 +4,11 @@ page_title: "Migration Guide: Advanced Cluster New Sharding Configurations" | |||
|
|||
# Migration Guide: Advanced Cluster New Sharding Configurations | |||
|
|||
**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. Additionally, as of version 1.23.0, compute auto-scaling supports scaling instance sizes independently for each shard when using the new sharding configuration. Existing sharding configurations continue to work, but you will receive deprecation messages if you continue to use them. | |||
**Objective**: Use this guide to migrate your existing `advanced_cluster` resources that may be using the legacy sharding schema (i.e. using `num_shards`) 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make explicit here that num_shards was deprecated in 1.18.0 and removed in 2.0.0? I see we do reiterate throughout the doc, but can be good to make clear here at the start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
1. Configuration was defined prior to version 1.23.0 when auto-scaling per shard feature was released. | ||
2. Cluster was imported from a legacy schema (For example, `mongodbatlas_cluster` or `mongodbatlas_advanced_cluster` using `num_shards` > 1). | ||
In these cases, you must update the cluster configuration to activate the auto-scaling per shard feature. This can be done by temporarily modifying a value like `compute_min_instance_size`. | ||
-> **NOTE:** In the following scenarios, a `mongodbatlas_advanced_cluster` using the new sharding configuration (single `replication_specs` per shard) might not have shard-level auto-scaling enabled: <br/>1. Configuration was defined prior to version 1.23.0 when auto-scaling per shard feature was released.<br/>2. Cluster was imported from a legacy schema (For example, `mongodbatlas_cluster` or `mongodbatlas_advanced_cluster` using `num_shards` > 1).<br/><br/>In these cases, you must update the cluster configuration to activate the auto-scaling per shard feature. This can be done by temporarily modifying a value like `compute_min_instance_size`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would add the 3rd case of users transitioning from 1.x directly to 2.x, the transition does not trigger any update operation so autoscaling will remain CLUSTER wide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
@@ -60,8 +73,9 @@ replication_specs = [ | |||
} | |||
] | |||
``` | |||
Additionally, `mongodbatlas_advanced_cluster` now supports only the new sharding configuration that allows scaling shards independently. If not using the new configuration already, please also see the [Migration Guide: Advanced Cluster New Sharding Configurations](advanced-cluster-new-sharding-schema#migration-sharded). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Can we add this as a separate point to highlight more its importance?
Would also be explicit on when users have to take action on this case, potentially rephrasing If not using the new configuration already, ...
If the configuration defines the now removed num_shards attribute, ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated and this is now a separate point
3.
mongodbatlas_advanced_clusternow supports only the new sharding configuration that allows scaling shards independently. If your configuration defines the num_shards attribute (removed in 2.0.0), please also see the [Migration Guide: Advanced Cluster New Sharding Configurations](advanced-cluster-new-sharding-schema#migration-sharded).
- **Step #1:** Apply definition changes [explained on this page](#configuration-changes-when-upgrading-from-v1x) until there are no errors and no planned changes. | ||
- You can also use the [Atlas CLI plugin](https://github.com/mongodb-labs/atlas-cli-plugin-terraform?tab=readme-ov-file#2-advancedclustertov2-adv2v2) to generate the `mongodbatlas_advanced_cluster` resource definition. This is the recommended method as it will generate a clean configuration while keeping the original Terraform expressions. Please be aware of the [plugin limitations](https://github.com/mongodb-labs/atlas-cli-plugin-terraform/blob/main/docs/command_adv2v2.md#limitations). | ||
|
||
~> NOTE: If not using the new **sharding** configuration already, you would also need to adjust `replication_specs` as per the [Migration Guide: Advanced Cluster New Sharding Configurations](advanced-cluster-new-sharding-schema#migration-sharded). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This seems slightly redundant given it has to be a clear step of Configuration changes when upgrading from v1.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed it now that it's an explicit point in Configuration changes...
Co-authored-by: Marco Suma <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview - OUTDATED - Please IGNORE
This PR removes deprecated parameters from the mongodbatlas_advanced_cluster
resource and related configurations to complete the cleanup initiated in version 2.0.0. The changes focus on eliminating references to deprecated sharding configurations and updating documentation and examples to reflect the current supported schema.
Key changes include:
- Removal of deprecated parameter references in deprecation messages
- Cleanup of deprecated
num_shards
anduse_replication_spec_per_shard
attributes from test files and examples - Documentation updates to reflect the removal of deprecated attributes
- Import statement cleanup where deprecated constants are no longer needed
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
internal/service/team/resource_team.go | Updates deprecation message placeholder for team usernames parameter |
internal/service/team/data_source_team.go | Updates deprecation message placeholder for team usernames data source |
internal/service/projectinvitation/resource_project_invitation.go | Removes deprecation message and unused import for project invitation resource |
internal/service/projectinvitation/data_source_project_invitation.go | Removes deprecation message and unused import for project invitation data source |
internal/service/project/resource_project_schema.go | Removes deprecation message for teams parameter |
internal/service/project/model_project.go | Removes deprecation message and unused imports for project model |
internal/service/orginvitation/resource_org_invitation.go | Removes deprecation message and unused import for org invitation resource |
internal/service/orginvitation/data_source_org_invitation.go | Removes deprecation message and unused import for org invitation data source |
internal/service/atlasuser/data_source_atlas_users.go | Removes deprecation messages and unused import for atlas users data source |
internal/service/atlasuser/data_source_atlas_user.go | Removes deprecation messages and unused import for atlas user data source |
internal/service/advancedcluster/testdata/*.yaml | Removes deprecated use_replication_spec_per_shard parameters from test configurations |
examples/*/main.tf | Removes deprecated num_shards parameters from advanced cluster examples |
examples/mongodbatlas_encryption_at_rest/aws/multi-region-cluster/modules/multi-region-cluster/main.tf | Converts from deprecated num_shards to new sharding configuration with separate replication specs |
docs/resources/advanced_cluster.md | Updates documentation to remove references to deprecated parameters and configurations |
docs/guides/*.md | Updates migration guides and documentation to reflect removal of deprecated attributes |
docs/data-sources/advanced_cluster*.md | Updates data source documentation to remove deprecated parameter references |
.github/workflows/code-health.yml | Modifies CI workflow dependencies and test configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...ongodbatlas_encryption_at_rest/aws/multi-region-cluster/modules/multi-region-cluster/main.tf
Show resolved
Hide resolved
1903756
to
8247c92
Compare
Co-authored-by: Copilot <[email protected]>
@@ -40,6 +40,18 @@ New user and team management resources that replace deprecated invitation-based | |||
|
|||
## Breaking Changes | |||
|
|||
### `mongodbatlas_advanced_cluster` | |||
Resource: | |||
- Following attributes have been removed: `id`, `disk_size_gb`, `replication_specs.#.num_shards`, `replication_specs.#.id`, `advanced_configuration.default_read_concern`, `advanced_configuration.fail_index_key_too_long`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Following attributes have been removed: `id`, `disk_size_gb`, `replication_specs.#.num_shards`, `replication_specs.#.id`, `advanced_configuration.default_read_concern`, `advanced_configuration.fail_index_key_too_long`. | |
- The following attributes have been removed: `id`, `disk_size_gb`, `replication_specs.#.num_shards`, `replication_specs.#.id`, `advanced_configuration.default_read_concern`, `advanced_configuration.fail_index_key_too_long`. |
nit
- For details, see [Migration Guide: Advanced Cluster (v1.x → v2.0.0)](migrate-to-advanced-cluster-2.0.md). | ||
|
||
Data source: | ||
- Following attributes have been removed: `id`, `disk_size_gb`, `replication_specs.#.num_shards`, `replication_specs.#.id`, `advanced_configuration.default_read_concern`, `advanced_configuration.fail_index_key_too_long`, `use_replication_spec_per_shard`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Following attributes have been removed: `id`, `disk_size_gb`, `replication_specs.#.num_shards`, `replication_specs.#.id`, `advanced_configuration.default_read_concern`, `advanced_configuration.fail_index_key_too_long`, `use_replication_spec_per_shard`. | |
- The following attributes have been removed: `id`, `disk_size_gb`, `replication_specs.#.num_shards`, `replication_specs.#.id`, `advanced_configuration.default_read_concern`, `advanced_configuration.fail_index_key_too_long`, `use_replication_spec_per_shard`. |
|
||
Data source: | ||
- Following attributes have been removed: `id`, `disk_size_gb`, `replication_specs.#.num_shards`, `replication_specs.#.id`, `advanced_configuration.default_read_concern`, `advanced_configuration.fail_index_key_too_long`, `use_replication_spec_per_shard`. | ||
- The data sources will now return only the new sharding configuration (one `replication_spec` for each shard) of the clusters that allows scaling shards independently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: not about doc, have we checked what happens when singular/plural ds refer to pre-ISS clusters, do we raise an error or ignore the cluster?
@@ -4,10 +4,11 @@ page_title: "Migration Guide: Advanced Cluster New Sharding Configurations" | |||
|
|||
# Migration Guide: Advanced Cluster New Sharding Configurations | |||
|
|||
**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. Additionally, as of version 1.23.0, compute auto-scaling supports scaling instance sizes independently for each shard when using the new sharding configuration. Existing sharding configurations continue to work, but you will receive deprecation messages if you continue to use them. | |||
**Objective**: Use this guide to migrate your existing `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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: refer by the full resource name, mongodbatlas_advanced_cluster, same for all occurences
Description
Updates guides & examples for removal of
mongodbatlas_advanced_cluster
deprecated paramsLink to any related issue(s): CLOUDP-333683
Type of change:
Required Checklist:
Further comments