Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
6827075
remove num shards logic
maastha Aug 14, 2025
48fd9d6
fmt
maastha Aug 14, 2025
a4a9cea
tmp
maastha Aug 14, 2025
a53266f
remove root disk_size_gb
maastha Aug 15, 2025
79d2212
restructure
maastha Aug 22, 2025
162d83c
Merge branch 'CLOUDP-320243-dev-2.0.0' into numShards-disk-gb-remove-poc
maastha Aug 22, 2025
d70849f
remove advanced_config attrs
maastha Aug 22, 2025
e56d7af
add plan modifier
maastha Aug 22, 2025
b1ec818
Merge branch 'CLOUDP-320243-dev-2.0.0' into numShards-disk-gb-remove-poc
maastha Aug 22, 2025
16b7815
changelog
maastha Aug 22, 2025
0ab2030
fmt
maastha Aug 22, 2025
6c49c37
tmp revert
maastha Aug 22, 2025
b70d292
docs update
maastha Aug 22, 2025
8739fd0
ut disable
maastha Aug 24, 2025
30d0085
fmt
maastha Aug 24, 2025
6cef0bb
remove use_replication_spec_per_shard
maastha Aug 24, 2025
393b011
fmt
maastha Aug 24, 2025
0959a78
fmt
maastha Aug 24, 2025
1a229ef
aws
maastha Aug 24, 2025
84a0039
fmt
maastha Aug 24, 2025
049b858
adv_config
maastha Aug 24, 2025
69cdbc2
nit
maastha Aug 24, 2025
01fc6f9
Merge branch 'CLOUDP-320243-dev-2.0.0' into numShards-disk-gb-remove-poc
maastha Aug 25, 2025
4392e71
extraInfo
maastha Aug 25, 2025
ea19cbd
checkGeoShardedOldSchema
maastha Aug 25, 2025
19dfe3e
fmt
maastha Aug 25, 2025
28a5a26
update test
maastha Aug 25, 2025
ec18aae
disable mockable reduced tmp
maastha Aug 25, 2025
c891d69
fmt
maastha Aug 25, 2025
71ce6d3
nit
maastha Aug 26, 2025
cf60fa8
doc
maastha Aug 26, 2025
1a08ecf
fmt
maastha Aug 26, 2025
2ddc687
read
maastha Aug 26, 2025
f698dae
t
maastha Aug 26, 2025
a921bb4
ex
maastha Aug 26, 2025
c84de09
fix
maastha Aug 26, 2025
83519d0
fmt
maastha Aug 26, 2025
da5d995
fix acc
maastha Aug 26, 2025
ccfb451
fix ut
maastha Aug 26, 2025
21860ab
tmp mig
maastha Aug 27, 2025
332bbf6
fmt
maastha Aug 27, 2025
2f800ad
nit
maastha Aug 27, 2025
a9e6798
nit
maastha Aug 27, 2025
cc78ac9
h
maastha Aug 27, 2025
bd7bba6
pro
maastha Aug 27, 2025
5947e81
mock
maastha Aug 27, 2025
d259005
mig
maastha Aug 27, 2025
c5f5982
fix
maastha Aug 27, 2025
1d49d87
fmt
maastha Aug 27, 2025
79c1e06
pm
maastha Aug 28, 2025
bf6c99b
TestAccClusterAdvancedCluster_replicaSetAWSProvider disk_size_gb fix
maastha Aug 28, 2025
db4becd
cleanup
maastha Aug 28, 2025
bcabea5
fmt
maastha Aug 28, 2025
63899c2
test
maastha Aug 28, 2025
50b9825
fmt
maastha Aug 28, 2025
92edfe3
preview mig
maastha Aug 28, 2025
f97706d
preview mig
maastha Aug 28, 2025
97c3dd7
ds
maastha Aug 29, 2025
2b79fc1
Revert "ds"
maastha Aug 29, 2025
ec81761
cluster
maastha Aug 29, 2025
55a951b
test
maastha Aug 31, 2025
a066137
cleanup init
maastha Aug 31, 2025
8373c23
resource cleanup
maastha Aug 31, 2025
51be401
ds cleanup
maastha Aug 31, 2025
3d4e9fe
mockable
maastha Aug 31, 2025
303c557
remove old SDK usage
maastha Aug 31, 2025
bcf6342
remove oldSchema
maastha Aug 31, 2025
067cd27
remove comments
maastha Aug 31, 2025
7dd784e
nti
maastha Aug 31, 2025
bf7e89a
remove attrs & old schema
maastha Aug 31, 2025
f439a29
changelog
maastha Aug 31, 2025
b8057c6
branch update
maastha Aug 31, 2025
31034e7
Merge branch 'CLOUDP-333683-remove-old-schema-attrs' into CLOUDP-3336…
maastha Aug 31, 2025
2511d79
guides
maastha Aug 31, 2025
1edbcc0
use_replication_spec_per_shard
maastha Aug 31, 2025
dbd5f14
revert
maastha Aug 31, 2025
e8b529f
revert
maastha Aug 31, 2025
855325a
Update code-health.yml
maastha Aug 31, 2025
7a63efd
nit
maastha Sep 1, 2025
700bb62
nit
maastha Sep 2, 2025
d23991a
address PR comments
maastha Sep 2, 2025
c010456
Merge branch 'CLOUDP-320243-dev-2.0.0' into CLOUDP-333683-remove-old-…
maastha Sep 2, 2025
ab85310
address PR comments
maastha Sep 3, 2025
e6f6f49
address PR comments
maastha Sep 3, 2025
542a198
add plan modifier test for node_count
maastha Sep 3, 2025
08ca903
Apply suggestions from code review
maastha Sep 3, 2025
a9bad40
address PR comments
maastha Sep 3, 2025
f5bdaaf
remove root id from docs
maastha Sep 3, 2025
280f48f
remove root id from docs
maastha Sep 3, 2025
d02c314
2.0 upgrade guide
maastha Sep 3, 2025
8247c92
2.0 upgrade guide
maastha Sep 3, 2025
61506c9
Merge branch 'CLOUDP-333683-remove-old-schema-attrs' into CLOUDP-3336…
maastha Sep 4, 2025
af8de3c
Merge branch 'CLOUDP-320243-dev-2.0.0' into CLOUDP-333683-docs-examples
maastha Sep 4, 2025
9d2b749
Update docs/data-sources/advanced_cluster.md
maastha Sep 4, 2025
65d3311
revert reduced_tests to false
maastha Sep 4, 2025
07cbb84
Apply suggestions from code review
maastha Sep 4, 2025
b6aa4ac
fix resource name
maastha Sep 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ jobs:
secrets: inherit
uses: ./.github/workflows/acceptance-tests.yml
with:
reduced_tests: false
reduced_tests: true
13 changes: 2 additions & 11 deletions docs/data-sources/advanced_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ resource "mongodbatlas_advanced_cluster" "example" {
data "mongodbatlas_advanced_cluster" "example" {
project_id = mongodbatlas_advanced_cluster.example.project_id
name = mongodbatlas_advanced_cluster.example.name
use_replication_spec_per_shard = true
}
```

Expand Down Expand Up @@ -128,23 +127,20 @@ data "mongodbatlas_advanced_cluster" "example" {

* `project_id` - (Required) The unique ID for the project to create the cluster.
* `name` - (Required) Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed.
* `use_replication_spec_per_shard` - (Optional) Set this field to true to allow the data source to use the latest schema representing each shard with an individual `replication_specs` object. This enables representing clusters with independent shard scaling.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The cluster ID.
* `bi_connector_config` - Configuration settings applied to BI Connector for Atlas on this cluster. See [below](#bi_connector_config). In prior versions of the MongoDB Atlas Terraform Provider, this parameter was named `bi_connector`.
* `cluster_type` - Type of the cluster that you want to create.
* `disk_size_gb` - Capacity, in gigabytes, of the host's root volume. **(DEPRECATED)** Use `replication_specs[#].region_configs[#].(analytics_specs|electable_specs|read_only_specs).disk_size_gb` instead. To learn more, see the [Migration Guide](../guides/1.18.0-upgrade-guide).
* `encryption_at_rest_provider` - Possible values are AWS, GCP, AZURE or NONE.
* `tags` - Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See [below](#tags).
* `labels` - 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` - Version of the cluster to deploy.
* `pinned_fcv` - The pinned Feature Compatibility Version (FCV) with its associated expiration date. See [below](#pinned_fcv).
* `pit_enabled` - Flag that indicates if the cluster uses Continuous Cloud Backup.
* `replication_specs` - List of settings that configure your cluster regions. If `use_replication_spec_per_shard = true`, this array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. See [below](#replication_specs).
* `replication_specs` - List of settings that configure your cluster regions. This array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. See [below](#replication_specs).
* `root_cert_type` - Certificate Authority that MongoDB Atlas clusters use.
* `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` - Release cadence that Atlas uses for this cluster.
Expand Down Expand Up @@ -183,9 +179,7 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le

### replication_specs

* `id` - **(DEPRECATED)** Unique identifer of the replication document for a zone in a Global Cluster. This value corresponds to the legacy sharding schema (no independent shard scaling) and is different from the Shard ID you may see in the Atlas UI. This value is not populated (empty string) when a sharded cluster has independently scaled shards.
* `external_id` - Unique 24-hexadecimal digit string that identifies the replication object for a shard in a Cluster. This value corresponds to Shard ID displayed in the UI. When using old sharding configuration (replication spec with `num_shards` greater than 1) this value is not populated.
* `num_shards` - Provide this value if you set a `cluster_type` of `SHARDED` or `GEOSHARDED`. **(DEPRECATED)** To learn more, see the [Migration Guide](../guides/1.18.0-upgrade-guide).
* `external_id` - Unique 24-hexadecimal digit string that identifies the replication object for a shard in a Cluster. This value corresponds to Shard ID displayed in the UI.
* `region_configs` - Configuration for the hardware specifications for nodes set for a given region. Each `region_configs` object describes the region's priority in elections and the number and type of MongoDB nodes that Atlas deploys to the region. Each `region_configs` object must have either an `analytics_specs` object, `electable_specs` object, or `read_only_specs` object. See [below](#region_configs).
* `container_id` - A key-value map of the Network Peering Container ID(s) for the configuration specified in `region_configs`. The Container ID is the id of the container either created programmatically by the user before any clusters existed in a project or when the first cluster in the region (AWS/Azure) or project (GCP) was created. The syntax is `"providerName:regionName" = "containerId"`. Example `AWS:US_EAST_1" = "61e0797dde08fb498ca11a71`.
* `zone_name` - Name for the zone in a Global Cluster.
Expand Down Expand Up @@ -231,9 +225,7 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le
* `compute_max_instance_size` - Maximum instance size to which your cluster can automatically scale (such as M40).
#### Advanced Configuration

* `default_read_concern` - [Default level of acknowledgment requested from MongoDB for read operations](https://docs.mongodb.com/manual/reference/read-concern/) set for this cluster. **(DEPRECATED)** MongoDB 6.0 and later clusters default to `local`. To use a custom read concern level, please refer to your driver documentation.
* `default_write_concern` - [Default level of acknowledgment requested from MongoDB for write operations](https://docs.mongodb.com/manual/reference/write-concern/) set for this cluster. MongoDB 6.0 clusters default to [majority](https://docs.mongodb.com/manual/reference/write-concern/).
* `fail_index_key_too_long` - **(DEPRECATED)** When true, documents can only be updated or inserted if, for all indexed fields on the target collection, the corresponding index entries do not exceed 1024 bytes. When false, mongod writes documents that exceed the limit but does not index them.
* `javascript_enabled` - When true, the cluster allows execution of operations that perform server-side executions of JavaScript. When false, the cluster disables execution of those operations.
* `minimum_enabled_tls_protocol` - Sets the minimum Transport Layer Security (TLS) version the cluster accepts for incoming connections. Valid values are:
- TLS1_0
Expand Down Expand Up @@ -261,7 +253,6 @@ In addition to all arguments above, the following attributes are exported:

* `cluster_id` - The cluster ID.
* `mongo_db_version` - Version of MongoDB the cluster runs, in `major-version`.`minor-version` format.
* `id` - The Terraform's unique identifier used internally for state management.
* `connection_strings` - Set of connection strings that your applications use to connect to this cluster. More information in [Connection-strings](https://docs.mongodb.com/manual/reference/connection-string/). Use the parameters in this object to connect your applications to this cluster. To learn more about the formats of connection strings, see [Connection String Options](https://docs.atlas.mongodb.com/reference/faq/connection-changes/). NOTE: Atlas returns the contents of this object after the cluster is operational, not while it builds the cluster.

**NOTE** Connection strings must be returned as a list, therefore to refer to a specific attribute value add index notation. Example: mongodbatlas_advanced_cluster.cluster-test.connection_strings.0.standard_srv
Expand Down
13 changes: 2 additions & 11 deletions docs/data-sources/advanced_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ resource "mongodbatlas_advanced_cluster" "example" {
data "mongodbatlas_advanced_cluster" "example-asym" {
project_id = mongodbatlas_advanced_cluster.example.project_id
name = mongodbatlas_advanced_cluster.example.name
use_replication_spec_per_shard = true
}
```

Expand Down Expand Up @@ -119,27 +118,24 @@ data "mongodbatlas_advanced_clusters" "example" {
## Argument Reference

* `project_id` - (Required) The unique ID for the project to get the clusters.
* `use_replication_spec_per_shard` - (Optional) Set this field to true to allow the data source to use the latest schema representing each shard with an individual `replication_specs` object. This enables representing clusters with independent shard scaling. **Note:** If not set to true, this data source return all clusters except clusters with asymmetric shards.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The cluster ID.
* `results` - A list where each represents a Cluster. See below for more details.

### Advanced Cluster

* `bi_connector_config` - Configuration settings applied to BI Connector for Atlas on this cluster. See [below](#bi_connector_config). In prior versions of the MongoDB Atlas Terraform Provider, this parameter was named `bi_connector`.
* `cluster_type` - Type of the cluster that you want to create.
* `disk_size_gb` - Capacity, in gigabytes, of the host's root volume. **(DEPRECATED)** Use `replication_specs[#].region_configs[#].(analytics_specs|electable_specs|read_only_specs).disk_size_gb` instead. To learn more, see the [Migration Guide](../guides/1.18.0-upgrade-guide) for more details.
* `encryption_at_rest_provider` - Possible values are AWS, GCP, AZURE or NONE.
* `tags` - Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See [below](#tags).
* `labels` - Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See [below](#labels).
* `mongo_db_major_version` - Version of the cluster to deploy.
* `pinned_fcv` - The pinned Feature Compatibility Version (FCV) with its associated expiration date. See [below](#pinned_fcv).
* `pit_enabled` - Flag that indicates if the cluster uses Continuous Cloud Backup.
* `replication_specs` - List of settings that configure your cluster regions. If `use_replication_spec_per_shard = true`, this array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. See [below](#replication_specs)
* `replication_specs` - List of settings that configure your cluster regions. This array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. See [below](#replication_specs)
* `root_cert_type` - Certificate Authority that MongoDB Atlas clusters use.
* `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` - Release cadence that Atlas uses for this cluster.
Expand Down Expand Up @@ -178,9 +174,7 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le

### replication_specs

* `id` - **(DEPRECATED)** Unique identifer of the replication document for a zone in a Global Cluster. This value corresponds to the legacy sharding schema (no independent shard scaling) and is different from the Shard ID you may see in the Atlas UI. This value is not populated (empty string) when a sharded cluster has independently scaled shards.
* `external_id` - Unique 24-hexadecimal digit string that identifies the replication object for a shard in a Cluster. This value corresponds to Shard ID displayed in the UI. When using old sharding configuration (replication spec with `num_shards` greater than 1) this value is not populated.
* `num_shards` - Provide this value if you set a `cluster_type` of SHARDED or GEOSHARDED. **(DEPRECATED)** To learn more, see the [Migration Guide](../guides/1.18.0-upgrade-guide) for more details.
* `external_id` - Unique 24-hexadecimal digit string that identifies the replication object for a shard in a Cluster. This value corresponds to Shard ID displayed in the UI.
* `region_configs` - Configuration for the hardware specifications for nodes set for a given region. Each `region_configs` object describes the region's priority in elections and the number and type of MongoDB nodes that Atlas deploys to the region. Each `region_configs` object must have either an `analytics_specs` object, `electable_specs` object, or `read_only_specs` object. See [below](#region_configs).
* `container_id` - A key-value map of the Network Peering Container ID(s) for the configuration specified in `region_configs`. The Container ID is the id of the container either created programmatically by the user before any clusters existed in a project or when the first cluster in the region (AWS/Azure) or project (GCP) was created. The syntax is `"providerName:regionName" = "containerId"`. Example `AWS:US_EAST_1" = "61e0797dde08fb498ca11a71`.
* `zone_name` - Name for the zone in a Global Cluster.
Expand Down Expand Up @@ -227,9 +221,7 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le

#### Advanced Configuration

* `default_read_concern` - [Default level of acknowledgment requested from MongoDB for read operations](https://docs.mongodb.com/manual/reference/read-concern/) set for this cluster. **(DEPRECATED)** MongoDB 6.0 and later clusters default to `local`. To use a custom read concern level, please refer to your driver documentation.
* `default_write_concern` - [Default level of acknowledgment requested from MongoDB for write operations](https://docs.mongodb.com/manual/reference/write-concern/) set for this cluster. MongoDB 6.0 clusters default to [majority](https://docs.mongodb.com/manual/reference/write-concern/).
* `fail_index_key_too_long` - **(DEPRECATED)** When true, documents can only be updated or inserted if, for all indexed fields on the target collection, the corresponding index entries do not exceed 1024 bytes. When false, mongod writes documents that exceed the limit but does not index them.
* `javascript_enabled` - When true, the cluster allows execution of operations that perform server-side executions of JavaScript. When false, the cluster disables execution of those operations.
* `minimum_enabled_tls_protocol` - Sets the minimum Transport Layer Security (TLS) version the cluster accepts for incoming connections. Valid values are:
- TLS1_0
Expand Down Expand Up @@ -258,7 +250,6 @@ In addition to all arguments above, the following attributes are exported:

* `cluster_id` - The cluster ID.
* `mongo_db_version` - Version of MongoDB the cluster runs, in `major-version`.`minor-version` format.
* `id` - The Terraform's unique identifier used internally for state management.
* `connection_strings` - Set of connection strings that your applications use to connect to this cluster. More information in [Connection-strings](https://docs.mongodb.com/manual/reference/connection-string/). Use the parameters in this object to connect your applications to this cluster. To learn more about the formats of connection strings, see [Connection String Options](https://docs.atlas.mongodb.com/reference/faq/connection-changes/). NOTE: Atlas returns the contents of this object after the cluster is operational, not while it builds the cluster.

**NOTE** Connection strings must be returned as a list, therefore to refer to a specific attribute value add index notation. Example: mongodbatlas_advanced_cluster.cluster-test.connection_strings.0.standard_srv
Expand Down
12 changes: 12 additions & 0 deletions docs/guides/2.0.0-upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ New user and team management resources that replace deprecated invitation-based

## Breaking Changes

### `mongodbatlas_advanced_cluster`
Resource:
- 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`.
- Several block elements are now attributes requiring syntax changes in existing configurations such as `replication_specs`, `region_configs`, `advanced_configuration`, etc.
- Only the new sharding configuration (one `replication_spec` for each shard) that allows scaling shards independently is supported.
- For details, see [Migration Guide: Advanced Cluster (v1.x → v2.0.0)](migrate-to-advanced-cluster-2.0.md).

Data source:
- 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`.
- 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.
- For details, see [Migration Guide: Advanced Cluster (v1.x → v2.0.0)](migrate-to-advanced-cluster-2.0.md).

### `mongodbatlas_cloud_backup_schedule`
Resource:
- `export` and `auto_export_enabled` are now optional only arguments. This facilitates tracking changes in their configurations.
Expand Down
Loading