Skip to content
Merged
Show file tree
Hide file tree
Changes from 75 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
23 changes: 23 additions & 0 deletions .changelog/3635.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```release-note:breaking-change
resource/mongodbatlas_advanced_cluster: Removes deprecated attributes `id`, `disk_size_gb`, `replication_specs.#.id`, `replication_specs.#.num_shards`
```

```release-note:breaking-change
data-source/mongodbatlas_advanced_cluster: Removes deprecated attributes `use_replication_spec_per_shard`, `id`, `disk_size_gb`, `replication_specs.#.id`, `replication_specs.#.num_shards`
```

```release-note:breaking-change
data-source/mongodbatlas_advanced_clusters: Removes deprecated attributes `use_replication_spec_per_shard`, `results.#.id`, `results.#.disk_size_gb`, `results.#.replication_specs.#.id`, `results.#.replication_specs.#.num_shards`
```

```release-note:breaking-change
resource/mongodbatlas_advanced_cluster: Removes deprecated attributes `advanced_configuration.default_read_concern` and `advanced_configuration.fail_index_key_too_long`
```

```release-note:breaking-change
data-source/mongodbatlas_advanced_cluster: Removes deprecated attributes `advanced_configuration.default_read_concern` and `advanced_configuration.fail_index_key_too_long`
```

```release-note:breaking-change
data-source/mongodbatlas_advanced_clusters: Removes deprecated attributes `results.#.advanced_configuration.default_read_concern` and `results.#.advanced_configuration.fail_index_key_too_long`
```
31 changes: 29 additions & 2 deletions .github/workflows/acceptance-tests-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ jobs:
- name: Acceptance Tests
env:
MONGODB_ATLAS_LAST_VERSION: ${{ needs.get-provider-version.outputs.provider_version }}
MONGODB_ATLAS_LAST_1X_VERSION: ${{ inputs.mongodb_atlas_last_1x_version }}
HTTP_MOCKER_CAPTURE: 'true'
ACCTEST_REGEX_RUN: ${{ inputs.reduced_tests && '^TestAccMockable' || env.ACCTEST_REGEX_RUN }}
ACCTEST_PACKAGES: |
Expand Down Expand Up @@ -427,7 +426,35 @@ jobs:
env:
MONGODB_ATLAS_LAST_VERSION: ${{ inputs.mongodb_atlas_last_1x_version }}
MONGODB_ATLAS_LAST_1X_VERSION: ${{ inputs.mongodb_atlas_last_1x_version }}
ACCTEST_REGEX_RUN: '^TestMig'
ACCTEST_REGEX_RUN: ${{ !inputs.reduced_tests && '^TestV1xMig' || env.ACCTEST_REGEX_RUN }}
ACCTEST_PACKAGES: |
./internal/service/advancedclustertpf
run: make testacc

advanced_cluster_tpf_mig_from_tpf_preview:
needs: [ change-detection, get-provider-version ]
if: ${{ inputs.reduced_tests == false && (needs.change-detection.outputs.advanced_cluster == 'true' || inputs.test_group == 'advanced_cluster') }}
env:
MONGODB_ATLAS_TEST_SDKV2_TO_TPF: 'false'
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
MONGODB_ATLAS_LAST_VERSION: ${{ inputs.mongodb_atlas_last_1x_version }}
MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER: 'true' # required for migration tests that use provider version < 2.0.0
MONGODB_ATLAS_LAST_1X_VERSION: ${{ inputs.mongodb_atlas_last_1x_version }}
ACCTEST_REGEX_RUN: ${{ !inputs.reduced_tests && '^TestV1xMig' || env.ACCTEST_REGEX_RUN }}
ACCTEST_PACKAGES: |
./internal/service/advancedclustertpf
run: make testacc
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ jobs:
cat doc.repo.patch
exit 1
call-acceptance-tests-workflow:
needs: [build, lint, shellcheck, unit-test, generate-doc-check]
needs: [build, shellcheck, generate-doc-check]
secrets: inherit
uses: ./.github/workflows/acceptance-tests.yml
with:
reduced_tests: true
reduced_tests: false
13 changes: 3 additions & 10 deletions docs/data-sources/advanced_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,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 @@ -124,7 +123,6 @@ 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

Expand All @@ -133,14 +131,13 @@ 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 @@ -179,9 +176,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 @@ -227,9 +222,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.
* `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/)..
* `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
11 changes: 2 additions & 9 deletions docs/data-sources/advanced_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,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 @@ -115,7 +114,6 @@ 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

Expand All @@ -128,14 +126,13 @@ In addition to all arguments above, the following attributes are exported:

* `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 @@ -174,9 +171,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 @@ -223,9 +218,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
Loading