Skip to content

Conversation

lantoli
Copy link
Collaborator

@lantoli lantoli commented Aug 25, 2025

Description

Update doc for adv2v2 command.

Note: Migration Guide: Advanced Cluster (v1.x → v2.0.0) is not linked yet from README.md adv2v2 command as it's not in master branch yet. It will be added after provider 2.0.0 is released.

Link to any related issue(s): CLOUDP-340590

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals I have added appropriate changelog entries.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@lantoli lantoli changed the title doc: doc: Update doc for adv2v2 command Aug 25, 2025
@lantoli lantoli marked this pull request as ready for review August 26, 2025 09:17
@Copilot Copilot AI review requested due to automatic review settings August 26, 2025 09:17
@lantoli lantoli requested a review from a team as a code owner August 26, 2025 09:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the documentation structure for the Terraform Atlas CLI plugin by introducing separate documentation pages for each command and consolidating content in the README.

  • Removes the standalone dynamic block limitations guide
  • Creates dedicated documentation for clu2adv and adv2v2 commands
  • Restructures the README to provide a cleaner overview with links to detailed command documentation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
docs/guide_clu2adv_dynamic_block.md Removes the standalone guide for dynamic block limitations
docs/command_clu2adv.md Creates comprehensive documentation for the clu2adv command including usage, examples, and limitations
docs/command_adv2v2.md Creates comprehensive documentation for the adv2v2 command including usage, examples, and limitations
README.md Restructures to provide clean overview with links to detailed command documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lantoli lantoli requested a review from a team August 26, 2025 09:44
@@ -4,8 +4,33 @@

This repository contains the Atlas CLI plugin for [Terraform's MongoDB Atlas Provider](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs).

It has the following commands to help with your Terraform configurations:
- **clusterToAdvancedCluster**: Convert a `mongodbatlas_cluster` Terraform configuration to `mongodbatlas_advanced_cluster` (preview provider 2.0.0).
## Available Commands
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be after installation perhaps?

Copy link
Collaborator Author

@lantoli lantoli Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's fair, changed here: 646a4e2

@lantoli lantoli requested a review from bodegus August 26, 2025 10:45
Copy link
Contributor

@AgustinBettati AgustinBettati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


If you need to use the plugin for `dynamic` block use cases not yet supported, please send us [feedback](https://github.com/mongodb-labs/atlas-cli-plugin-terraform/issues).

#### Dynamic block and individual blocks in the same resource
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might rephrase this to: Block values defined with combination of dynamic and inline expressions

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, changed here: 3a64a89

@@ -0,0 +1,194 @@
# Convert mongodbatlas_cluster to mongodbatlas_advanced_cluster

clusterToAdvancedCluster (clu2adv) command helps you migrate from `mongodbatlas_cluster` to `mongodbatlas_advanced_cluster` Provider 2.0.0 schema.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be helpful to clarify this. ++"This revised file migrates the terraform configurations and state to the latest version and does not modify the resources deployed in MongoDB Atlas"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, changed here: 3ed0cde

Copy link

@bodegus bodegus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lantoli and others added 2 commits August 28, 2025 09:16

#### Combination of blocks with dynamic and inline expressions

Dynamic blocks and individual blocks for `region_configs` or `replication_specs` are not supported at the same time. Remove the individual `region_configs` or `replication_specs` blocks and use a local `list` variable with [concat](https://developer.hashicorp.com/terraform/language/functions/concat) to add the individual block information to the variable you're using in the `for_each` expression.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Dynamic blocks and individual blocks for `region_configs` or `replication_specs` are not supported at the same time. Remove the individual `region_configs` or `replication_specs` blocks and use a local `list` variable with [concat](https://developer.hashicorp.com/terraform/language/functions/concat) to add the individual block information to the variable you're using in the `for_each` expression.
Dynamic blocks and individual blocks for `region_configs` or `replication_specs` are not supported at the same time. To continue using this plugin, remove the individual `region_configs` or `replication_specs` blocks and use a local `list` variable with [concat](https://developer.hashicorp.com/terraform/language/functions/concat) to add the individual block information to the variable you're using in the `for_each` expression.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, changed here: eddaa86


Dynamic blocks and individual blocks for `region_configs` or `replication_specs` are not supported at the same time. Remove the individual `region_configs` or `replication_specs` blocks and use a local `list` variable with [concat](https://developer.hashicorp.com/terraform/language/functions/concat) to add the individual block information to the variable you're using in the `for_each` expression.

Let's see an example with `region_configs`; it's the same idea for `replication_specs`. In the original configuration file, the `mongodb_cluster` resource is used inside a module that receives the `region_configs` elements in a `list` variable and we want to add an additional `region_configs` with a read-only node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Let's see an example with `region_configs`; it's the same idea for `replication_specs`. In the original configuration file, the `mongodb_cluster` resource is used inside a module that receives the `region_configs` elements in a `list` variable and we want to add an additional `region_configs` with a read-only node.
##### Example
Let's see an example with `region_configs`; the same idea applies for `replication_specs`. In the original configuration file, the `mongodbatlas_cluster` resource is used inside a module that receives the `region_configs` elements in a `list` variable and we want to add an additional `region_configs` with a read-only node.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, changed here: eddaa86


Dynamic blocks and individual blocks for `regions_config` or `replication_specs` are not supported at the same time. Remove the individual `regions_config` or `replication_specs` blocks and use a local `list` variable with [concat](https://developer.hashicorp.com/terraform/language/functions/concat) to add the individual block information to the variable you're using in the `for_each` expression.

Let's see an example with `regions_config`, it's the same idea for `replication_specs`. In the original configuration file, the `mongodb_cluster` resource is used inside a module that receives the `regions_config` elements in a `list` variable and we want to add an additional `regions_config` with a read-only node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you may apply the same suggestion I've given before, for consistency

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, changed here: eddaa86

@lantoli lantoli merged commit 9cb43b4 into main Aug 29, 2025
7 checks passed
@lantoli lantoli deleted the CLOUDP-340590_doc branch August 29, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants