diff --git a/.changelog/2474.txt b/.changelog/2474.txt
new file mode 100644
index 0000000000..fc7943c4a1
--- /dev/null
+++ b/.changelog/2474.txt
@@ -0,0 +1,11 @@
+```release-note:enhancement
+resource/mongodbatlas_stream_connection: Adds `networking` attribute
+```
+
+```release-note:enhancement
+data-source/mongodbatlas_stream_connection: Adds `networking` attribute
+```
+
+```release-note:enhancement
+data-source/mongodbatlas_stream_connections: Adds `networking` attribute
+```
\ No newline at end of file
diff --git a/.changelog/2814.txt b/.changelog/2814.txt
new file mode 100644
index 0000000000..71ab0a867c
--- /dev/null
+++ b/.changelog/2814.txt
@@ -0,0 +1,3 @@
+```release-note:enhancement
+resource/mongodbatlas_advanced_cluster: Adjusts update operation to support cluster tier auto scaling per shard.
+```
diff --git a/.changelog/2825.txt b/.changelog/2825.txt
index 42e2f3cdcd..b34e96a9e7 100644
--- a/.changelog/2825.txt
+++ b/.changelog/2825.txt
@@ -1,11 +1,11 @@
-```release-note:note
-resource/mongodbatlas_advanced_cluster: Adds new `advanced_configuration.0.default_max_time_ms` attribute
+```release-note:enhancement
+resource/mongodbatlas_advanced_cluster: Adds `advanced_configuration.0.default_max_time_ms` attribute
```
-```release-note:note
-data-source/mongodbatlas_advanced_cluster: Adds new `advanced_configuration.0.default_max_time_ms` attribute
+```release-note:enhancement
+data-source/mongodbatlas_advanced_cluster: Adds `advanced_configuration.0.default_max_time_ms` attribute
```
-```release-note:note
-data-source/mongodbatlas_advanced_clusters: Adds new `advanced_configuration.0.default_max_time_ms` attribute
+```release-note:enhancement
+data-source/mongodbatlas_advanced_clusters: Adds `advanced_configuration.0.default_max_time_ms` attribute
```
diff --git a/.changelog/2836.txt b/.changelog/2836.txt
new file mode 100644
index 0000000000..5cc1efb27f
--- /dev/null
+++ b/.changelog/2836.txt
@@ -0,0 +1,3 @@
+```release-note:enhancement
+resource/mongodbatlas_advanced_cluster: Adjusts create operation to support cluster tier auto scaling per shard.
+```
diff --git a/.changelog/2872.txt b/.changelog/2872.txt
new file mode 100644
index 0000000000..03a0bb670c
--- /dev/null
+++ b/.changelog/2872.txt
@@ -0,0 +1,28 @@
+```release-note:enhancement
+resource/mongodbatlas_advanced_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute
+```
+
+```release-note:enhancement
+data-source/mongodbatlas_advanced_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute
+```
+
+```release-note:enhancement
+data-source/mongodbatlas_advanced_clusters: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute
+```
+
+```release-note:enhancement
+resource/mongodbatlas_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute
+```
+
+```release-note:enhancement
+data-source/mongodbatlas_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute
+```
+
+```release-note:enhancement
+data-source/mongodbatlas_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute
+```
+
+
+
+
+
diff --git a/.changelog/2887.txt b/.changelog/2887.txt
new file mode 100644
index 0000000000..173cfda8bd
--- /dev/null
+++ b/.changelog/2887.txt
@@ -0,0 +1,3 @@
+```release-note:bug
+resource/mongodbatlas_search_index: Fixes resource create and update when `wait_for_index_build_completion` attribute is used
+```
diff --git a/.github/workflows/acceptance-tests-runner.yml b/.github/workflows/acceptance-tests-runner.yml
index 68967ddff0..a8360f470a 100644
--- a/.github/workflows/acceptance-tests-runner.yml
+++ b/.github/workflows/acceptance-tests-runner.yml
@@ -112,6 +112,10 @@ on:
required: true
mongodb_atlas_private_key:
required: true
+ mongodb_atlas_public_key_read_only:
+ required: true
+ mongodb_atlas_private_key_read_only:
+ required: true
ca_cert:
required: true
aws_account_id:
@@ -188,6 +192,8 @@ env:
MONGODB_ATLAS_ORG_ID: ${{ inputs.mongodb_atlas_org_id }}
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.mongodb_atlas_public_key }}
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.mongodb_atlas_private_key }}
+ MONGODB_ATLAS_PUBLIC_KEY_READ_ONLY: ${{ secrets.mongodb_atlas_public_key_read_only }}
+ MONGODB_ATLAS_PRIVATE_KEY_READ_ONLY: ${{ secrets.mongodb_atlas_private_key_read_only }}
MONGODB_ATLAS_GOV_PUBLIC_KEY: ${{ secrets.mongodb_atlas_gov_public_key }}
MONGODB_ATLAS_GOV_PRIVATE_KEY: ${{ secrets.mongodb_atlas_gov_private_key }}
MONGODB_ATLAS_GOV_BASE_URL: ${{ inputs.mongodb_atlas_gov_base_url }}
@@ -348,7 +354,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -372,7 +378,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -385,12 +391,15 @@ jobs:
run: go test -v ./internal/testutil/acc/advanced_cluster_schema_v2_test.go
- name: Mocked Acceptance Tests
env:
- ACCTEST_REGEX_RUN: '^TestMock'
+ ACCTEST_REGEX_RUN: '^TestAccMockable'
ACCTEST_PACKAGES: ./internal/service/advancedclustertpf
+ MONGODB_ATLAS_PROJECT_ID: '111111111111111111111111' # 24 chars used for skipping acc.ProjectIDExecution(t) in mocked tests
+ HTTP_MOCKER_REPLAY: 'true'
run: make testacc
- name: Acceptance Tests
env:
MONGODB_ATLAS_LAST_VERSION: ${{ needs.get-provider-version.outputs.provider_version }}
+ HTTP_MOCKER_CAPTURE: 'true'
ACCTEST_PACKAGES: |
./internal/service/advancedcluster
./internal/service/advancedclustertpf
@@ -413,7 +422,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -437,7 +446,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -477,7 +486,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -515,7 +524,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -537,7 +546,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -559,7 +568,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -581,7 +590,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -627,7 +636,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -663,7 +672,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -685,7 +694,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -723,7 +732,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -747,7 +756,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -774,7 +783,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -796,7 +805,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -825,7 +834,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -847,7 +856,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -892,7 +901,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -930,7 +939,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -955,7 +964,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -982,7 +991,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -1004,7 +1013,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -1026,7 +1035,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -1052,7 +1061,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.ref || github.ref }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml
index 0e1c1f4798..a2abbdd443 100644
--- a/.github/workflows/acceptance-tests.yml
+++ b/.github/workflows/acceptance-tests.yml
@@ -55,7 +55,9 @@ jobs:
secrets:
mongodb_atlas_public_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_QA || secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }}
mongodb_atlas_private_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_QA || secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }}
- mongodb_atlas_gov_public_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_GOV_PUBLIC_KEY_QA || secrets.MONGODB_ATLAS_GOV_PUBLIC_KEY_DEV }}
+ mongodb_atlas_public_key_read_only: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_PUBLIC_KEY_READ_ONLY_QA || secrets.MONGODB_ATLAS_PUBLIC_KEY_READ_ONLY_DEV }}
+ mongodb_atlas_private_key_read_only: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_PRIVATE_KEY_READ_ONLY_QA || secrets.MONGODB_ATLAS_PRIVATE_KEY_READ_ONLY_DEV }}
+ mongodb_atlas_gov_public_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_GOV_PUBLIC_KEY_QA || secrets.MONGODB_ATLAS_GOV_PUBLIC_KEY_DEV }}
mongodb_atlas_gov_private_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_GOV_PRIVATE_KEY_QA || secrets.MONGODB_ATLAS_GOV_PRIVATE_KEY_DEV }}
mongodb_atlas_rp_public_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_RP_PUBLIC_KEY_QA || secrets.MONGODB_ATLAS_RP_PUBLIC_KEY_DEV }}
mongodb_atlas_rp_private_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_RP_PRIVATE_KEY_QA || secrets.MONGODB_ATLAS_RP_PRIVATE_KEY_DEV }}
diff --git a/.github/workflows/check-changelog-entry-file.yml b/.github/workflows/check-changelog-entry-file.yml
index e83f27cd4c..80f5896211 100644
--- a/.github/workflows/check-changelog-entry-file.yml
+++ b/.github/workflows/check-changelog-entry-file.yml
@@ -14,7 +14,7 @@ jobs:
permissions: {}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- run: make check-changelog-entry-file
diff --git a/.github/workflows/code-health.yml b/.github/workflows/code-health.yml
index a0717564e9..5a3a8b35d4 100644
--- a/.github/workflows/code-health.yml
+++ b/.github/workflows/code-health.yml
@@ -18,7 +18,7 @@ jobs:
permissions: {}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- name: Build
@@ -30,7 +30,7 @@ jobs:
pull-requests: write # Needed by sticky-pull-request-comment
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- name: Unit Test
@@ -42,7 +42,7 @@ jobs:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install Go
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
cache: false # see https://github.com/golangci/golangci-lint-action/issues/807
diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml
index fd1f4afff1..5818a33824 100644
--- a/.github/workflows/examples.yml
+++ b/.github/workflows/examples.yml
@@ -18,7 +18,7 @@ jobs:
permissions: {}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
@@ -32,7 +32,7 @@ jobs:
permissions: {}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- name: tflint
diff --git a/.github/workflows/jira-release-version.yml b/.github/workflows/jira-release-version.yml
index 0ca985de78..88144d5d0f 100644
--- a/.github/workflows/jira-release-version.yml
+++ b/.github/workflows/jira-release-version.yml
@@ -24,7 +24,7 @@ jobs:
- name: Validation of version format, no pre-releases
run: |
echo "${{ inputs.version_number }}" | grep -P '^v\d+\.\d+\.\d+$'
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- run: make jira-release-version
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3350c10d4f..65bbfe32f9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -135,7 +135,7 @@ jobs:
with:
ref: ${{ inputs.version_number }}
- name: Set up Go
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- name: Import GPG key
diff --git a/.github/workflows/run-script-and-commit.yml b/.github/workflows/run-script-and-commit.yml
index 23d1212210..e3fcedbe57 100644
--- a/.github/workflows/run-script-and-commit.yml
+++ b/.github/workflows/run-script-and-commit.yml
@@ -33,7 +33,7 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.apix_bot_pat }}
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
diff --git a/.github/workflows/update-sdk.yml b/.github/workflows/update-sdk.yml
index 33c5e88a62..c3cd565210 100644
--- a/.github/workflows/update-sdk.yml
+++ b/.github/workflows/update-sdk.yml
@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
+ - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version-file: 'go.mod'
- name: Update files
diff --git a/.golangci.yml b/.golangci.yml
index 83b0802fad..bc730e75ee 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -123,7 +123,7 @@ issues:
- linters:
- gocritic
text: "^hugeParam: req is heavy"
- - path: "_schema\\.go" # exclude rules for schema files as it's auto-genereated from OpenAPI spec
+ - path: "schema\\.go" # exclude rules for schema files as it's auto-genereated from OpenAPI spec
text: "fieldalignment|hugeParam|var-naming|ST1003|S1007|exceeds the maximum|too long|regexpSimplify|nolint"
run:
timeout: 10m
diff --git a/.tool-versions b/.tool-versions
index 6650ebad8f..e6fbd6d1a3 100644
--- a/.tool-versions
+++ b/.tool-versions
@@ -1 +1 @@
-terraform 1.10.2
+terraform 1.10.3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80ee7e62bd..139e48e40a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,18 +1,36 @@
## (Unreleased)
-NOTES:
+ENHANCEMENTS:
+
+* data-source/mongodbatlas_stream_connection: Adds `networking` attribute ([#2474](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2474))
+* data-source/mongodbatlas_stream_connections: Adds `networking` attribute ([#2474](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2474))
+* resource/mongodbatlas_stream_connection: Adds `networking` attribute ([#2474](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2474))
+
+## 1.24.0 (December 20, 2024)
+
+ENHANCEMENTS:
+
+* data-source/mongodbatlas_advanced_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute ([#2872](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2872))
+* data-source/mongodbatlas_advanced_clusters: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute ([#2872](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2872))
+* data-source/mongodbatlas_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute ([#2872](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2872))
+* data-source/mongodbatlas_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute ([#2872](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2872))
+* resource/mongodbatlas_advanced_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute ([#2872](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2872))
+* resource/mongodbatlas_cluster: Adds `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12` attribute ([#2872](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2872))
-* data-source/mongodbatlas_advanced_cluster: Adds new `advanced_configuration.0.default_max_time_ms` attribute ([#2825](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2825))
-* data-source/mongodbatlas_advanced_clusters: Adds new `advanced_configuration.0.default_max_time_ms` attribute ([#2825](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2825))
-* resource/mongodbatlas_advanced_cluster: Adds new `advanced_configuration.0.default_max_time_ms` attribute ([#2825](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2825))
+## 1.23.0 (December 17, 2024)
ENHANCEMENTS:
+* data-source/mongodbatlas_advanced_cluster: Adds `advanced_configuration.0.default_max_time_ms` attribute ([#2825](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2825))
* data-source/mongodbatlas_advanced_cluster: Adds `pinned_fcv` attribute ([#2789](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2789))
+* data-source/mongodbatlas_advanced_clusters: Adds `advanced_configuration.0.default_max_time_ms` attribute ([#2825](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2825))
* data-source/mongodbatlas_advanced_clusters: Adds `pinned_fcv` attribute ([#2789](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2789))
* data-source/mongodbatlas_cluster: Adds `pinned_fcv` attribute ([#2817](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2817))
* data-source/mongodbatlas_clusters: Adds `pinned_fcv` attribute ([#2817](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2817))
+* resource/mongodbatlas_advanced_cluster: Adds `advanced_configuration.0.default_max_time_ms` attribute ([#2825](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2825))
* resource/mongodbatlas_advanced_cluster: Adds `pinned_fcv` attribute ([#2789](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2789))
+* resource/mongodbatlas_advanced_cluster: Adjusts create operation to support cluster tier auto scaling per shard. ([#2836](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2836))
+* resource/mongodbatlas_advanced_cluster: Adjusts update operation to support cluster tier auto scaling per shard. ([#2814](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2814))
* resource/mongodbatlas_cluster: Adds `pinned_fcv` attribute ([#2817](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2817))
BUG FIXES:
@@ -23,6 +41,7 @@ BUG FIXES:
* data-source/mongodbatlas_clusters: `mongo_db_major_version` attribute is populated with binary version when FCV pin is active ([#2817](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2817))
* resource/mongodbatlas_advanced_cluster: `mongo_db_major_version` attribute is populated with binary version when FCV pin is active ([#2789](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2789))
* resource/mongodbatlas_cluster: `mongo_db_major_version` attribute is populated with binary version when FCV pin is active ([#2817](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2817))
+* resource/mongodbatlas_search_index: Fixes resource create and update when `wait_for_index_build_completion` attribute is used ([#2887](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2887))
## 1.22.0 (November 26, 2024)
diff --git a/docs/data-sources/advanced_cluster.md b/docs/data-sources/advanced_cluster.md
index 48a80bd0c8..2b0112229b 100644
--- a/docs/data-sources/advanced_cluster.md
+++ b/docs/data-sources/advanced_cluster.md
@@ -139,7 +139,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.
+* `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.html.markdown).
* `region_configs` - Configuration for the hardware specifications for nodes set for a given regionEach `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)
@@ -205,6 +205,8 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le
* `transaction_lifetime_limit_seconds` - Lifetime, in seconds, of multi-document transactions. Defaults to 60 seconds.
* `default_max_time_ms` - Default time limit in milliseconds for individual read operations to complete. This option corresponds to the [defaultMaxTimeMS(https://www.mongodb.com/docs/upcoming/reference/cluster-parameters/defaultMaxTimeMS/) cluster parameter. This parameter is supported only for MongoDB version 8.0 and above.
* `change_stream_options_pre_and_post_images_expire_after_seconds` - (Optional) The minimum pre- and post-image retention time in seconds This parameter is only supported for MongoDB version 6.0 and above. Defaults to `-1`(off).
+* `tls_cipher_config_mode` - The TLS cipher suite configuration mode. Valid values include `CUSTOM` or `DEFAULT`. The `DEFAULT` mode uses the default cipher suites. The `CUSTOM` mode allows you to specify custom cipher suites for both TLS 1.2 and TLS 1.3.
+* `custom_openssl_cipher_config_tls12` - The custom OpenSSL cipher suite list for TLS 1.2. This field is only valid when `tls_cipher_config_mode` is set to `CUSTOM`.
### pinned_fcv
diff --git a/docs/data-sources/advanced_clusters.md b/docs/data-sources/advanced_clusters.md
index d739aaa3a8..1e8e043d7f 100644
--- a/docs/data-sources/advanced_clusters.md
+++ b/docs/data-sources/advanced_clusters.md
@@ -141,7 +141,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.
+* `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.html.markdown) for more details.
* `region_configs` - Configuration for the hardware specifications for nodes set for a given regionEach `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)
@@ -208,6 +208,8 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le
* `default_max_time_ms` - Default time limit in milliseconds for individual read operations to complete. This option corresponds to the [defaultMaxTimeMS(https://www.mongodb.com/docs/upcoming/reference/cluster-parameters/defaultMaxTimeMS/) cluster parameter. This parameter is supported only for MongoDB version 8.0 and above.
* `transaction_lifetime_limit_seconds` - (Optional) Lifetime, in seconds, of multi-document transactions. Defaults to 60 seconds.
* `change_stream_options_pre_and_post_images_expire_after_seconds` - (Optional) The minimum pre- and post-image retention time in seconds. This parameter is only supported for MongoDB version 6.0 and above. Defaults to `-1`(off).
+* `tls_cipher_config_mode` - The TLS cipher suite configuration mode. Valid values include `CUSTOM` or `DEFAULT`. The `DEFAULT` mode uses the default cipher suites. The `CUSTOM` mode allows you to specify custom cipher suites for both TLS 1.2 and TLS 1.3.
+* `custom_openssl_cipher_config_tls12` - The custom OpenSSL cipher suite list for TLS 1.2. This field is only valid when `tls_cipher_config_mode` is set to `CUSTOM`.
### pinned_fcv
diff --git a/docs/data-sources/cluster.md b/docs/data-sources/cluster.md
index 0541f0df68..c5a40a4ce2 100644
--- a/docs/data-sources/cluster.md
+++ b/docs/data-sources/cluster.md
@@ -233,6 +233,8 @@ Contains a key-value pair that tags that the cluster was created by a Terraform
* `sample_refresh_interval_bi_connector` - Interval in seconds at which the mongosqld process re-samples data to create its relational schema. The default value is 300. The specified value must be a positive integer. Available only for Atlas deployments in which BI Connector for Atlas is enabled.
* `transaction_lifetime_limit_seconds` - Lifetime, in seconds, of multi-document transactions. Defaults to 60 seconds.
* `change_stream_options_pre_and_post_images_expire_after_seconds` - (Optional) The minimum pre- and post-image retention time in seconds. This parameter is only supported for MongoDB version 6.0 and above. Defaults to `-1`(off).
+* `tls_cipher_config_mode` - The TLS cipher suite configuration mode. Valid values include `CUSTOM` or `DEFAULT`. The `DEFAULT` mode uses the default cipher suites. The `CUSTOM` mode allows you to specify custom cipher suites for both TLS 1.2 and TLS 1.3.
+* `custom_openssl_cipher_config_tls12` - The custom OpenSSL cipher suite list for TLS 1.2. This field is only valid when `tls_cipher_config_mode` is set to `CUSTOM`.
### Pinned FCV
diff --git a/docs/data-sources/clusters.md b/docs/data-sources/clusters.md
index 73d2485726..dec627cfb2 100644
--- a/docs/data-sources/clusters.md
+++ b/docs/data-sources/clusters.md
@@ -220,6 +220,8 @@ Contains a key-value pair that tags that the cluster was created by a Terraform
* `sample_size_bi_connector` - Number of documents per database to sample when gathering schema information. Defaults to 100. Available only for Atlas deployments in which BI Connector for Atlas is enabled.
* `sample_refresh_interval_bi_connector` - Interval in seconds at which the mongosqld process re-samples data to create its relational schema. The default value is 300. The specified value must be a positive integer. Available only for Atlas deployments in which BI Connector for Atlas is enabled.
* `change_stream_options_pre_and_post_images_expire_after_seconds` - (Optional) The minimum pre- and post-image retention time in seconds. This parameter is only supported for MongoDB version 6.0 and above. Defaults to `-1`(off).
+* `tls_cipher_config_mode` - The TLS cipher suite configuration mode. Valid values include `CUSTOM` or `DEFAULT`. The `DEFAULT` mode uses the default cipher suites. The `CUSTOM` mode allows you to specify custom cipher suites for both TLS 1.2 and TLS 1.3.
+* `custom_openssl_cipher_config_tls12` - The custom OpenSSL cipher suite list for TLS 1.2. This field is only valid when `tls_cipher_config_mode` is set to `CUSTOM`.
### Pinned FCV
diff --git a/docs/data-sources/stream_connection.md b/docs/data-sources/stream_connection.md
index 242837f186..9085f16cb2 100644
--- a/docs/data-sources/stream_connection.md
+++ b/docs/data-sources/stream_connection.md
@@ -31,6 +31,7 @@ If `type` is of value `Kafka` the following additional attributes are defined:
* `bootstrap_servers` - Comma separated list of server addresses.
* `config` - A map of Kafka key-value pairs for optional configuration. This is a flat object, and keys can have '.' characters.
* `security` - Properties for the secure transport connection to Kafka. For SSL, this can include the trusted certificate to use. See [security](#security).
+* `networking` - Networking Access Type can either be `PUBLIC` (default) or `VPC`. See [networking](#networking).
### Authentication
@@ -48,5 +49,12 @@ If `type` is of value `Kafka` the following additional attributes are defined:
* `role` - The name of the role to use. Can be a built in role or a custom role.
* `type` - Type of the DB role. Can be either BUILT_IN or CUSTOM.
+### Networking
+* `access` - Information about the networking access. See [access](#access).
+
+### Access
+* `name` - Id of the vpc peer when the type is `VPC`.
+* `type` - Selected networking type. Either `PUBLIC` or `VPC`. Defaults to `PUBLIC`.
+
To learn more, see: [MongoDB Atlas API - Stream Connection](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Streams/operation/getStreamConnection) Documentation.
The [Terraform Provider Examples Section](https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/examples/mongodbatlas_stream_instance/atlas-streams-user-journey.md) also contains details on the overall support for Atlas Streams Processing in Terraform.
diff --git a/docs/data-sources/stream_connections.md b/docs/data-sources/stream_connections.md
index 6bdbfe2261..c25ee9a7b4 100644
--- a/docs/data-sources/stream_connections.md
+++ b/docs/data-sources/stream_connections.md
@@ -43,6 +43,7 @@ If `type` is of value `Kafka` the following additional attributes are defined:
* `bootstrap_servers` - Comma separated list of server addresses.
* `config` - A map of Kafka key-value pairs for optional configuration. This is a flat object, and keys can have '.' characters.
* `security` - Properties for the secure transport connection to Kafka. For SSL, this can include the trusted certificate to use. See [security](#security).
+* `networking` - Networking Access Type can either be `PUBLIC` (default) or `VPC`. See [networking](#networking).
### Authentication
@@ -60,5 +61,12 @@ If `type` is of value `Kafka` the following additional attributes are defined:
* `role` - The name of the role to use. Can be a built in role or a custom role.
* `type` - Type of the DB role. Can be either BUILT_IN or CUSTOM.
+### Networking
+* `access` - Information about the networking access. See [access](#access).
+
+### Access
+* `name` - Id of the vpc peer when the type is `VPC`.
+* `type` - Networking type. Either `PUBLIC` or `VPC`. Default is `PUBLIC`.
+
To learn more, see: [MongoDB Atlas API - Stream Connection](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Streams/operation/listStreamConnections) Documentation.
The [Terraform Provider Examples Section](https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/examples/mongodbatlas_stream_instance/atlas-streams-user-journey.md) also contains details on the overall support for Atlas Streams Processing in Terraform.
diff --git a/docs/guides/1.23.0-upgrade-guide.md b/docs/guides/1.23.0-upgrade-guide.md
new file mode 100644
index 0000000000..5e07b6d290
--- /dev/null
+++ b/docs/guides/1.23.0-upgrade-guide.md
@@ -0,0 +1,24 @@
+---
+page_title: "Upgrade Guide 1.23.0"
+---
+
+# MongoDB Atlas Provider 1.23.0: Upgrade and Information Guide
+
+The Terraform MongoDB Atlas Provider version 1.23.0 has a number of new and exciting features.
+
+## New Resources, Data Sources, and Features
+
+- You can now leverage auto-scaling to scale the instance size of each individual shard independently for sharded and geo-sharded clusters defined with `mongodbatlas_advanced_cluster`. To learn more, see the [Advanced Cluster New Sharding Configurations - Use Auto-Scaling Per Shard](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema#use-auto-scaling-per-shard).
+
+- You can now pin a cluster's FCV before upgrading in Atlas, which enables you to revert MongoDB to the previous version after upgrading without experiencing version compatibility issues. This is supported in `mongodbatlas_advanced_cluster` and `mongodbatlas_cluster` using `pinned_fcv`. To learn more, see either [mongodbatlas_advanced_cluster](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/advanced_cluster) or [mongodbatlas_cluster](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/cluster) resource documentation.
+
+- You can now configure the default time limit in milliseconds for individual read operations to complete in `mongodbatlas_advanced_cluster` using `advanced_configuration.0.default_max_time_ms`. To learn more, see [mongodbatlas_advanced_cluster](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/advanced_cluster) resource documentation.
+
+
+## Helpful Links
+
+* [Report bugs](https://github.com/mongodb/terraform-provider-mongodbatlas/issues)
+
+* [Request Features](https://feedback.mongodb.com/forums/924145-atlas?category_id=370723)
+
+* [Contact Support](https://docs.atlas.mongodb.com/support/) covered by MongoDB Atlas support plans, Developer and above.
diff --git a/docs/guides/1.24.0-upgrade-guide.md b/docs/guides/1.24.0-upgrade-guide.md
new file mode 100644
index 0000000000..75745adafd
--- /dev/null
+++ b/docs/guides/1.24.0-upgrade-guide.md
@@ -0,0 +1,20 @@
+---
+page_title: "Upgrade Guide 1.24.0"
+---
+
+# MongoDB Atlas Provider 1.24.0: Upgrade and Information Guide
+
+The Terraform MongoDB Atlas Provider version 1.24.0 has a number of new and exciting features.
+
+## New Resources, Data Sources, and Features
+
+- You can now specify TLS cipher suite configuration in `mongodbatlas_advanced_cluster` and `mongodbatlas_cluster` using `advanced_configuration.0.tls_cipher_config_mode` and `advanced_configuration.0.custom_openssl_cipher_config_tls12`. This allows you to specify custom cipher suites for TLS 1.2. To learn more, see either [mongodbatlas_advanced_cluster](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/advanced_cluster) or [mongodbatlas_cluster](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/cluster) resource documentation.
+
+
+## Helpful Links
+
+* [Report bugs](https://github.com/mongodb/terraform-provider-mongodbatlas/issues)
+
+* [Request Features](https://feedback.mongodb.com/forums/924145-atlas?category_id=370723)
+
+* [Contact Support](https://docs.atlas.mongodb.com/support/) covered by MongoDB Atlas support plans, Developer and above.
diff --git a/docs/guides/advanced-cluster-new-sharding-schema.md b/docs/guides/advanced-cluster-new-sharding-schema.md
index 3f7a18c5d7..1eefd70bd4 100644
--- a/docs/guides/advanced-cluster-new-sharding-schema.md
+++ b/docs/guides/advanced-cluster-new-sharding-schema.md
@@ -4,7 +4,7 @@ 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. 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 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.
Note: Once applied, the `advanced_cluster` resource making use of the new sharding configuration will not be able to transition back to the old sharding configuration.
@@ -13,7 +13,8 @@ Note: Once applied, the `advanced_cluster` resource making use of the new shardi
- [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)
+- [Use Independent Shard Scaling](#use-independent-shard-scaling)
+- [Use Auto-Scaling Per Shard](#use-auto-scaling-per-shard)
## Changes Overview
@@ -287,7 +288,7 @@ resource "mongodbatlas_advanced_cluster" "test" {
Note: The first time `terraform apply` command is run **after** updating the configuration, you may receive a `500 Internal Server Error (Error code: "SERVICE_UNAVAILABLE")` error. This is a known temporary issue. If you encounter this, please re-run `terraform apply` and this time the update should succeed.
-### Use Independent Shard Scaling
+## Use Independent Shard Scaling
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.
@@ -323,7 +324,7 @@ resource "mongodbatlas_advanced_cluster" "test" {
}
```
-With each shard's `replication_specs` defined independently, we can now define distinct `instance_size`, and `disk_iops` (only for AWS) values for each shard in the cluster. In the following example, we define an upgraded instance size of M40 only for the first shard in the cluster.
+With each shard's `replication_specs` defined independently, we can now define distinct `instance_size` and `disk_iops` values for each shard in the cluster. Note that independent `disk_iops` values are only supported for AWS provisioned IOPS, or Azure regions that support Extended IOPS. In the following example, we define an upgraded instance size of M40 only for the first shard in the cluster.
Consider reviewing the Metrics Dashboard in the MongoDB Atlas UI (e.g. https://cloud.mongodb.com/v2/#/clusters/detail/ShardedCluster) for insight into how each shard within your cluster is currently performing, which will inform any shard-specific resource allocation changes you might require.
@@ -360,3 +361,80 @@ resource "mongodbatlas_advanced_cluster" "test" {
```
-> **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).
+
+
+## Use Auto-Scaling Per Shard
+
+As of version 1.23.0, enabled `compute` auto-scaling (either `auto_scaling` or `analytics_auto_scaling`) will scale the `instance_size` of each shard independently. Each shard must be represented with a unique `replication_specs` element and `num_shards` must not be used. On the contrary, if using deprecated `num_shards` or a lower version, enabled compute auto-scaling will scale uniformily across all shards in the cluster.
+
+The following example illustrates a configuration that has compute auto-scaling per shard for electable and analytic nodes.
+
+```
+resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = var.project_id
+ name = "AutoScalingCluster"
+ cluster_type = "SHARDED"
+ replication_specs { # first shard
+ region_configs {
+ electable_specs {
+ instance_size = "M40"
+ node_count = 3
+ }
+ analytics_specs {
+ instance_size = "M40"
+ node_count = 1
+ }
+ auto_scaling {
+ compute_enabled = true
+ compute_max_instance_size = "M60"
+ }
+ analytics_auto_scaling {
+ compute_enabled = true
+ compute_max_instance_size = "M60"
+ }
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }
+ zone_name = "Zone 1"
+ }
+ replication_specs { # second shard
+ region_configs {
+ electable_specs {
+ instance_size = "M40"
+ node_count = 3
+ }
+ analytics_specs {
+ instance_size = "M40"
+ node_count = 1
+ }
+ auto_scaling {
+ compute_enabled = true
+ compute_max_instance_size = "M60"
+ }
+ analytics_auto_scaling {
+ compute_enabled = true
+ compute_max_instance_size = "M60"
+ }
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }
+ zone_name = "Zone 1"
+ }
+ lifecycle { # avoids future non-empty plans as instance size start to scale from initial values
+ ignore_changes = [
+ replication_specs[0].region_configs[0].electable_specs[0].instance_size,
+ replication_specs[0].region_configs[0].analytics_specs[0].instance_size,
+ replication_specs[1].region_configs[0].electable_specs[0].instance_size,
+ replication_specs[1].region_configs[0].analytics_specs[0].instance_size
+ ]
+ }
+}
+```
+
+While the example initially defines 2 symmetric shards, auto-scaling of `electable_specs` or `analytic_specs` can lead to asymmetric shards due to changes in `instance_size`.
+
+-> **NOTE:** After you upgrade to version 1.23.0 of the provider, you must update the cluster configuration to activate the auto-scaling per shard feature.
+
+-> **NOTE:** When auto-scaling per shard, it is possible that the cluster will transition to having asymmetric shards. This will impact the computed attribute `replication_specs.#.id`, which is not populated when shards are scaled independently. Please make sure to update the 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`. 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).
diff --git a/docs/index.md b/docs/index.md
index 156b21dfd9..7853c904c2 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -221,7 +221,7 @@ We ship binaries but do not prioritize fixes for the following operating system
## Examples from MongoDB and the Community
-We have [example configurations](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.22.0/examples)
+We have [example configurations](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.24.0/examples)
in our GitHub repo that will help both beginner and more advanced users.
Have a good example you've created and want to share?
diff --git a/docs/resources/advanced_cluster.md b/docs/resources/advanced_cluster.md
index d9950b581f..03a065ba21 100644
--- a/docs/resources/advanced_cluster.md
+++ b/docs/resources/advanced_cluster.md
@@ -464,6 +464,8 @@ Include **desired options** within advanced_configuration:
* `transaction_lifetime_limit_seconds` - (Optional) Lifetime, in seconds, of multi-document transactions. Defaults to 60 seconds.
* `change_stream_options_pre_and_post_images_expire_after_seconds` - (Optional) The minimum pre- and post-image retention time in seconds. This option corresponds to the `changeStreamOptions.preAndPostImages.expireAfterSeconds` cluster parameter. Defaults to `-1`(off). This setting controls the retention policy of change stream pre- and post-images. Pre- and post-images are the versions of a document before and after document modification, respectively. `expireAfterSeconds` controls how long MongoDB retains pre- and post-images. When set to -1 (off), MongoDB uses the default retention policy: pre- and post-images are retained until the corresponding change stream events are removed from the oplog. To set the minimum pre- and post-image retention time, specify an integer value greater than zero. Setting this too low could increase the risk of interrupting Realm sync or triggers processing. This parameter is only supported for MongoDB version 6.0 and above.
* `default_max_time_ms` - (Optional) Default time limit in milliseconds for individual read operations to complete. This option corresponds to the [defaultMaxTimeMS(https://www.mongodb.com/docs/upcoming/reference/cluster-parameters/defaultMaxTimeMS/) cluster parameter. This parameter is supported only for MongoDB version 8.0 and above.
+* `tls_cipher_config_mode` - (Optional) The TLS cipher suite configuration mode. Valid values include `CUSTOM` or `DEFAULT`. The `DEFAULT` mode uses the default cipher suites. The `CUSTOM` mode allows you to specify custom cipher suites for both TLS 1.2 and TLS 1.3. To unset, this should be set back to `DEFAULT`.
+* `custom_openssl_cipher_config_tls12` - (Optional) The custom OpenSSL cipher suite list for TLS 1.2. This field is only valid when `tls_cipher_config_mode` is set to `CUSTOM`.
### Tags
@@ -537,7 +539,7 @@ 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.
+* `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` - (Optional) Provide this value if you set a `cluster_type` of SHARDED or GEOSHARDED. Omit this value if you selected a `cluster_type` of REPLICASET. This API resource accepts 1 through 50, inclusive. This parameter defaults to 1. If you specify a `num_shards` value of 1 and a `cluster_type` of SHARDED, Atlas deploys a single-shard [sharded cluster](https://docs.atlas.mongodb.com/reference/glossary/#std-term-sharded-cluster). Don't create a sharded cluster with a single shard for production environments. Single-shard sharded clusters don't provide the same benefits as multi-shard configurations.
If you are upgrading a replica set to a sharded cluster, you cannot increase the number of shards in the same update request. You should wait until after the cluster has completed upgrading to sharded and you have reconnected all application clients to the MongoDB router before adding additional shards. Otherwise, your data might become inconsistent once MongoDB Cloud begins distributing data across shards. To learn more, see [Convert a replica set to a sharded cluster documentation](https://www.mongodb.com/docs/atlas/scale-cluster/#convert-a-replica-set-to-a-sharded-cluster) and [Convert a replica set to a sharded cluster tutorial](https://www.mongodb.com/docs/upcoming/tutorial/convert-replica-set-to-replicated-shard-cluster). **(DEPRECATED)** To learn more, see the [1.18.0 Upgrade Guide](../guides/1.18.0-upgrade-guide.html.markdown).
@@ -549,8 +551,8 @@ If you are upgrading a replica set to a sharded cluster, you cannot increase the
### region_configs
* `analytics_specs` - (Optional) Hardware specifications for [analytics nodes](https://docs.atlas.mongodb.com/reference/faq/deployment/#std-label-analytics-nodes-overview) needed in the region. Analytics nodes handle analytic data such as reporting queries from BI Connector for Atlas. Analytics nodes are read-only and can never become the [primary](https://docs.atlas.mongodb.com/reference/glossary/#std-term-primary). If you don't specify this parameter, no analytics nodes deploy to this region. See [below](#specs)
-* `auto_scaling` - (Optional) Configuration for the Collection of settings that configures auto-scaling information for the cluster. The values for the `auto_scaling` parameter must be the same for all `region_configs` in all `replication_specs`. See [below](#auto_scaling)
-* `analytics_auto_scaling` - (Optional) Configuration for the Collection of settings that configures analytics-auto-scaling information for the cluster. The values for the `analytics_auto_scaling` parameter must be the same for all `region_configs` in all `replication_specs`. See [below](#analytics_auto_scaling)
+* `auto_scaling` - (Optional) Configuration for the collection of settings that configures auto-scaling information for the cluster. The values for the `auto_scaling` attribute must be the same for all `region_configs` of a cluster. See [below](#auto_scaling)
+* `analytics_auto_scaling` - (Optional) Configuration for the Collection of settings that configures analytics-auto-scaling information for the cluster. The values for the `analytics_auto_scaling` attribute must be the same for all `region_configs` of a cluster. See [below](#analytics_auto_scaling)
* `backing_provider_name` - (Optional) Cloud service provider on which you provision the host for a multi-tenant cluster. Use this only when a `provider_name` is `TENANT` and `instance_size` of a specs is `M2` or `M5`.
* `electable_specs` - (Optional) Hardware specifications for electable nodes in the region. Electable nodes can become the [primary](https://docs.atlas.mongodb.com/reference/glossary/#std-term-primary) and can enable local reads. If you do not specify this option, no electable nodes are deployed to the region. See [below](#specs)
* `priority` - (Optional) Election priority of the region. For regions with only read-only nodes, set this value to 0.
@@ -600,16 +602,12 @@ If you are upgrading a replica set to a sharded cluster, you cannot increase the
### auto_scaling
* `disk_gb_enabled` - (Optional) Flag that indicates whether this cluster enables disk auto-scaling. This parameter defaults to false.
- - Set to `true` to enable disk auto-scaling.
- - Set to `false` to disable disk auto-scaling.
-~> **IMPORTANT:** If `disk_gb_enabled` is true, Atlas automatically scales the cluster up or down.
-This will cause the value of `replication_specs.#.region_config.#.(analytics_specs|electable_specs|read_only_specs).disk_size_gb` returned to potentially be different than what is specified in the Terraform config and if you use, and then apply, not noting this, Terraform will scale the cluster disk size back to the original `disk_size_gb` value.
-To prevent disk scaling use a lifecycle customization:
-`lifecycle {
- ignore_changes = [replication_specs.#.region_config.#.electable_specs.disk_size_gb]
-}`
-After adding the `lifecycle` block to explicitly change `replication_specs.#.region_config.#.(analytics_specs|electable_specs|read_only_specs).disk_size_gb` comment out the `lifecycle` block and run `terraform apply`. Please be sure to uncomment the `lifecycle` block once done to prevent any accidental changes.
+* `compute_enabled` - (Optional) Flag that indicates whether instance size auto-scaling is enabled. This parameter defaults to false. If a sharded cluster is making use of the [New Sharding Configuration](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema), auto-scaling of the instance size will be independent for each individual shard. Please reference the [Use Auto-Scaling Per Shard](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema#use-auto-scaling-per-shard) section for more details. On the contrary, if a sharded cluster makes use of deprecated `num_shards` attribute (with values > 1), instance size auto-scaling will be performed uniformly across all shards in the cluster.
+
+~> **IMPORTANT:** If `disk_gb_enabled` or `compute_enabled` is true, Atlas automatically scales the cluster up or down.
+This will cause the value of `replication_specs.#.region_config.#.(electable_specs|read_only_specs).disk_size_gb` or `replication_specs.#.region_config.#.(electable_specs|read_only_specs).instance_size` returned to potentially be different than what is specified in the Terraform config. If you then apply a plan, not noting this, Terraform will scale the cluster back to the original values in the config.
+To prevent unintended changes when enabling autoscaling, use a lifecycle ignore customization as shown in the example below. To explicitly change `disk_size_gb` or `instance_size` values, comment out the `lifecycle` block and run `terraform apply`. Please be sure to uncomment the `lifecycle` block once done to prevent any accidental changes.
```terraform
// Example: ignore disk_size_gb and instance_size changes in a replica set
@@ -617,22 +615,10 @@ lifecycle {
ignore_changes = [
replication_specs[0].region_configs[0].electable_specs[0].disk_size_gb,
replication_specs[0].region_configs[0].electable_specs[0].instance_size,
- replication_specs[0].region_configs[1].electable_specs[0].instance_size,
- replication_specs[0].region_configs[2].electable_specs[0].instance_size,
]
}
```
-* `compute_enabled` - (Optional) Flag that indicates whether instance size auto-scaling is enabled. This parameter defaults to false.
-
-~> **IMPORTANT:** If `compute_enabled` is true, Atlas automatically scales the cluster to the maximum provided and down to the minimum, if provided.
-This will cause the value of `instance_size` returned to potentially be different than what is specified in the Terraform config and if you then apply a plan, not noting this, Terraform will scale the cluster back to the original `instance_size` value.
-To prevent disk scaling, use a lifecycle customization, as in the following example:
-`lifecycle {
- ignore_changes = [instance_size]
-}`
-After adding the `lifecycle` block to explicitly change `instance_size` comment out the `lifecycle` block and run `terraform apply`. Please be sure to uncomment the `lifecycle` block once done to prevent any accidental changes.
-
* `compute_scale_down_enabled` - (Optional) Flag that indicates whether the instance size may scale down. Atlas requires this parameter if `replication_specs.#.region_configs.#.auto_scaling.0.compute_enabled` : true. If you enable this option, specify a value for `replication_specs.#.region_configs.#.auto_scaling.0.compute_min_instance_size`.
* `compute_min_instance_size` - (Optional) Minimum instance size to which your cluster can automatically scale (such as M10). Atlas requires this parameter if `replication_specs.#.region_configs.#.auto_scaling.0.compute_scale_down_enabled` is true.
* `compute_max_instance_size` - (Optional) Maximum instance size to which your cluster can automatically scale (such as M40). Atlas requires this parameter if `replication_specs.#.region_configs.#.auto_scaling.0.compute_enabled` is true.
@@ -640,15 +626,21 @@ After adding the `lifecycle` block to explicitly change `instance_size` comment
### analytics_auto_scaling
* `disk_gb_enabled` - (Optional) Flag that indicates whether this cluster enables disk auto-scaling. This parameter defaults to false.
-* `compute_enabled` - (Optional) Flag that indicates whether instance size auto-scaling is enabled. This parameter defaults to false.
-
-~> **IMPORTANT:** If `compute_enabled` is true, then Atlas will automatically scale up to the maximum provided and down to the minimum, if provided.
-This will cause the value of `instance_size` returned to potential be different than what is specified in the Terraform config and if you then apply a plan, not noting this, Terraform will scale the cluster back down to the original `instance_size` value.
-To prevent compute scaling, use a lifecycle customization, as in the following example:
-`lifecycle {
- ignore_changes = [instance_size]
-}`
-After adding the `lifecycle` block to explicitly change `instance_size` comment out the `lifecycle` block and run `terraform apply`. Please be sure to uncomment the `lifecycle` block once done to prevent any accidental changes.
+* `compute_enabled` - (Optional) Flag that indicates whether analytics instance size auto-scaling is enabled. This parameter defaults to false. If a sharded cluster is making use of the [New Sharding Configuration](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema), auto-scaling of analytics instance size will be independent for each individual shard. Please reference the [Use Auto-Scaling Per Shard](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema#use-auto-scaling-per-shard) section for more details. On the contrary, if a sharded cluster makes use of deprecated `num_shards` attribute (with values > 1), analytics instance size auto-scaling will be performed uniformily across all shards in the cluster.
+
+~> **IMPORTANT:** If `disk_gb_enabled` or `compute_enabled` is true, Atlas automatically scales the cluster up or down.
+This will cause the value of `replication_specs.#.region_config.#.analytics_specs.0.disk_size_gb` or `replication_specs.#.region_config.#.analytics_specs.0.instance_size` returned to potentially be different than what is specified in the Terraform config. If you then apply a plan, not noting this, Terraform will scale the cluster back to the original values in the config.
+To prevent unintended changes when enabling autoscaling, use a lifecycle ignore customization as shown in the example below. To explicitly change `disk_size_gb` or `instance_size` values, comment out the `lifecycle` block and run `terraform apply`. Please be sure to uncomment the `lifecycle` block once done to prevent any accidental changes.
+
+```terraform
+// Example: ignore disk_size_gb and instance_size changes in a replica set
+lifecycle {
+ ignore_changes = [
+ replication_specs[0].region_configs[0].analytics_specs[0].disk_size_gb,
+ replication_specs[0].region_configs[0].analytics_specs[0].instance_size,
+ ]
+}
+```
* `compute_scale_down_enabled` - (Optional) Flag that indicates whether the instance size may scale down. Atlas requires this parameter if `replication_specs.#.region_configs.#.analytics_auto_scaling.0.compute_enabled` : true. If you enable this option, specify a value for `replication_specs.#.region_configs.#.analytics_auto_scaling.0.compute_min_instance_size`.
* `compute_min_instance_size` - (Optional) Minimum instance size to which your cluster can automatically scale (such as M10). Atlas requires this parameter if `replication_specs.#.region_configs.#.analytics_auto_scaling.0.compute_scale_down_enabled` is true.
diff --git a/docs/resources/cluster.md b/docs/resources/cluster.md
index 801792475d..e2ec8f8104 100644
--- a/docs/resources/cluster.md
+++ b/docs/resources/cluster.md
@@ -486,6 +486,8 @@ Include **desired options** within advanced_configuration:
* `sample_refresh_interval_bi_connector` - (Optional) Interval in seconds at which the mongosqld process re-samples data to create its relational schema. The default value is 300. The specified value must be a positive integer. Available only for Atlas deployments in which BI Connector for Atlas is enabled.
* `transaction_lifetime_limit_seconds` - (Optional) Lifetime, in seconds, of multi-document transactions. Defaults to 60 seconds.
* `change_stream_options_pre_and_post_images_expire_after_seconds` - (Optional) The minimum pre- and post-image retention time in seconds. This option corresponds to the `changeStreamOptions.preAndPostImages.expireAfterSeconds` cluster parameter. Defaults to `-1`(off). This setting controls the retention policy of change stream pre- and post-images. Pre- and post-images are the versions of a document before and after document modification, respectively.`expireAfterSeconds` controls how long MongoDB retains pre- and post-images. When set to -1 (off), MongoDB uses the default retention policy: pre- and post-images are retained until the corresponding change stream events are removed from the oplog. To set the minimum pre- and post-image retention time, specify an integer value greater than zero. Setting this too low could increase the risk of interrupting Realm sync or triggers processing. This parameter is only supported for MongoDB version 6.0 and above.
+* `tls_cipher_config_mode` - (Optional) The TLS cipher suite configuration mode. Valid values include `CUSTOM` or `DEFAULT`. The `DEFAULT` mode uses the default cipher suites. The `CUSTOM` mode allows you to specify custom cipher suites for both TLS 1.2 and TLS 1.3. To unset, this should be set back to `DEFAULT`.
+* `custom_openssl_cipher_config_tls12` - (Optional) The custom OpenSSL cipher suite list for TLS 1.2. This field is only valid when `tls_cipher_config_mode` is set to `CUSTOM`.
### Tags
diff --git a/docs/resources/stream_connection.md b/docs/resources/stream_connection.md
index 9fd9d50454..b97b4de655 100644
--- a/docs/resources/stream_connection.md
+++ b/docs/resources/stream_connection.md
@@ -82,6 +82,7 @@ If `type` is of value `Kafka` the following additional arguments are defined:
* `bootstrap_servers` - Comma separated list of server addresses.
* `config` - A map of Kafka key-value pairs for optional configuration. This is a flat object, and keys can have '.' characters.
* `security` - Properties for the secure transport connection to Kafka. For SSL, this can include the trusted certificate to use. See [security](#security).
+* `networking` - Networking Access Type can either be `PUBLIC` (default) or `VPC`. See [networking](#networking).
### Authentication
@@ -99,6 +100,13 @@ If `type` is of value `Kafka` the following additional arguments are defined:
* `role` - The name of the role to use. Value can be `atlasAdmin`, `readWriteAnyDatabase`, or `readAnyDatabase` if `type` is set to `BUILT_IN`, or the name of a user-defined role if `type` is set to `CUSTOM`.
* `type` - Type of the DB role. Can be either BUILT_IN or CUSTOM.
+### Networking
+* `access` - Information about the networking access. See [access](#access).
+
+### Access
+* `name` - Id of the vpc peer when the type is `VPC`.
+* `type` - Selected networking type. Either `PUBLIC` or `VPC`. Defaults to `PUBLIC`.
+
## Import
You can import a stream connection resource using the instance name, project ID, and connection name. The format must be `INSTANCE_NAME-PROJECT_ID-CONNECTION_NAME`. For example:
diff --git a/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/README.md b/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/README.md
new file mode 100644
index 0000000000..8ea9c7bbe8
--- /dev/null
+++ b/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/README.md
@@ -0,0 +1,63 @@
+# MongoDB Atlas Provider -- Sharded Cluster with Independent Shard Auto-scaling
+
+This example creates a Sharded Cluster with 2 shards defining electable and analytics nodes. Compute auto-scaling is enabled for both `electable_specs` and `analytics_specs`, while also leveraging the [New Sharding Configuration](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema) by defining each shard with its individual `replication_specs`. This enables scaling of each shard to be independent. Please reference the [Use Auto-Scaling Per Shard](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema#use-auto-scaling-per-shard) section for more details.
+
+
+## Dependencies
+
+* Terraform MongoDB Atlas Provider v1.23.0
+* A MongoDB Atlas account
+
+```
+Terraform >= 0.13
++ provider registry.terraform.io/terraform-providers/mongodbatlas v1.23.0
+```
+
+
+## Usage
+**1\. If you haven't already, set up your MongoDB Atlas credentials.**
+
+This can be done using environment variables:
+
+```bash
+export MONGODB_ATLAS_PUBLIC_KEY="xxxx"
+export MONGODB_ATLAS_PRIVATE_KEY="xxxx"
+```
+
+... or follow as in the `variables.tf` file and create **terraform.tfvars** file with all the variable values, ex:
+```
+public_key = ""
+private_key = ""
+atlas_org_id = ""
+```
+
+Alternatively, you can use [AWS Secrets Manager](https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/website/docs/index.html.markdown#aws-secrets-manager).
+
+**2\. Review the Terraform plan.**
+
+Execute the below command and ensure you are happy with the plan.
+
+``` bash
+$ terraform plan
+```
+This project currently supports the below deployments:
+
+- An Atlas Project
+- A Sharded Cluster with independent shards with varying cluster tiers
+
+**3\. Apply your changes.**
+
+Now execute the plan to provision the Atlas Project and Cluster resources.
+
+``` bash
+$ terraform apply
+```
+
+**4\. Destroy the resources.**
+
+Once you are finished your testing, ensure you destroy the resources to avoid unnecessary Atlas charges.
+
+``` bash
+$ terraform destroy
+```
+
diff --git a/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/main.tf b/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/main.tf
new file mode 100644
index 0000000000..a628d19e4c
--- /dev/null
+++ b/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/main.tf
@@ -0,0 +1,71 @@
+provider "mongodbatlas" {
+ public_key = var.public_key
+ private_key = var.private_key
+}
+
+resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = mongodbatlas_project.project.id
+ name = "AutoScalingCluster"
+ cluster_type = "SHARDED"
+ replication_specs { # first shard
+ region_configs {
+ auto_scaling {
+ compute_enabled = true
+ compute_max_instance_size = "M60"
+ }
+ analytics_auto_scaling {
+ compute_enabled = true
+ compute_max_instance_size = "M60"
+ }
+ electable_specs {
+ instance_size = "M40"
+ node_count = 3
+ }
+ analytics_specs {
+ instance_size = "M40"
+ node_count = 1
+ }
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }
+ zone_name = "Zone 1"
+ }
+ replication_specs { # second shard
+ region_configs {
+ auto_scaling {
+ compute_enabled = true
+ compute_max_instance_size = "M60"
+ }
+ analytics_auto_scaling {
+ compute_enabled = true
+ compute_max_instance_size = "M60"
+ }
+ electable_specs {
+ instance_size = "M40"
+ node_count = 3
+ }
+ analytics_specs {
+ instance_size = "M40"
+ node_count = 1
+ }
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }
+ zone_name = "Zone 1"
+ }
+ lifecycle { # avoids non-empty plans as instance size start to scale from initial values
+ ignore_changes = [
+ replication_specs[0].region_configs[0].electable_specs[0].instance_size,
+ replication_specs[0].region_configs[0].analytics_specs[0].instance_size,
+ replication_specs[1].region_configs[0].electable_specs[0].instance_size,
+ replication_specs[1].region_configs[0].analytics_specs[0].instance_size
+ ]
+ }
+}
+
+resource "mongodbatlas_project" "project" {
+ name = "AutoScalingPerShardCluster"
+ org_id = var.atlas_org_id
+}
diff --git a/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/variables.tf b/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/variables.tf
new file mode 100644
index 0000000000..d34c0ba2be
--- /dev/null
+++ b/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/variables.tf
@@ -0,0 +1,12 @@
+variable "atlas_org_id" {
+ description = "Atlas organization id"
+ type = string
+}
+variable "public_key" {
+ description = "Public API key to authenticate to Atlas"
+ type = string
+}
+variable "private_key" {
+ description = "Private API key to authenticate to Atlas"
+ type = string
+}
diff --git a/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/versions.tf b/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/versions.tf
new file mode 100644
index 0000000000..f4f37e1912
--- /dev/null
+++ b/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard/versions.tf
@@ -0,0 +1,9 @@
+terraform {
+ required_providers {
+ mongodbatlas = {
+ source = "mongodb/mongodbatlas"
+ version = "~> 1.22"
+ }
+ }
+ required_version = ">= 1.0"
+}
diff --git a/examples/mongodbatlas_stream_connection/main.tf b/examples/mongodbatlas_stream_connection/main.tf
index 0dc56c6cad..31e4ebdfdf 100644
--- a/examples/mongodbatlas_stream_connection/main.tf
+++ b/examples/mongodbatlas_stream_connection/main.tf
@@ -36,6 +36,11 @@ resource "mongodbatlas_stream_connection" "example-kafka-plaintext" {
security = {
protocol = "PLAINTEXT"
}
+ networking = {
+ access = {
+ type = "PUBLIC"
+ }
+ }
}
resource "mongodbatlas_stream_connection" "example-kafka-ssl" {
diff --git a/go.mod b/go.mod
index 30946abf26..a4fb5792b2 100644
--- a/go.mod
+++ b/go.mod
@@ -9,10 +9,12 @@ require (
github.com/hashicorp/go-changelog v0.0.0-20240318095659-4d68c58a6e7f
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-version v1.7.0
+ github.com/hashicorp/hc-install v0.9.0
github.com/hashicorp/hcl/v2 v2.23.0
+ github.com/hashicorp/terraform-exec v0.21.0
github.com/hashicorp/terraform-plugin-framework v1.13.0
github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1
- github.com/hashicorp/terraform-plugin-framework-validators v0.15.0
+ github.com/hashicorp/terraform-plugin-framework-validators v0.16.0
github.com/hashicorp/terraform-plugin-go v0.25.0
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-mux v0.17.0
@@ -22,7 +24,7 @@ require (
github.com/huandu/xstrings v1.5.0
github.com/jarcoal/httpmock v1.3.1
github.com/mongodb-forks/digest v1.1.0
- github.com/mongodb/atlas-sdk-go v1.0.1-0.20241209122044-6b70e4ddd10f
+ github.com/mongodb/atlas-sdk-go v1.0.1-0.20241216083848-a48e58d34867
github.com/pb33f/libopenapi v0.18.7
github.com/sebdah/goldie/v2 v2.5.5
github.com/spf13/cast v1.6.0
@@ -88,10 +90,8 @@ require (
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
- github.com/hashicorp/hc-install v0.9.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
- github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.23.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
diff --git a/go.sum b/go.sum
index 44f106e1f4..65738e004c 100644
--- a/go.sum
+++ b/go.sum
@@ -532,8 +532,8 @@ github.com/hashicorp/terraform-plugin-framework v1.13.0 h1:8OTG4+oZUfKgnfTdPTJwZ
github.com/hashicorp/terraform-plugin-framework v1.13.0/go.mod h1:j64rwMGpgM3NYXTKuxrCnyubQb/4VKldEKlcG8cvmjU=
github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1 h1:gm5b1kHgFFhaKFhm4h2TgvMUlNzFAtUqlcOWnWPm+9E=
github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1/go.mod h1:MsjL1sQ9L7wGwzJ5RjcI6FzEMdyoBnw+XK8ZnOvQOLY=
-github.com/hashicorp/terraform-plugin-framework-validators v0.15.0 h1:RXMmu7JgpFjnI1a5QjMCBb11usrW2OtAG+iOTIj5c9Y=
-github.com/hashicorp/terraform-plugin-framework-validators v0.15.0/go.mod h1:Bh89/hNmqsEWug4/XWKYBwtnw3tbz5BAy1L1OgvbIaY=
+github.com/hashicorp/terraform-plugin-framework-validators v0.16.0 h1:O9QqGoYDzQT7lwTXUsZEtgabeWW96zUBh47Smn2lkFA=
+github.com/hashicorp/terraform-plugin-framework-validators v0.16.0/go.mod h1:Bh89/hNmqsEWug4/XWKYBwtnw3tbz5BAy1L1OgvbIaY=
github.com/hashicorp/terraform-plugin-go v0.25.0 h1:oi13cx7xXA6QciMcpcFi/rwA974rdTxjqEhXJjbAyks=
github.com/hashicorp/terraform-plugin-go v0.25.0/go.mod h1:+SYagMYadJP86Kvn+TGeV+ofr/R3g4/If0O5sO96MVw=
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
@@ -655,8 +655,8 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx
github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM=
github.com/mongodb-forks/digest v1.1.0 h1:7eUdsR1BtqLv0mdNm4OXs6ddWvR4X2/OsLwdKksrOoc=
github.com/mongodb-forks/digest v1.1.0/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg=
-github.com/mongodb/atlas-sdk-go v1.0.1-0.20241209122044-6b70e4ddd10f h1:hgZvdTynTl1ep9xWH+1K697K1wsjp6jgqYgMoz3ynxc=
-github.com/mongodb/atlas-sdk-go v1.0.1-0.20241209122044-6b70e4ddd10f/go.mod h1:WzU2E+/RcJGnhjdnBzXpbGBqq/XbDhFDEaru0UNmbxc=
+github.com/mongodb/atlas-sdk-go v1.0.1-0.20241216083848-a48e58d34867 h1:155Szon4Y00373X0kTWMMWM4ku6Tv5Ss0SWeF7RJKs8=
+github.com/mongodb/atlas-sdk-go v1.0.1-0.20241216083848-a48e58d34867/go.mod h1:WzU2E+/RcJGnhjdnBzXpbGBqq/XbDhFDEaru0UNmbxc=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
diff --git a/internal/common/conversion/error_framework.go b/internal/common/conversion/error_framework.go
index 5586456cdf..dde00c5cbf 100644
--- a/internal/common/conversion/error_framework.go
+++ b/internal/common/conversion/error_framework.go
@@ -4,6 +4,8 @@ import (
"encoding/json"
"github.com/hashicorp/terraform-plugin-framework/diag"
+
+ legacyDiag "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
)
type ErrBody interface {
@@ -32,3 +34,13 @@ func AddJSONBodyErrorToDiagnostics(msgPrefix string, err error, diags *diag.Diag
errorJSON := string(errorBytes)
diags.AddError(msgPrefix, errorJSON)
}
+
+func AddLegacyDiags(diags *diag.Diagnostics, legacyDiags legacyDiag.Diagnostics) {
+ for _, diag := range legacyDiags {
+ if diag.Severity == legacyDiag.Error {
+ diags.AddError(diag.Summary, diag.Detail)
+ } else {
+ diags.AddWarning(diag.Summary, diag.Detail)
+ }
+ }
+}
diff --git a/internal/common/conversion/flatten_expand.go b/internal/common/conversion/flatten_expand.go
index 16c1d676f1..2f407a8c97 100644
--- a/internal/common/conversion/flatten_expand.go
+++ b/internal/common/conversion/flatten_expand.go
@@ -3,7 +3,6 @@ package conversion
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
- admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
"go.mongodb.org/atlas-sdk/v20241113003/admin"
)
@@ -29,19 +28,6 @@ func FlattenTags(tags []admin.ResourceTag) []map[string]string {
return ret
}
-func ExpandTagsFromSetSchemaV220240805(d *schema.ResourceData) *[]admin20240805.ResourceTag {
- list := d.Get("tags").(*schema.Set)
- ret := make([]admin20240805.ResourceTag, list.Len())
- for i, item := range list.List() {
- tag := item.(map[string]any)
- ret[i] = admin20240805.ResourceTag{
- Key: tag["key"].(string),
- Value: tag["value"].(string),
- }
- }
- return &ret
-}
-
func ExpandTagsFromSetSchema(d *schema.ResourceData) *[]admin.ResourceTag {
list := d.Get("tags").(*schema.Set)
ret := make([]admin.ResourceTag, list.Len())
diff --git a/internal/common/conversion/model_generation.go b/internal/common/conversion/model_generation.go
new file mode 100644
index 0000000000..072c95eca6
--- /dev/null
+++ b/internal/common/conversion/model_generation.go
@@ -0,0 +1,42 @@
+package conversion
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// CopyModel creates a new struct with the same values as the source struct. Fields in destination struct that are not in source are left with zero value.
+// It panics if there are some structural problems so it should only happen during development.
+func CopyModel[T any](src any) *T {
+ dest := new(T)
+ valSrc := reflect.ValueOf(src)
+ valDest := reflect.ValueOf(dest)
+ if valSrc.Kind() != reflect.Ptr || valDest.Kind() != reflect.Ptr {
+ panic("params must be pointers")
+ }
+ valSrc = valSrc.Elem()
+ valDest = valDest.Elem()
+ if valSrc.Kind() != reflect.Struct || valDest.Kind() != reflect.Struct {
+ panic("params must be pointers to structs")
+ }
+ typeSrc := valSrc.Type()
+ typeDest := valDest.Type()
+ for i := range typeDest.NumField() {
+ fieldDest := typeDest.Field(i)
+ name := fieldDest.Name
+ {
+ fieldSrc, found := typeSrc.FieldByName(name)
+ if !found {
+ continue
+ }
+ if fieldDest.Type != fieldSrc.Type {
+ panic(fmt.Sprintf("field has different type: %s", name))
+ }
+ }
+ if !valDest.Field(i).CanSet() {
+ panic(fmt.Sprintf("field can't be set, probably unexported: %s", name))
+ }
+ valDest.Field(i).Set(valSrc.FieldByName(name))
+ }
+ return dest
+}
diff --git a/internal/common/conversion/model_generation_test.go b/internal/common/conversion/model_generation_test.go
new file mode 100644
index 0000000000..0c175726af
--- /dev/null
+++ b/internal/common/conversion/model_generation_test.go
@@ -0,0 +1,90 @@
+package conversion_test
+
+import (
+ "testing"
+
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
+ "github.com/stretchr/testify/assert"
+)
+
+func TestCopyModel(t *testing.T) {
+ type destType struct {
+ AttrStr string
+ attrUnexported string
+ AttrInt int
+ }
+
+ testCases := map[string]struct {
+ input any
+ expected any
+ expectedPanicStr string
+ }{
+ "basic": {
+ input: &struct {
+ AttrStr string
+ AttrInt int
+ }{
+ AttrStr: "val",
+ AttrInt: 1,
+ },
+ expected: &destType{
+ AttrStr: "val",
+ AttrInt: 1,
+ attrUnexported: "",
+ },
+ },
+ "missing field": {
+ input: &struct {
+ AttrStr string
+ }{
+ AttrStr: "val",
+ },
+ expected: &destType{
+ AttrStr: "val",
+ },
+ },
+ "extra field": {
+ input: &struct {
+ AttrStr string
+ AttrExtra string
+ AttrInt int
+ }{
+ AttrStr: "val",
+ AttrExtra: "extra",
+ AttrInt: 1,
+ },
+ expected: &destType{
+ AttrStr: "val",
+ AttrInt: 1,
+ },
+ },
+ "different type": {
+ input: &struct {
+ AttrStr bool
+ }{
+ AttrStr: true,
+ },
+ expectedPanicStr: "field has different type: AttrStr",
+ },
+ "unexported": {
+ input: &struct {
+ attrUnexported string
+ }{
+ attrUnexported: "val",
+ },
+ expectedPanicStr: "field can't be set, probably unexported: attrUnexported",
+ },
+ }
+ for name, tc := range testCases {
+ t.Run(name, func(t *testing.T) {
+ if tc.expectedPanicStr == "" {
+ assert.Equal(t, tc.expected, conversion.CopyModel[destType](tc.input))
+ } else {
+ assert.Nil(t, tc.expected)
+ assert.PanicsWithValue(t, tc.expectedPanicStr, func() {
+ conversion.CopyModel[destType](tc.input)
+ })
+ }
+ })
+ }
+}
diff --git a/internal/common/conversion/schema_generation.go b/internal/common/conversion/schema_generation.go
index b9ece6fe51..cc3a73ff5f 100644
--- a/internal/common/conversion/schema_generation.go
+++ b/internal/common/conversion/schema_generation.go
@@ -1,6 +1,7 @@
package conversion
import (
+ "maps"
"reflect"
"slices"
@@ -22,20 +23,17 @@ type PluralDataSourceSchemaRequest struct {
}
func DataSourceSchemaFromResource(rs schema.Schema, req *DataSourceSchemaRequest) dsschema.Schema {
- blocks := convertBlocks(rs.Blocks, req.RequiredFields)
attrs := convertAttrs(rs.Attributes, req.RequiredFields)
+ maps.Copy(attrs, convertBlocksToAttrs(rs.Blocks, req.RequiredFields))
overrideFields(attrs, req.OverridenFields)
- ds := dsschema.Schema{Attributes: attrs, Blocks: blocks}
+ ds := dsschema.Schema{Attributes: attrs}
UpdateSchemaDescription(&ds)
return ds
}
func PluralDataSourceSchemaFromResource(rs schema.Schema, req *PluralDataSourceSchemaRequest) dsschema.Schema {
- blocks := convertBlocks(rs.Blocks, nil)
- if len(blocks) > 0 {
- panic("blocks not supported yet in auto-generated plural data source schema as they can't go in ListNestedAttribute")
- }
attrs := convertAttrs(rs.Attributes, nil)
+ maps.Copy(attrs, convertBlocksToAttrs(rs.Blocks, nil))
overrideFields(attrs, req.OverridenFields)
rootAttrs := convertAttrs(rs.Attributes, req.RequiredFields)
for name := range rootAttrs {
@@ -76,12 +74,14 @@ var convertMappings = map[string]reflect.Type{
"Int64Attribute": reflect.TypeOf(dsschema.Int64Attribute{}),
"Float64Attribute": reflect.TypeOf(dsschema.Float64Attribute{}),
"MapAttribute": reflect.TypeOf(dsschema.MapAttribute{}),
+ "ListAttribute": reflect.TypeOf(dsschema.ListAttribute{}),
+ "SetAttribute": reflect.TypeOf(dsschema.SetAttribute{}),
"SingleNestedAttribute": reflect.TypeOf(dsschema.SingleNestedAttribute{}),
"ListNestedAttribute": reflect.TypeOf(dsschema.ListNestedAttribute{}),
"SetNestedAttribute": reflect.TypeOf(dsschema.SetNestedAttribute{}),
- "ListAttribute": reflect.TypeOf(dsschema.ListAttribute{}),
- "SetNestedBlock": reflect.TypeOf(dsschema.SetNestedBlock{}),
- "SetAttribute": reflect.TypeOf(dsschema.SetAttribute{}),
+ "SingleNestedBlock": reflect.TypeOf(dsschema.SingleNestedAttribute{}),
+ "ListNestedBlock": reflect.TypeOf(dsschema.ListNestedAttribute{}),
+ "SetNestedBlock": reflect.TypeOf(dsschema.SetNestedAttribute{}),
}
var convertNestedMappings = map[string]reflect.Type{
@@ -91,9 +91,6 @@ var convertNestedMappings = map[string]reflect.Type{
func convertAttrs(rsAttrs map[string]schema.Attribute, requiredFields []string) map[string]dsschema.Attribute {
const ignoreField = "timeouts"
- if rsAttrs == nil {
- return nil
- }
dsAttrs := make(map[string]dsschema.Attribute, len(rsAttrs))
for name, attr := range rsAttrs {
if name == ignoreField {
@@ -104,15 +101,12 @@ func convertAttrs(rsAttrs map[string]schema.Attribute, requiredFields []string)
return dsAttrs
}
-func convertBlocks(rsBlocks map[string]schema.Block, requiredFields []string) map[string]dsschema.Block {
- if rsBlocks == nil {
- return nil
- }
- dsBlocks := make(map[string]dsschema.Block, len(rsBlocks))
+func convertBlocksToAttrs(rsBlocks map[string]schema.Block, requiredFields []string) map[string]dsschema.Attribute {
+ dsAttrs := make(map[string]dsschema.Attribute, len(rsBlocks))
for name, block := range rsBlocks {
- dsBlocks[name] = convertElement(name, block, requiredFields).(dsschema.Block)
+ dsAttrs[name] = convertElement(name, block, requiredFields).(dsschema.Attribute)
}
- return dsBlocks
+ return dsAttrs
}
func convertElement(name string, element any, requiredFields []string) any {
@@ -131,8 +125,8 @@ func convertElement(name string, element any, requiredFields []string) any {
vDest := reflect.New(tDest).Elem()
vDest.FieldByName("MarkdownDescription").Set(vSrc.FieldByName("MarkdownDescription"))
vDest.FieldByName("DeprecationMessage").Set(vSrc.FieldByName("DeprecationMessage"))
- if fSensitive := vDest.FieldByName("Sensitive"); fSensitive.CanSet() {
- fSensitive.Set(vSrc.FieldByName("Sensitive"))
+ if fSensitive, sSensitive := vDest.FieldByName("Sensitive"), vSrc.FieldByName("Sensitive"); fSensitive.CanSet() && sSensitive.IsValid() {
+ fSensitive.Set(sSensitive)
}
if fComputed := vDest.FieldByName("Computed"); fComputed.CanSet() {
fComputed.SetBool(computed)
@@ -143,23 +137,35 @@ func convertElement(name string, element any, requiredFields []string) any {
if fElementType := vDest.FieldByName("ElementType"); fElementType.CanSet() {
fElementType.Set(vSrc.FieldByName("ElementType"))
}
- if fAttributes := vDest.FieldByName("Attributes"); fAttributes.CanSet() {
- attrsSrc := vSrc.FieldByName("Attributes").Interface().(map[string]schema.Attribute)
- fAttributes.Set(reflect.ValueOf(convertAttrs(attrsSrc, nil)))
- }
+ fillNestedAttrs(vDest, vSrc)
+
if fNested := vDest.FieldByName("NestedObject"); fNested.CanSet() {
tNested := convertNestedMappings[fNested.Type().Name()]
if tNested == nil {
panic("nested type not support yet, add it to convertNestedMappings: " + fNested.Type().Name())
}
- attrsSrc := vSrc.FieldByName("NestedObject").FieldByName("Attributes").Interface().(map[string]schema.Attribute)
vNested := reflect.New(tNested).Elem()
- vNested.FieldByName("Attributes").Set(reflect.ValueOf(convertAttrs(attrsSrc, nil)))
+ fillNestedAttrs(vNested, vSrc.FieldByName("NestedObject"))
fNested.Set(vNested)
}
return vDest.Interface()
}
+func fillNestedAttrs(vDest, vSrc reflect.Value) {
+ fAttributes := vDest.FieldByName("Attributes")
+ if !fAttributes.CanSet() {
+ return
+ }
+ attrsSrc := vSrc.FieldByName("Attributes").Interface().(map[string]schema.Attribute)
+ attrSrcDS := convertAttrs(attrsSrc, nil)
+ if fBlocks := vSrc.FieldByName("Blocks"); fBlocks.IsValid() {
+ blocksSrc := fBlocks.Interface().(map[string]schema.Block)
+ blockSrcDS := convertBlocksToAttrs(blocksSrc, nil)
+ maps.Copy(attrSrcDS, blockSrcDS)
+ }
+ fAttributes.Set(reflect.ValueOf(attrSrcDS))
+}
+
func overrideFields(attrs, overridenFields map[string]dsschema.Attribute) {
for name, attr := range overridenFields {
if attr == nil {
diff --git a/internal/common/conversion/schema_generation_test.go b/internal/common/conversion/schema_generation_test.go
index 5fd9c043e2..6d08c018c0 100644
--- a/internal/common/conversion/schema_generation_test.go
+++ b/internal/common/conversion/schema_generation_test.go
@@ -66,19 +66,19 @@ func TestDataSourceSchemaFromResource(t *testing.T) {
ElementType: types.StringType,
MarkdownDescription: "desc setAttr",
},
- "nestSingle": schema.SingleNestedAttribute{
+ "singleNestedAttribute": schema.SingleNestedAttribute{
Computed: true,
- MarkdownDescription: "desc nestSingle",
+ MarkdownDescription: "desc singleNestedAttribute",
Attributes: map[string]schema.Attribute{
- "nestedSingleAttr": schema.StringAttribute{
+ "singleNestedAttributeAttr": schema.StringAttribute{
Computed: true,
- MarkdownDescription: "desc nestedSingleAttr",
+ MarkdownDescription: "desc singleNestedAttributeAttr",
},
},
},
- "nestList": schema.ListNestedAttribute{
+ "listNestedAttribute": schema.ListNestedAttribute{
Computed: true,
- MarkdownDescription: "desc nestList",
+ MarkdownDescription: "desc listNestedAttribute",
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"nestedAttr": schema.StringAttribute{
@@ -92,9 +92,9 @@ func TestDataSourceSchemaFromResource(t *testing.T) {
},
},
},
- "nestSet": schema.SetNestedAttribute{
+ "setNestedAttribute": schema.SetNestedAttribute{
Computed: true,
- MarkdownDescription: "desc nestSet",
+ MarkdownDescription: "desc setNestedAttribute",
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"nestedAttr": schema.StringAttribute{
@@ -110,18 +110,6 @@ func TestDataSourceSchemaFromResource(t *testing.T) {
Delete: true,
}),
},
- Blocks: map[string]schema.Block{
- "nestBlock": schema.SetNestedBlock{
- NestedObject: schema.NestedBlockObject{
- Attributes: map[string]schema.Attribute{
- "nestBlockAttr": schema.StringAttribute{
- Computed: true,
- MarkdownDescription: "desc nestBlockAttr",
- },
- },
- },
- },
- },
}
expected := dsschema.Schema{
@@ -180,22 +168,22 @@ func TestDataSourceSchemaFromResource(t *testing.T) {
MarkdownDescription: "desc setAttr",
Description: "desc setAttr",
},
- "nestSingle": dsschema.SingleNestedAttribute{
+ "singleNestedAttribute": dsschema.SingleNestedAttribute{
Computed: true,
- MarkdownDescription: "desc nestSingle",
- Description: "desc nestSingle",
+ MarkdownDescription: "desc singleNestedAttribute",
+ Description: "desc singleNestedAttribute",
Attributes: map[string]dsschema.Attribute{
- "nestedSingleAttr": dsschema.StringAttribute{
+ "singleNestedAttributeAttr": dsschema.StringAttribute{
Computed: true,
- MarkdownDescription: "desc nestedSingleAttr",
- Description: "desc nestedSingleAttr",
+ MarkdownDescription: "desc singleNestedAttributeAttr",
+ Description: "desc singleNestedAttributeAttr",
},
},
},
- "nestList": dsschema.ListNestedAttribute{
+ "listNestedAttribute": dsschema.ListNestedAttribute{
Computed: true,
- MarkdownDescription: "desc nestList",
- Description: "desc nestList",
+ MarkdownDescription: "desc listNestedAttribute",
+ Description: "desc listNestedAttribute",
NestedObject: dsschema.NestedAttributeObject{
Attributes: map[string]dsschema.Attribute{
"nestedAttr": dsschema.StringAttribute{
@@ -211,10 +199,10 @@ func TestDataSourceSchemaFromResource(t *testing.T) {
},
},
},
- "nestSet": dsschema.SetNestedAttribute{
+ "setNestedAttribute": dsschema.SetNestedAttribute{
Computed: true,
- MarkdownDescription: "desc nestSet",
- Description: "desc nestSet",
+ MarkdownDescription: "desc setNestedAttribute",
+ Description: "desc setNestedAttribute",
NestedObject: dsschema.NestedAttributeObject{
Attributes: map[string]dsschema.Attribute{
"nestedAttr": dsschema.StringAttribute{
@@ -234,19 +222,6 @@ func TestDataSourceSchemaFromResource(t *testing.T) {
},
},
},
- Blocks: map[string]dsschema.Block{
- "nestBlock": dsschema.SetNestedBlock{
- NestedObject: dsschema.NestedBlockObject{
- Attributes: map[string]dsschema.Attribute{
- "nestBlockAttr": dsschema.StringAttribute{
- Computed: true,
- MarkdownDescription: "desc nestBlockAttr",
- Description: "desc nestBlockAttr",
- },
- },
- },
- },
- },
}
ds := conversion.DataSourceSchemaFromResource(s, &conversion.DataSourceSchemaRequest{
@@ -265,6 +240,191 @@ func TestDataSourceSchemaFromResource(t *testing.T) {
assert.Equal(t, expected, ds)
}
+func TestDataSourceSchemaFromResource_blocksToAttrs(t *testing.T) {
+ s := schema.Schema{
+ Attributes: map[string]schema.Attribute{
+ "requiredAttrString": schema.StringAttribute{
+ Required: true,
+ MarkdownDescription: "desc requiredAttrString",
+ },
+ "attrString": schema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "desc attrString",
+ },
+ },
+ Blocks: map[string]schema.Block{
+ "setNestedBlock": schema.SetNestedBlock{
+ MarkdownDescription: "desc setNestedBlock",
+ NestedObject: schema.NestedBlockObject{
+ Attributes: map[string]schema.Attribute{
+ "setNestedBlockAttr": schema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "desc setNestedBlockAttr",
+ },
+ },
+ Blocks: map[string]schema.Block{
+ "bb 1": schema.SingleNestedBlock{
+ MarkdownDescription: "desc bb 1",
+ Attributes: map[string]schema.Attribute{
+ "bb attr 1": schema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "desc bb attr 1",
+ },
+ },
+ },
+ },
+ },
+ },
+ "listNestedBlock": schema.ListNestedBlock{
+ MarkdownDescription: "desc listNestedBlock",
+ NestedObject: schema.NestedBlockObject{
+ Attributes: map[string]schema.Attribute{
+ "listNestedBlockAttr": schema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "desc listNestedBlockAttr",
+ },
+ },
+ Blocks: map[string]schema.Block{
+ "bb 2": schema.ListNestedBlock{
+ MarkdownDescription: "desc bb 2",
+ NestedObject: schema.NestedBlockObject{
+ Attributes: map[string]schema.Attribute{
+ "bb attr 2": schema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "desc bb attr 2",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "singleNestedBlock": schema.SingleNestedBlock{
+ MarkdownDescription: "desc singleNestedBlock",
+ Attributes: map[string]schema.Attribute{
+ "nestattr": schema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "desc nestattr",
+ },
+ },
+ Blocks: map[string]schema.Block{
+ "bb 3": schema.ListNestedBlock{
+ MarkdownDescription: "desc bb 3",
+ NestedObject: schema.NestedBlockObject{
+ Attributes: map[string]schema.Attribute{
+ "bb attr 3": schema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "desc bb attr 3",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+
+ expected := dsschema.Schema{
+ Attributes: map[string]dsschema.Attribute{
+ "requiredAttrString": dsschema.StringAttribute{
+ Required: true,
+ MarkdownDescription: "desc requiredAttrString",
+ Description: "desc requiredAttrString",
+ },
+ "attrString": dsschema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "desc attrString",
+ Description: "desc attrString",
+ },
+ "setNestedBlock": dsschema.SetNestedAttribute{
+ Computed: true,
+ Description: "desc setNestedBlock",
+ MarkdownDescription: "desc setNestedBlock",
+ NestedObject: dsschema.NestedAttributeObject{
+ Attributes: map[string]dsschema.Attribute{
+ "setNestedBlockAttr": dsschema.StringAttribute{
+ Computed: true,
+ Description: "desc setNestedBlockAttr",
+ MarkdownDescription: "desc setNestedBlockAttr",
+ },
+ "bb 1": dsschema.SingleNestedAttribute{
+ Computed: true,
+ Description: "desc bb 1",
+ MarkdownDescription: "desc bb 1",
+ Attributes: map[string]dsschema.Attribute{
+ "bb attr 1": dsschema.StringAttribute{
+ Computed: true,
+ Description: "desc bb attr 1",
+ MarkdownDescription: "desc bb attr 1",
+ },
+ },
+ },
+ },
+ },
+ },
+ "listNestedBlock": dsschema.ListNestedAttribute{
+ Computed: true,
+ Description: "desc listNestedBlock",
+ MarkdownDescription: "desc listNestedBlock",
+ NestedObject: dsschema.NestedAttributeObject{
+ Attributes: map[string]dsschema.Attribute{
+ "listNestedBlockAttr": dsschema.StringAttribute{
+ Computed: true,
+ Description: "desc listNestedBlockAttr",
+ MarkdownDescription: "desc listNestedBlockAttr",
+ },
+ "bb 2": dsschema.ListNestedAttribute{
+ Computed: true,
+ Description: "desc bb 2",
+ MarkdownDescription: "desc bb 2",
+ NestedObject: dsschema.NestedAttributeObject{
+ Attributes: map[string]dsschema.Attribute{
+ "bb attr 2": dsschema.StringAttribute{
+ Computed: true,
+ Description: "desc bb attr 2",
+ MarkdownDescription: "desc bb attr 2",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "singleNestedBlock": dsschema.SingleNestedAttribute{
+ Computed: true,
+ Description: "desc singleNestedBlock",
+ MarkdownDescription: "desc singleNestedBlock",
+ Attributes: map[string]dsschema.Attribute{
+ "nestattr": dsschema.StringAttribute{
+ Computed: true,
+ Description: "desc nestattr",
+ MarkdownDescription: "desc nestattr",
+ },
+ "bb 3": dsschema.ListNestedAttribute{
+ Computed: true,
+ Description: "desc bb 3",
+ MarkdownDescription: "desc bb 3",
+ NestedObject: dsschema.NestedAttributeObject{
+ Attributes: map[string]dsschema.Attribute{
+ "bb attr 3": dsschema.StringAttribute{
+ Computed: true,
+ Description: "desc bb attr 3",
+ MarkdownDescription: "desc bb attr 3",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+
+ ds := conversion.DataSourceSchemaFromResource(s, &conversion.DataSourceSchemaRequest{
+ RequiredFields: []string{"requiredAttrString"},
+ })
+ assert.Equal(t, expected, ds)
+}
+
func TestPluralDataSourceSchemaFromResource(t *testing.T) {
s := schema.Schema{
Attributes: map[string]schema.Attribute{
@@ -286,6 +446,18 @@ func TestPluralDataSourceSchemaFromResource(t *testing.T) {
MarkdownDescription: "desc overridenString",
},
},
+ Blocks: map[string]schema.Block{
+ "nested": schema.ListNestedBlock{
+ MarkdownDescription: "desc nested",
+ NestedObject: schema.NestedBlockObject{
+ Attributes: map[string]schema.Attribute{
+ "nested attr": schema.StringAttribute{
+ MarkdownDescription: "desc nested attr",
+ },
+ },
+ },
+ },
+ },
}
expected := dsschema.Schema{
@@ -327,6 +499,20 @@ func TestPluralDataSourceSchemaFromResource(t *testing.T) {
stringvalidator.ConflictsWith(path.MatchRoot("otherAttr")),
},
},
+ "nested": dsschema.ListNestedAttribute{
+ Computed: true,
+ Description: "desc nested",
+ MarkdownDescription: "desc nested",
+ NestedObject: dsschema.NestedAttributeObject{
+ Attributes: map[string]dsschema.Attribute{
+ "nested attr": dsschema.StringAttribute{
+ Computed: true,
+ Description: "desc nested attr",
+ MarkdownDescription: "desc nested attr",
+ },
+ },
+ },
+ },
},
},
Description: "List of documents that MongoDB Cloud returns for this request.",
diff --git a/internal/common/conversion/type_conversion.go b/internal/common/conversion/type_conversion.go
index 67d9c5f1f7..b88f7cdf48 100644
--- a/internal/common/conversion/type_conversion.go
+++ b/internal/common/conversion/type_conversion.go
@@ -3,8 +3,18 @@ package conversion
import (
"strings"
"time"
+
+ "github.com/hashicorp/terraform-plugin-framework/types"
)
+func SafeValue[T any](v *T) T {
+ if v != nil {
+ return *v
+ }
+ var emptyValue T
+ return emptyValue
+}
+
func SafeString(s *string) string {
if s != nil {
return *s
@@ -86,3 +96,11 @@ func NilForUnknown[T any](primitiveAttr TFPrimitiveType, value *T) *T {
}
return value
}
+
+func NilForUnknownOrEmptyString(primitiveAttr types.String) *string {
+ value := NilForUnknown(primitiveAttr, primitiveAttr.ValueStringPointer())
+ if value == nil || *value == "" {
+ return nil
+ }
+ return value
+}
diff --git a/internal/common/conversion/type_conversion_test.go b/internal/common/conversion/type_conversion_test.go
index 028d7d163a..95234d26bd 100644
--- a/internal/common/conversion/type_conversion_test.go
+++ b/internal/common/conversion/type_conversion_test.go
@@ -4,6 +4,7 @@ import (
"testing"
"time"
+ "github.com/hashicorp/terraform-plugin-framework/types"
"github.com/stretchr/testify/assert"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
@@ -95,3 +96,22 @@ func TestAWSRegionToMongoDBRegion(t *testing.T) {
}
}
}
+
+func TestSafeValue(t *testing.T) {
+ var boolPointer *bool
+ assert.False(t, conversion.SafeValue(boolPointer))
+ trueBool := true
+ assert.True(t, conversion.SafeValue(&trueBool))
+ var intPointer *int
+ assert.Equal(t, 0, conversion.SafeValue(intPointer))
+ var stringPointer *string
+ assert.Equal(t, "", conversion.SafeValue(stringPointer))
+}
+
+func TestNilForUnknownOrEmpty(t *testing.T) {
+ assert.Nil(t, conversion.NilForUnknownOrEmptyString(types.StringPointerValue(nil)))
+ emptyString := ""
+ assert.Nil(t, conversion.NilForUnknownOrEmptyString(types.StringPointerValue(&emptyString)))
+ testString := "test"
+ assert.Equal(t, "test", *conversion.NilForUnknownOrEmptyString(types.StringPointerValue(&testString)))
+}
diff --git a/internal/common/update/patch_payload.go b/internal/common/update/patch_payload.go
index a5ac0cfe40..3b10f1873e 100644
--- a/internal/common/update/patch_payload.go
+++ b/internal/common/update/patch_payload.go
@@ -12,28 +12,55 @@ import (
)
type attrPatchOperations struct {
- data map[string][]jsondiff.Operation
- ignoreInState []string
+ data map[string][]jsondiff.Operation
+ ignoreInStateSuffix []string
+ ignoreInStatePrefix []string
+ includeInStateSuffix []string
+ forceUpdateAttr []string
}
func (m *attrPatchOperations) ignoreInStatePath(path string) bool {
- for _, ignore := range m.ignoreInState {
+ for _, include := range m.includeInStateSuffix {
+ suffix := "/" + include
+ if strings.HasSuffix(path, suffix) {
+ return false
+ }
+ }
+ for _, ignore := range m.ignoreInStateSuffix {
suffix := "/" + ignore
if strings.HasSuffix(path, suffix) {
return true
}
}
+ for _, ignore := range m.ignoreInStatePrefix {
+ for _, part := range strings.Split(path, "/") {
+ if ignore == part {
+ return true
+ }
+ }
+ }
return false
}
func newAttrPatchOperations(patch jsondiff.Patch, options []PatchOptions) *attrPatchOperations {
- ignoreInState := []string{}
+ var (
+ ignoreSuffixInState []string
+ ignorePrefixInState []string
+ includeSuffixInState []string
+ forceUpdateAttr []string
+ )
for _, option := range options {
- ignoreInState = append(ignoreInState, option.IgnoreInState...)
+ ignoreSuffixInState = append(ignoreSuffixInState, option.IgnoreInStateSuffix...)
+ ignorePrefixInState = append(ignorePrefixInState, option.IgnoreInStatePrefix...)
+ includeSuffixInState = append(includeSuffixInState, option.IncludeInStateSuffix...)
+ forceUpdateAttr = append(forceUpdateAttr, option.ForceUpdateAttr...)
}
self := &attrPatchOperations{
- data: map[string][]jsondiff.Operation{},
- ignoreInState: ignoreInState,
+ data: map[string][]jsondiff.Operation{},
+ ignoreInStateSuffix: ignoreSuffixInState,
+ ignoreInStatePrefix: ignorePrefixInState,
+ includeInStateSuffix: includeSuffixInState,
+ forceUpdateAttr: forceUpdateAttr,
}
for _, op := range patch {
if op.Path == "" {
@@ -81,7 +108,7 @@ func (m *attrPatchOperations) hasChanged(attr string) bool {
func (m *attrPatchOperations) ChangedAttributes() []string {
attrs := []string{}
for attr := range m.data {
- if m.hasChanged(attr) {
+ if m.hasChanged(attr) || slices.Contains(m.forceUpdateAttr, attr) {
attrs = append(attrs, attr)
}
}
@@ -136,7 +163,10 @@ func convertJSONDiffToJSONPatch(patch jsondiff.Patch) (jsonpatch.Patch, error) {
// Current limitation if the field is set as part of a nested attribute in a map
type PatchOptions struct {
- IgnoreInState []string
+ IgnoreInStateSuffix []string
+ IgnoreInStatePrefix []string
+ IncludeInStateSuffix []string
+ ForceUpdateAttr []string
}
// PatchPayload uses the state and plan to changes to find the patch request, including changes only when:
diff --git a/internal/common/update/patch_payload_test.go b/internal/common/update/patch_payload_test.go
index fa6b142a8c..3f18d4c88f 100644
--- a/internal/common/update/patch_payload_test.go
+++ b/internal/common/update/patch_payload_test.go
@@ -1,6 +1,7 @@
package update_test
import (
+ "fmt"
"testing"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
@@ -12,44 +13,39 @@ import (
func TestPatchReplicationSpecs(t *testing.T) {
var (
- idGlobal = "id_root"
- idReplicationSpec1 = "id_replicationSpec1"
- idReplicationSpec2 = "id_replicationSpec2"
- replicationSpec1ZoneNameOld = "replicationSpec1_zoneName_old"
- replicationSpec1ZoneNameNew = "replicationSpec1_zoneName_new"
- replicationSpec1ZoneID = "replicationSpec1_zoneId"
- replicationSpec2ZoneID = "replicationSpec2_zoneId"
- replicationSpec2ZoneName = "replicationSpec2_zoneName"
- rootName = "my-cluster"
- rootNameUpdated = "my-cluster-updated"
- state = admin.ClusterDescription20240805{
- Id: &idGlobal,
- Name: &rootName,
- ReplicationSpecs: &[]admin.ReplicationSpec20240805{
- {
- Id: &idReplicationSpec1,
- ZoneId: &replicationSpec1ZoneID,
- ZoneName: &replicationSpec1ZoneNameOld,
- },
- },
+ rp1 = replicationSpec{placeholderIndex: 1}.toAdmin()
+ rp2 = replicationSpec{placeholderIndex: 2}.toAdmin()
+ rp3 = replicationSpec{placeholderIndex: 3}.toAdmin()
+ rp1ZoneName = rp1.GetZoneName()
+ rp1ID = rp1.GetId()
+ rp1ZoneID = rp1.GetZoneId()
+ idGlobal = "id_root"
+
+ clusterName = "my-cluster"
+ rootNameUpdated = "my-cluster-updated"
+ stateReplicationSpecs = []admin.ReplicationSpec20240805{
+ rp1,
}
- planOptionalUpdated = admin.ClusterDescription20240805{
- Name: &rootName,
- ReplicationSpecs: &[]admin.ReplicationSpec20240805{
- {
- ZoneName: &replicationSpec1ZoneNameNew,
- },
- },
+ state = admin.ClusterDescription20240805{
+ Id: &idGlobal,
+ Name: &clusterName,
+ ReplicationSpecs: &stateReplicationSpecs,
}
- planNewListEntry = admin.ClusterDescription20240805{
- ReplicationSpecs: &[]admin.ReplicationSpec20240805{
- {
- ZoneName: &replicationSpec1ZoneNameOld,
- },
- {
- ZoneName: &replicationSpec2ZoneName,
- },
- },
+ stateWithReplicationSpecs = func(specs []replicationSpec, id, name string) *admin.ClusterDescription20240805 {
+ newSpecs := make([]admin.ReplicationSpec20240805, len(specs))
+ for i := range specs {
+ newSpecs[i] = specs[i].toAdmin()
+ }
+ cd := admin.ClusterDescription20240805{
+ ReplicationSpecs: &newSpecs,
+ }
+ if id != "" {
+ cd.Id = &id
+ }
+ if name != "" {
+ cd.Name = &name
+ }
+ return &cd
}
planNameDifferentAndEnableBackup = admin.ClusterDescription20240805{
Name: &rootNameUpdated,
@@ -58,7 +54,7 @@ func TestPatchReplicationSpecs(t *testing.T) {
planNoChanges = admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
{
- ZoneName: &replicationSpec1ZoneNameOld,
+ ZoneName: &rp1ZoneName,
},
},
}
@@ -68,66 +64,58 @@ func TestPatchReplicationSpecs(t *testing.T) {
patchExpected *admin.ClusterDescription20240805
options []update.PatchOptions
}{
- "ComputedValues from the state are added to plan and unchanged attributes are not included": {
+ "ComputedValues from the state are added to nested attribute plan and unchanged attributes are not included": {
state: &state,
- plan: &planOptionalUpdated,
+ plan: stateWithReplicationSpecs([]replicationSpec{{zoneName: "newName"}}, "", ""),
patchExpected: &admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
{
- Id: &idReplicationSpec1,
- ZoneId: &replicationSpec1ZoneID,
- ZoneName: &replicationSpec1ZoneNameNew,
+ Id: &rp1ID,
+ ZoneId: &rp1ZoneID,
+ ZoneName: conversion.Pointer("newName"),
},
},
},
},
"New list entry added should be included": {
state: &state,
- plan: &planNewListEntry,
+ plan: stateWithReplicationSpecs([]replicationSpec{{placeholderIndex: 1}, {zoneName: "zone2"}}, "", ""),
patchExpected: &admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
+ rp1,
{
- Id: &idReplicationSpec1,
- ZoneId: &replicationSpec1ZoneID,
- ZoneName: &replicationSpec1ZoneNameOld,
- },
- {
- ZoneName: &replicationSpec2ZoneName,
+ ZoneName: conversion.Pointer("zone2"),
},
},
},
},
- "Removed list entry should be included": {
- state: &admin.ClusterDescription20240805{
+ "Removed list entry should be detected": {
+ state: stateWithReplicationSpecs([]replicationSpec{{placeholderIndex: 1}, {placeholderIndex: 2}}, "", ""),
+ plan: stateWithReplicationSpecs([]replicationSpec{{placeholderIndex: 1}}, "", ""),
+ patchExpected: &admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
- {
- Id: &idReplicationSpec1,
- ZoneId: &replicationSpec1ZoneID,
- ZoneName: &replicationSpec1ZoneNameOld,
- },
- {
- Id: &idReplicationSpec2,
- ZoneName: &replicationSpec2ZoneName,
- ZoneId: &replicationSpec2ZoneID,
- },
+ rp1,
},
},
- plan: &admin.ClusterDescription20240805{
+ },
+ "Added list entry in the middle should be detected": {
+ state: stateWithReplicationSpecs([]replicationSpec{{placeholderIndex: 1}, {placeholderIndex: 2}}, "", ""),
+ plan: stateWithReplicationSpecs([]replicationSpec{{placeholderIndex: 1}, {placeholderIndex: 3}, {placeholderIndex: 2}}, "", ""),
+ patchExpected: &admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
- {
- Id: &idReplicationSpec1,
- ZoneId: &replicationSpec1ZoneID,
- ZoneName: &replicationSpec1ZoneNameOld,
- },
+ rp1,
+ rp3,
+ rp2,
},
},
+ },
+ "Removed list entry in the middle should be detected": {
+ state: stateWithReplicationSpecs([]replicationSpec{{placeholderIndex: 1}, {placeholderIndex: 2}, {placeholderIndex: 3}}, "", ""),
+ plan: stateWithReplicationSpecs([]replicationSpec{{placeholderIndex: 1}, {placeholderIndex: 3}}, "", ""),
patchExpected: &admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
- {
- Id: &idReplicationSpec1,
- ZoneId: &replicationSpec1ZoneID,
- ZoneName: &replicationSpec1ZoneNameOld,
- },
+ rp1,
+ rp3,
},
},
},
@@ -135,7 +123,7 @@ func TestPatchReplicationSpecs(t *testing.T) {
state: &admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
{
- Id: &idReplicationSpec1,
+ Id: &rp1ID,
RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
Priority: conversion.Pointer(1),
@@ -147,7 +135,7 @@ func TestPatchReplicationSpecs(t *testing.T) {
plan: &admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
{
- Id: &idReplicationSpec1,
+ Id: &rp1ID,
RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
Priority: conversion.Pointer(1),
@@ -162,7 +150,7 @@ func TestPatchReplicationSpecs(t *testing.T) {
patchExpected: &admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
{
- Id: &idReplicationSpec1,
+ Id: &rp1ID,
RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
Priority: conversion.Pointer(1),
@@ -188,6 +176,16 @@ func TestPatchReplicationSpecs(t *testing.T) {
plan: &planNoChanges,
patchExpected: nil,
},
+ "Forced changes when forceUpdateAttr set": {
+ state: &state,
+ plan: &planNoChanges,
+ patchExpected: &admin.ClusterDescription20240805{
+ ReplicationSpecs: &stateReplicationSpecs,
+ },
+ options: []update.PatchOptions{
+ {ForceUpdateAttr: []string{"replicationSpecs"}},
+ },
+ },
"Empty array should return no changes": {
state: &admin.ClusterDescription20240805{
Labels: &[]admin.ComponentLabel{},
@@ -198,12 +196,23 @@ func TestPatchReplicationSpecs(t *testing.T) {
patchExpected: nil,
},
"diskSizeGb ignored in state": {
- state: clusterDescriptionDiskSizeNodeCount(50.0, 3, conversion.Pointer(50.0), 0),
- plan: clusterDescriptionDiskSizeNodeCount(55.0, 3, nil, 0),
- patchExpected: clusterDescriptionDiskSizeNodeCount(55.0, 3, nil, 0),
+ state: clusterDescriptionDiskSizeNodeCount(50.0, 3, conversion.Pointer(50.0), 0, conversion.Pointer(3500)),
+ plan: clusterDescriptionDiskSizeNodeCount(55.0, 3, nil, 0, nil),
+ patchExpected: clusterDescriptionDiskSizeNodeCount(55.0, 3, nil, 0, conversion.Pointer(3500)),
+ options: []update.PatchOptions{
+ {
+ IgnoreInStateSuffix: []string{"diskSizeGB"},
+ },
+ },
+ },
+ "regionConfigs ignored in state but diskIOPS included": {
+ state: clusterDescriptionDiskSizeNodeCount(50.0, 3, conversion.Pointer(50.0), 0, conversion.Pointer(3500)),
+ plan: clusterDescriptionDiskSizeNodeCount(55.0, 3, nil, 0, nil),
+ patchExpected: clusterDescriptionDiskSizeNodeCount(55.0, 3, nil, 0, conversion.Pointer(3500)),
options: []update.PatchOptions{
{
- IgnoreInState: []string{"diskSizeGB"},
+ IgnoreInStatePrefix: []string{"regionConfigs"},
+ IncludeInStateSuffix: []string{"diskIOPS"},
},
},
},
@@ -280,7 +289,45 @@ func TestIsEmpty(t *testing.T) {
assert.False(t, update.IsZeroValues(&admin.ClusterDescription20240805{Name: conversion.Pointer("my-cluster")}))
}
-func clusterDescriptionDiskSizeNodeCount(diskSizeGBElectable float64, nodeCountElectable int, diskSizeGBReadOnly *float64, nodeCountReadOnly int) *admin.ClusterDescription20240805 {
+type replicationSpec struct {
+ id string
+ zoneName string
+ zoneID string
+ placeholderIndex int
+}
+
+func (r replicationSpec) toAdmin() admin.ReplicationSpec20240805 {
+ var (
+ placeholderID = "replicationSpec%d_id"
+ placeholderZoneID = "replicationSpec%d_zoneId"
+ placeholderZoneName = "replicationSpec%d_zoneName"
+ )
+ index := r.placeholderIndex
+ if index != 0 {
+ if r.id == "" {
+ r.id = fmt.Sprintf(placeholderID, index)
+ }
+ if r.zoneName == "" {
+ r.zoneName = fmt.Sprintf(placeholderZoneName, index)
+ }
+ if r.zoneID == "" {
+ r.zoneID = fmt.Sprintf(placeholderZoneID, index)
+ }
+ }
+ spec := admin.ReplicationSpec20240805{}
+ if r.id != "" {
+ spec.SetId(r.id)
+ }
+ if r.zoneID != "" {
+ spec.SetZoneId(r.zoneID)
+ }
+ if r.zoneName != "" {
+ spec.SetZoneName(r.zoneName)
+ }
+ return spec
+}
+
+func clusterDescriptionDiskSizeNodeCount(diskSizeGBElectable float64, nodeCountElectable int, diskSizeGBReadOnly *float64, nodeCountReadOnly int, diskIopsState *int) *admin.ClusterDescription20240805 {
return &admin.ClusterDescription20240805{
ReplicationSpecs: &[]admin.ReplicationSpec20240805{
{
@@ -289,10 +336,12 @@ func clusterDescriptionDiskSizeNodeCount(diskSizeGBElectable float64, nodeCountE
ElectableSpecs: &admin.HardwareSpec20240805{
NodeCount: &nodeCountElectable,
DiskSizeGB: &diskSizeGBElectable,
+ DiskIOPS: diskIopsState,
},
ReadOnlySpecs: &admin.DedicatedHardwareSpec20240805{
NodeCount: &nodeCountReadOnly,
DiskSizeGB: diskSizeGBReadOnly,
+ DiskIOPS: diskIopsState,
},
},
},
diff --git a/internal/config/advanced_cluster_v2_schema.go b/internal/config/advanced_cluster_v2_schema.go
index 76e65bfb26..1ad089f0db 100644
--- a/internal/config/advanced_cluster_v2_schema.go
+++ b/internal/config/advanced_cluster_v2_schema.go
@@ -8,7 +8,9 @@ import (
const AdvancedClusterV2SchemaEnvVar = "MONGODB_ATLAS_ADVANCED_CLUSTER_V2_SCHEMA"
const allowAdvancedClusterV2Schema = false // Don't allow in master branch yet, not in const block to allow automatic change
+// Environment variable is read only once to avoid possible changes during runtime
+var advancedClusterV2Schema, _ = strconv.ParseBool(os.Getenv(AdvancedClusterV2SchemaEnvVar))
+
func AdvancedClusterV2Schema() bool {
- env, _ := strconv.ParseBool(os.Getenv(AdvancedClusterV2SchemaEnvVar))
- return allowAdvancedClusterV2Schema && env
+ return allowAdvancedClusterV2Schema && advancedClusterV2Schema
}
diff --git a/internal/service/advancedcluster/data_source_advanced_cluster.go b/internal/service/advancedcluster/data_source_advanced_cluster.go
index e49c08c113..ece283b448 100644
--- a/internal/service/advancedcluster/data_source_advanced_cluster.go
+++ b/internal/service/advancedcluster/data_source_advanced_cluster.go
@@ -5,10 +5,9 @@ import (
"fmt"
"net/http"
- admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
-
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+ admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
)
@@ -288,80 +287,43 @@ func dataSourceRead(ctx context.Context, d *schema.ResourceData, meta any) diag.
clusterName := d.Get("name").(string)
useReplicationSpecPerShard := false
var replicationSpecs []map[string]any
- var clusterID string
if v, ok := d.GetOk("use_replication_spec_per_shard"); ok {
useReplicationSpecPerShard = v.(bool)
}
- if !useReplicationSpecPerShard {
- clusterDescOld, resp, err := connV220240530.ClustersApi.GetCluster(ctx, projectID, clusterName).Execute()
- if err != nil {
- if resp != nil {
- if resp.StatusCode == http.StatusNotFound {
- return nil
- }
- if admin20240530.IsErrorCode(err, "ASYMMETRIC_SHARD_UNSUPPORTED") {
- return diag.FromErr(fmt.Errorf("please add `use_replication_spec_per_shard = true` to your data source configuration to enable asymmetric shard support. Refer to documentation for more details. %s", err))
- }
- }
- return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
- }
-
- clusterID = clusterDescOld.GetId()
-
- if err := d.Set("disk_size_gb", clusterDescOld.GetDiskSizeGB()); err != nil {
- return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "disk_size_gb", clusterName, err))
- }
- clusterDescNew, _, err := connV2.ClustersApi.GetCluster(ctx, projectID, clusterName).Execute()
- if err != nil {
- return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
+ clusterDesc, resp, err := connV2.ClustersApi.GetCluster(ctx, projectID, clusterName).Execute()
+ if err != nil {
+ if resp != nil && resp.StatusCode == http.StatusNotFound {
+ return nil
}
-
- zoneNameToZoneIDs, err := getZoneIDsFromNewAPI(clusterDescNew)
- if err != nil {
+ return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
+ }
+ zoneNameToOldReplicationSpecMeta, err := GetReplicationSpecAttributesFromOldAPI(ctx, projectID, clusterName, connV220240530.ClustersApi)
+ if err != nil {
+ if apiError, ok := admin20240530.AsError(err); !ok {
return diag.FromErr(err)
+ } else if apiError.GetErrorCode() == "ASYMMETRIC_SHARD_UNSUPPORTED" && !useReplicationSpecPerShard {
+ return diag.FromErr(fmt.Errorf("please add `use_replication_spec_per_shard = true` to your data source configuration to enable asymmetric shard support. Refer to documentation for more details. %s", err))
+ } else if apiError.GetErrorCode() != "ASYMMETRIC_SHARD_UNSUPPORTED" {
+ return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
}
+ }
+ diags := setRootFields(d, clusterDesc, false)
+ if diags.HasError() {
+ return diags
+ }
- replicationSpecs, err = FlattenAdvancedReplicationSpecsOldSDK(ctx, clusterDescOld.GetReplicationSpecs(), zoneNameToZoneIDs, clusterDescOld.GetDiskSizeGB(), d.Get("replication_specs").([]any), d, connV2)
+ if !useReplicationSpecPerShard {
+ replicationSpecs, err = FlattenAdvancedReplicationSpecsOldShardingConfig(ctx, clusterDesc.GetReplicationSpecs(), zoneNameToOldReplicationSpecMeta, d.Get("replication_specs").([]any), d, connV2)
if err != nil {
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "replication_specs", clusterName, err))
}
-
- diags := setRootFields(d, clusterDescNew, false)
- if diags.HasError() {
- return diags
- }
} else {
- clusterDescLatest, resp, err := connV2.ClustersApi.GetCluster(ctx, projectID, clusterName).Execute()
- if err != nil {
- if resp != nil && resp.StatusCode == http.StatusNotFound {
- return nil
- }
- return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
- }
-
- clusterID = clusterDescLatest.GetId()
-
- // root disk_size_gb defined for backwards compatibility avoiding breaking changes
- if err := d.Set("disk_size_gb", GetDiskSizeGBFromReplicationSpec(clusterDescLatest)); err != nil {
- return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "disk_size_gb", clusterName, err))
- }
-
- zoneNameToOldReplicationSpecIDs, err := getReplicationSpecIDsFromOldAPI(ctx, projectID, clusterName, connV220240530)
- if err != nil {
- return diag.FromErr(err)
- }
-
- replicationSpecs, err = flattenAdvancedReplicationSpecsDS(ctx, clusterDescLatest.GetReplicationSpecs(), zoneNameToOldReplicationSpecIDs, d, connV2)
+ replicationSpecs, err = flattenAdvancedReplicationSpecsDS(ctx, clusterDesc.GetReplicationSpecs(), zoneNameToOldReplicationSpecMeta, d, connV2)
if err != nil {
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "replication_specs", clusterName, err))
}
-
- diags := setRootFields(d, clusterDescLatest, false)
- if diags.HasError() {
- return diags
- }
}
if err := d.Set("replication_specs", replicationSpecs); err != nil {
@@ -370,17 +332,17 @@ func dataSourceRead(ctx context.Context, d *schema.ResourceData, meta any) diag.
processArgs20240530, _, err := connV220240530.ClustersApi.GetClusterAdvancedConfiguration(ctx, projectID, clusterName).Execute()
if err != nil {
- return diag.FromErr(fmt.Errorf(ErrorAdvancedConfRead, clusterName, err))
+ return diag.FromErr(fmt.Errorf(ErrorAdvancedConfRead, V20240530, clusterName, err))
}
processArgs, _, err := connV2.ClustersApi.GetClusterAdvancedConfiguration(ctx, projectID, clusterName).Execute()
if err != nil {
- return diag.FromErr(fmt.Errorf(ErrorAdvancedConfRead, clusterName, err))
+ return diag.FromErr(fmt.Errorf(ErrorAdvancedConfRead, "", clusterName, err))
}
if err := d.Set("advanced_configuration", flattenProcessArgs(processArgs20240530, processArgs)); err != nil {
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "advanced_configuration", clusterName, err))
}
- d.SetId(clusterID)
+ d.SetId(clusterDesc.GetId())
return nil
}
diff --git a/internal/service/advancedcluster/data_source_advanced_clusters.go b/internal/service/advancedcluster/data_source_advanced_clusters.go
index d3cbb1875a..90cc4ab867 100644
--- a/internal/service/advancedcluster/data_source_advanced_clusters.go
+++ b/internal/service/advancedcluster/data_source_advanced_clusters.go
@@ -308,41 +308,25 @@ func dataSourcePluralRead(ctx context.Context, d *schema.ResourceData, meta any)
useReplicationSpecPerShard = v.(bool)
}
- if !useReplicationSpecPerShard {
- list, resp, err := connV220240530.ClustersApi.ListClusters(ctx, projectID).Execute()
- if err != nil {
- if resp != nil && resp.StatusCode == http.StatusNotFound {
- return nil
- }
- return diag.FromErr(fmt.Errorf(errorListRead, projectID, err))
- }
- results, diags := flattenAdvancedClustersOldSDK(ctx, connV220240530, connV2, list.GetResults(), d)
- if len(diags) > 0 {
- return diags
- }
- if err := d.Set("results", results); err != nil {
- return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "results", d.Id(), err))
- }
- } else {
- list, resp, err := connV2.ClustersApi.ListClusters(ctx, projectID).Execute()
- if err != nil {
- if resp != nil && resp.StatusCode == http.StatusNotFound {
- return nil
- }
- return diag.FromErr(fmt.Errorf(errorListRead, projectID, err))
- }
- results, diags := flattenAdvancedClusters(ctx, connV220240530, connV2, list.GetResults(), d)
- if len(diags) > 0 {
- return diags
- }
- if err := d.Set("results", results); err != nil {
- return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "results", d.Id(), err))
+ list, resp, err := connV2.ClustersApi.ListClusters(ctx, projectID).Execute()
+ if err != nil {
+ if resp != nil && resp.StatusCode == http.StatusNotFound {
+ return nil
}
+ return diag.FromErr(fmt.Errorf(errorListRead, projectID, err))
+ }
+ results, diags := flattenAdvancedClusters(ctx, connV220240530, connV2, list.GetResults(), d, useReplicationSpecPerShard)
+ if len(diags) > 0 {
+ return diags
}
+ if err := d.Set("results", results); err != nil {
+ return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "results", d.Id(), err))
+ }
+
return nil
}
-func flattenAdvancedClusters(ctx context.Context, connV220240530 *admin20240530.APIClient, connV2 *admin.APIClient, clusters []admin.ClusterDescription20240805, d *schema.ResourceData) ([]map[string]any, diag.Diagnostics) {
+func flattenAdvancedClusters(ctx context.Context, connV220240530 *admin20240530.APIClient, connV2 *admin.APIClient, clusters []admin.ClusterDescription20240805, d *schema.ResourceData, useReplicationSpecPerShard bool) ([]map[string]any, diag.Diagnostics) {
results := make([]map[string]any, 0, len(clusters))
for i := range clusters {
cluster := &clusters[i]
@@ -355,14 +339,29 @@ func flattenAdvancedClusters(ctx context.Context, connV220240530 *admin20240530.
log.Printf("[WARN] Error setting `advanced_configuration` for the cluster(%s): %s", cluster.GetId(), err)
}
- zoneNameToOldReplicationSpecIDs, err := getReplicationSpecIDsFromOldAPI(ctx, cluster.GetGroupId(), cluster.GetName(), connV220240530)
+ zoneNameToOldReplicationSpecMeta, err := GetReplicationSpecAttributesFromOldAPI(ctx, cluster.GetGroupId(), cluster.GetName(), connV220240530.ClustersApi)
if err != nil {
- return nil, diag.FromErr(err)
+ if apiError, ok := admin20240530.AsError(err); !ok {
+ return nil, diag.FromErr(err)
+ } else if apiError.GetErrorCode() == "ASYMMETRIC_SHARD_UNSUPPORTED" && !useReplicationSpecPerShard {
+ continue
+ } else if apiError.GetErrorCode() != "ASYMMETRIC_SHARD_UNSUPPORTED" {
+ return nil, diag.FromErr(err)
+ }
}
- replicationSpecs, err := flattenAdvancedReplicationSpecsDS(ctx, cluster.GetReplicationSpecs(), zoneNameToOldReplicationSpecIDs, d, connV2)
- if err != nil {
- log.Printf("[WARN] Error setting `replication_specs` for the cluster(%s): %s", cluster.GetId(), err)
+ var replicationSpecs []map[string]any
+
+ if !useReplicationSpecPerShard {
+ replicationSpecs, err = FlattenAdvancedReplicationSpecsOldShardingConfig(ctx, cluster.GetReplicationSpecs(), zoneNameToOldReplicationSpecMeta, nil, d, connV2)
+ if err != nil {
+ log.Printf("[WARN] Error setting `replication_specs` for the cluster(%s): %s", cluster.GetId(), err)
+ }
+ } else {
+ replicationSpecs, err = flattenAdvancedReplicationSpecsDS(ctx, cluster.GetReplicationSpecs(), zoneNameToOldReplicationSpecMeta, d, connV2)
+ if err != nil {
+ log.Printf("[WARN] Error setting `replication_specs` for the cluster(%s): %s", cluster.GetId(), err)
+ }
}
result := map[string]any{
@@ -397,63 +396,3 @@ func flattenAdvancedClusters(ctx context.Context, connV220240530 *admin20240530.
}
return results, nil
}
-
-func flattenAdvancedClustersOldSDK(ctx context.Context, connV20240530 *admin20240530.APIClient, connV2 *admin.APIClient, clusters []admin20240530.AdvancedClusterDescription, d *schema.ResourceData) ([]map[string]any, diag.Diagnostics) {
- results := make([]map[string]any, 0, len(clusters))
- for i := range clusters {
- cluster := &clusters[i]
- processArgs20240530, _, err := connV20240530.ClustersApi.GetClusterAdvancedConfiguration(ctx, cluster.GetGroupId(), cluster.GetName()).Execute()
- if err != nil {
- log.Printf("[WARN] Error setting `advanced_configuration` for the cluster(%s): %s", cluster.GetId(), err)
- }
- processArgs, _, err := connV2.ClustersApi.GetClusterAdvancedConfiguration(ctx, cluster.GetGroupId(), cluster.GetName()).Execute()
- if err != nil {
- log.Printf("[WARN] Error setting `advanced_configuration` for the cluster(%s): %s", cluster.GetId(), err)
- }
-
- clusterDescNew, _, err := connV2.ClustersApi.GetCluster(ctx, cluster.GetGroupId(), cluster.GetName()).Execute()
- if err != nil {
- return nil, diag.FromErr(err)
- }
- zoneNameToZoneIDs, err := getZoneIDsFromNewAPI(clusterDescNew)
- if err != nil {
- return nil, diag.FromErr(err)
- }
-
- replicationSpecs, err := FlattenAdvancedReplicationSpecsOldSDK(ctx, cluster.GetReplicationSpecs(), zoneNameToZoneIDs, cluster.GetDiskSizeGB(), nil, d, connV2)
- if err != nil {
- log.Printf("[WARN] Error setting `replication_specs` for the cluster(%s): %s", cluster.GetId(), err)
- }
-
- result := map[string]any{
- "advanced_configuration": flattenProcessArgs(processArgs20240530, processArgs),
- "backup_enabled": cluster.GetBackupEnabled(),
- "bi_connector_config": flattenBiConnectorConfig(convertBiConnectToLatest(cluster.BiConnector)),
- "cluster_type": cluster.GetClusterType(),
- "create_date": conversion.TimePtrToStringPtr(cluster.CreateDate),
- "connection_strings": flattenConnectionStrings(*convertConnectionStringToLatest(cluster.ConnectionStrings)),
- "disk_size_gb": cluster.GetDiskSizeGB(),
- "encryption_at_rest_provider": cluster.GetEncryptionAtRestProvider(),
- "labels": flattenLabels(*convertLabelsToLatest(cluster.Labels)),
- "tags": conversion.FlattenTags(convertTagsToLatest(cluster.GetTags())),
- "mongo_db_version": cluster.GetMongoDBVersion(),
- "name": cluster.GetName(),
- "paused": cluster.GetPaused(),
- "pit_enabled": cluster.GetPitEnabled(),
- "replication_specs": replicationSpecs,
- "root_cert_type": cluster.GetRootCertType(),
- "state_name": cluster.GetStateName(),
- "termination_protection_enabled": cluster.GetTerminationProtectionEnabled(),
- "version_release_system": cluster.GetVersionReleaseSystem(),
- "global_cluster_self_managed_sharding": cluster.GetGlobalClusterSelfManagedSharding(),
- "mongo_db_major_version": clusterDescNew.GetMongoDBMajorVersion(), // uses 2024-08-05 as it has fix for correct value when FCV is active
- "replica_set_scaling_strategy": clusterDescNew.GetReplicaSetScalingStrategy(),
- "redact_client_log_data": clusterDescNew.GetRedactClientLogData(),
- "config_server_management_mode": clusterDescNew.GetConfigServerManagementMode(),
- "config_server_type": clusterDescNew.GetConfigServerType(),
- "pinned_fcv": FlattenPinnedFCV(clusterDescNew),
- }
- results = append(results, result)
- }
- return results, nil
-}
diff --git a/internal/service/advancedcluster/model_advanced_cluster.go b/internal/service/advancedcluster/model_advanced_cluster.go
index f4c872f680..716f723e7d 100644
--- a/internal/service/advancedcluster/model_advanced_cluster.go
+++ b/internal/service/advancedcluster/model_advanced_cluster.go
@@ -12,7 +12,6 @@ import (
"strings"
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
- admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
"go.mongodb.org/atlas-sdk/v20241113003/admin"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
@@ -27,6 +26,11 @@ import (
const minVersionForChangeStreamOptions = 6.0
const minVersionForDefaultMaxTimeMS = 8.0
+type OldShardConfigMeta struct {
+ ID string
+ NumShard int
+}
+
var (
DSTagsSchema = schema.Schema{
Type: schema.TypeSet,
@@ -122,6 +126,17 @@ func SchemaAdvancedConfigDS() *schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
+ "tls_cipher_config_mode": {
+ Type: schema.TypeString,
+ Computed: true,
+ },
+ "custom_openssl_cipher_config_tls12": {
+ Type: schema.TypeSet,
+ Computed: true,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ },
},
},
}
@@ -271,6 +286,18 @@ func SchemaAdvancedConfig() *schema.Schema {
Type: schema.TypeInt,
Optional: true,
},
+ "custom_openssl_cipher_config_tls12": {
+ Type: schema.TypeSet,
+ Optional: true,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ },
+ "tls_cipher_config_mode": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ },
},
},
}
@@ -410,10 +437,10 @@ func flattenTags(tags *[]admin.ResourceTag) []map[string]string {
}
// CheckRegionConfigsPriorityOrder will be deleted in CLOUDP-275825
-func CheckRegionConfigsPriorityOrder(regionConfigs []admin20240805.ReplicationSpec20240805) error {
+func CheckRegionConfigsPriorityOrder(regionConfigs []admin.ReplicationSpec20240805) error {
for _, spec := range regionConfigs {
configs := spec.GetRegionConfigs()
- for i := 0; i < len(configs)-1; i++ {
+ for i := range len(configs) - 1 {
if configs[i].GetPriority() < configs[i+1].GetPriority() {
return errors.New("priority values in region_configs must be in descending order")
}
@@ -426,7 +453,7 @@ func CheckRegionConfigsPriorityOrder(regionConfigs []admin20240805.ReplicationSp
func CheckRegionConfigsPriorityOrderOld(regionConfigs []admin20240530.ReplicationSpec) error {
for _, spec := range regionConfigs {
configs := spec.GetRegionConfigs()
- for i := 0; i < len(configs)-1; i++ {
+ for i := range len(configs) - 1 {
if configs[i].GetPriority() < configs[i+1].GetPriority() {
return errors.New("priority values in region_configs must be in descending order")
}
@@ -492,11 +519,11 @@ func flattenBiConnectorConfig(biConnector *admin.BiConnector) []map[string]any {
}
}
-func expandBiConnectorConfig(d *schema.ResourceData) *admin20240805.BiConnector {
+func expandBiConnectorConfig(d *schema.ResourceData) *admin.BiConnector {
if v, ok := d.GetOk("bi_connector_config"); ok {
if biConn := v.([]any); len(biConn) > 0 {
biConnMap := biConn[0].(map[string]any)
- return &admin20240805.BiConnector{
+ return &admin.BiConnector{
Enabled: conversion.Pointer(cast.ToBool(biConnMap["enabled"])),
ReadPreference: conversion.StringPtr(cast.ToString(biConnMap["read_preference"])),
}
@@ -534,31 +561,57 @@ func flattenProcessArgs(p20240530 *admin20240530.ClusterDescriptionProcessArgs,
if v := p.DefaultMaxTimeMS; v != nil {
flattenedProcessArgs[0]["default_max_time_ms"] = p.GetDefaultMaxTimeMS()
}
+ flattenedProcessArgs[0]["tls_cipher_config_mode"] = p.GetTlsCipherConfigMode()
+ flattenedProcessArgs[0]["custom_openssl_cipher_config_tls12"] = p.GetCustomOpensslCipherConfigTls12()
}
return flattenedProcessArgs
}
-func FlattenAdvancedReplicationSpecsOldSDK(ctx context.Context, apiObjects []admin20240530.ReplicationSpec, zoneNameToZoneIDs map[string]string, rootDiskSizeGB float64, tfMapObjects []any,
+func FlattenAdvancedReplicationSpecsOldShardingConfig(ctx context.Context, apiObjects []admin.ReplicationSpec20240805, zoneNameToOldReplicationSpecMeta map[string]OldShardConfigMeta, tfMapObjects []any,
d *schema.ResourceData, connV2 *admin.APIClient) ([]map[string]any, error) {
- // for flattening old model we need information of value defined at root disk_size_gb so we set the value in new location under hardware specs
- replicationSpecFlattener := func(ctx context.Context, sdkModel *admin20240530.ReplicationSpec, tfModel map[string]any, resourceData *schema.ResourceData, client *admin.APIClient) (map[string]any, error) {
- return flattenAdvancedReplicationSpecOldSDK(ctx, sdkModel, zoneNameToZoneIDs, rootDiskSizeGB, tfModel, resourceData, connV2)
+ replicationSpecFlattener := func(ctx context.Context, sdkModel *admin.ReplicationSpec20240805, tfModel map[string]any, resourceData *schema.ResourceData, client *admin.APIClient) (map[string]any, error) {
+ return flattenAdvancedReplicationSpecOldShardingConfig(ctx, sdkModel, zoneNameToOldReplicationSpecMeta, tfModel, resourceData, connV2)
}
- return flattenAdvancedReplicationSpecsLogic[admin20240530.ReplicationSpec](ctx, apiObjects, tfMapObjects, d,
- doesAdvancedReplicationSpecMatchAPIOldSDK, replicationSpecFlattener, connV2)
+ compressedAPIObjects := compressAPIObjectList(apiObjects)
+ return flattenAdvancedReplicationSpecsLogic(ctx, compressedAPIObjects, tfMapObjects, d,
+ doesAdvancedReplicationSpecMatchAPIOldShardConfig, replicationSpecFlattener, connV2)
}
-func flattenAdvancedReplicationSpecs(ctx context.Context, apiObjects []admin.ReplicationSpec20240805, zoneNameToOldReplicationSpecIDs map[string]string, tfMapObjects []any,
+func flattenAdvancedReplicationSpecs(ctx context.Context, apiObjects []admin.ReplicationSpec20240805, zoneNameToOldReplicationSpecMeta map[string]OldShardConfigMeta, tfMapObjects []any,
d *schema.ResourceData, connV2 *admin.APIClient) ([]map[string]any, error) {
// for flattening new model we need information of replication spec ids associated to old API to avoid breaking changes for users referencing replication_specs.*.id
replicationSpecFlattener := func(ctx context.Context, sdkModel *admin.ReplicationSpec20240805, tfModel map[string]any, resourceData *schema.ResourceData, client *admin.APIClient) (map[string]any, error) {
- return flattenAdvancedReplicationSpec(ctx, sdkModel, zoneNameToOldReplicationSpecIDs, tfModel, resourceData, connV2)
+ return flattenAdvancedReplicationSpec(ctx, sdkModel, zoneNameToOldReplicationSpecMeta, tfModel, resourceData, connV2)
}
- return flattenAdvancedReplicationSpecsLogic[admin.ReplicationSpec20240805](ctx, apiObjects, tfMapObjects, d,
+ return flattenAdvancedReplicationSpecsLogic(ctx, apiObjects, tfMapObjects, d,
doesAdvancedReplicationSpecMatchAPI, replicationSpecFlattener, connV2)
}
+// compressAPIObjectList returns an array of ReplicationSpec20240805. The input array is reduced from all shards to only one shard per zoneName
+func compressAPIObjectList(apiObjects []admin.ReplicationSpec20240805) []admin.ReplicationSpec20240805 {
+ var compressedAPIObjectList []admin.ReplicationSpec20240805
+ wasZoneNameUsed := populateZoneNameMap(apiObjects)
+ for _, apiObject := range apiObjects {
+ if !wasZoneNameUsed[apiObject.GetZoneName()] {
+ compressedAPIObjectList = append(compressedAPIObjectList, apiObject)
+ wasZoneNameUsed[apiObject.GetZoneName()] = true
+ }
+ }
+ return compressedAPIObjectList
+}
+
+// populateZoneNameMap returns a map of zoneNames and initializes all keys to false.
+func populateZoneNameMap(apiObjects []admin.ReplicationSpec20240805) map[string]bool {
+ zoneNames := make(map[string]bool)
+ for _, apiObject := range apiObjects {
+ if _, exists := zoneNames[apiObject.GetZoneName()]; !exists {
+ zoneNames[apiObject.GetZoneName()] = false
+ }
+ }
+ return zoneNames
+}
+
type ReplicationSpecSDKModel interface {
admin20240530.ReplicationSpec | admin.ReplicationSpec20240805
}
@@ -575,13 +628,12 @@ func flattenAdvancedReplicationSpecsLogic[T ReplicationSpecSDKModel](
tfList := make([]map[string]any, len(apiObjects))
wasAPIObjectUsed := make([]bool, len(apiObjects))
- for i := 0; i < len(tfList); i++ {
+ for i := range len(tfList) {
var tfMapObject map[string]any
if len(tfMapObjects) > i {
tfMapObject = tfMapObjects[i].(map[string]any)
}
-
for j := 0; j < len(apiObjects); j++ {
if wasAPIObjectUsed[j] || !tfModelWithSDKMatcher(tfMapObject, &apiObjects[j]) {
continue
@@ -624,8 +676,8 @@ func flattenAdvancedReplicationSpecsLogic[T ReplicationSpecSDKModel](
return tfList, nil
}
-func doesAdvancedReplicationSpecMatchAPIOldSDK(tfObject map[string]any, apiObject *admin20240530.ReplicationSpec) bool {
- return tfObject["id"] == apiObject.GetId() || (tfObject["id"] == nil && tfObject["zone_name"] == apiObject.GetZoneName())
+func doesAdvancedReplicationSpecMatchAPIOldShardConfig(tfObject map[string]any, apiObject *admin.ReplicationSpec20240805) bool {
+ return tfObject["zone_name"] == apiObject.GetZoneName()
}
func doesAdvancedReplicationSpecMatchAPI(tfObject map[string]any, apiObject *admin.ReplicationSpec20240805) bool {
@@ -719,11 +771,11 @@ func hwSpecToDedicatedHwSpec(apiObject *admin.HardwareSpec20240805) *admin.Dedic
}
}
-func dedicatedHwSpecToHwSpec(apiObject *admin20240805.DedicatedHardwareSpec20240805) *admin20240805.HardwareSpec20240805 {
+func dedicatedHwSpecToHwSpec(apiObject *admin.DedicatedHardwareSpec20240805) *admin.HardwareSpec20240805 {
if apiObject == nil {
return nil
}
- return &admin20240805.HardwareSpec20240805{
+ return &admin.HardwareSpec20240805{
DiskSizeGB: apiObject.DiskSizeGB,
NodeCount: apiObject.NodeCount,
DiskIOPS: apiObject.DiskIOPS,
@@ -885,6 +937,14 @@ func expandProcessArgs(d *schema.ResourceData, p map[string]any, mongodbMajorVer
}
}
+ if _, ok := d.GetOkExists("advanced_configuration.0.tls_cipher_config_mode"); ok {
+ res.TlsCipherConfigMode = conversion.StringPtr(cast.ToString(p["tls_cipher_config_mode"]))
+ }
+
+ if _, ok := d.GetOkExists("advanced_configuration.0.custom_openssl_cipher_config_tls12"); ok {
+ tmp := conversion.ExpandStringListFromSetSchema(d.Get("advanced_configuration.0.custom_openssl_cipher_config_tls12").(*schema.Set))
+ res.CustomOpensslCipherConfigTls12 = &tmp
+ }
return res20240530, res
}
@@ -913,16 +973,16 @@ func IsDefaultMaxTimeMinRequiredMajorVersion(input *string) bool {
return isMinRequiredMajorVersion(input, minVersionForDefaultMaxTimeMS)
}
-func expandLabelSliceFromSetSchema(d *schema.ResourceData) ([]admin20240805.ComponentLabel, diag.Diagnostics) {
+func expandLabelSliceFromSetSchema(d *schema.ResourceData) ([]admin.ComponentLabel, diag.Diagnostics) {
list := d.Get("labels").(*schema.Set)
- res := make([]admin20240805.ComponentLabel, list.Len())
+ res := make([]admin.ComponentLabel, list.Len())
for i, val := range list.List() {
v := val.(map[string]any)
key := v["key"].(string)
if key == ignoreLabel {
return nil, diag.FromErr(fmt.Errorf("you should not set `Infrastructure Tool` label, it is used for internal purposes"))
}
- res[i] = admin20240805.ComponentLabel{
+ res[i] = admin.ComponentLabel{
Key: conversion.StringPtr(key),
Value: conversion.StringPtr(v["value"].(string)),
}
@@ -930,8 +990,8 @@ func expandLabelSliceFromSetSchema(d *schema.ResourceData) ([]admin20240805.Comp
return res, nil
}
-func expandAdvancedReplicationSpecs(tfList []any, rootDiskSizeGB *float64) *[]admin20240805.ReplicationSpec20240805 {
- var apiObjects []admin20240805.ReplicationSpec20240805
+func expandAdvancedReplicationSpecs(tfList []any, rootDiskSizeGB *float64) *[]admin.ReplicationSpec20240805 {
+ var apiObjects []admin.ReplicationSpec20240805
for _, tfMapRaw := range tfList {
tfMap, ok := tfMapRaw.(map[string]any)
if !ok || tfMap == nil {
@@ -968,8 +1028,8 @@ func expandAdvancedReplicationSpecsOldSDK(tfList []any) *[]admin20240530.Replica
return &apiObjects
}
-func expandAdvancedReplicationSpec(tfMap map[string]any, rootDiskSizeGB *float64) *admin20240805.ReplicationSpec20240805 {
- apiObject := &admin20240805.ReplicationSpec20240805{
+func expandAdvancedReplicationSpec(tfMap map[string]any, rootDiskSizeGB *float64) *admin.ReplicationSpec20240805 {
+ apiObject := &admin.ReplicationSpec20240805{
ZoneName: conversion.StringPtr(tfMap["zone_name"].(string)),
RegionConfigs: expandRegionConfigs(tfMap["region_configs"].([]any), rootDiskSizeGB),
}
@@ -991,8 +1051,8 @@ func expandAdvancedReplicationSpecOldSDK(tfMap map[string]any) *admin20240530.Re
return apiObject
}
-func expandRegionConfigs(tfList []any, rootDiskSizeGB *float64) *[]admin20240805.CloudRegionConfig20240805 {
- var apiObjects []admin20240805.CloudRegionConfig20240805
+func expandRegionConfigs(tfList []any, rootDiskSizeGB *float64) *[]admin.CloudRegionConfig20240805 {
+ var apiObjects []admin.CloudRegionConfig20240805
for _, tfMapRaw := range tfList {
tfMap, ok := tfMapRaw.(map[string]any)
if !ok || tfMap == nil {
@@ -1007,9 +1067,9 @@ func expandRegionConfigs(tfList []any, rootDiskSizeGB *float64) *[]admin20240805
return &apiObjects
}
-func expandRegionConfig(tfMap map[string]any, rootDiskSizeGB *float64) *admin20240805.CloudRegionConfig20240805 {
+func expandRegionConfig(tfMap map[string]any, rootDiskSizeGB *float64) *admin.CloudRegionConfig20240805 {
providerName := tfMap["provider_name"].(string)
- apiObject := &admin20240805.CloudRegionConfig20240805{
+ apiObject := &admin.CloudRegionConfig20240805{
Priority: conversion.Pointer(cast.ToInt(tfMap["priority"])),
ProviderName: conversion.StringPtr(providerName),
RegionName: conversion.StringPtr(tfMap["region_name"].(string)),
@@ -1036,9 +1096,9 @@ func expandRegionConfig(tfMap map[string]any, rootDiskSizeGB *float64) *admin202
return apiObject
}
-func expandRegionConfigSpec(tfList []any, providerName string, rootDiskSizeGB *float64) *admin20240805.DedicatedHardwareSpec20240805 {
+func expandRegionConfigSpec(tfList []any, providerName string, rootDiskSizeGB *float64) *admin.DedicatedHardwareSpec20240805 {
tfMap, _ := tfList[0].(map[string]any)
- apiObject := new(admin20240805.DedicatedHardwareSpec20240805)
+ apiObject := new(admin.DedicatedHardwareSpec20240805)
if providerName == constant.AWS || providerName == constant.AZURE {
if v, ok := tfMap["disk_iops"]; ok && v.(int) > 0 {
apiObject.DiskIOPS = conversion.Pointer(v.(int))
@@ -1068,11 +1128,11 @@ func expandRegionConfigSpec(tfList []any, providerName string, rootDiskSizeGB *f
return apiObject
}
-func expandRegionConfigAutoScaling(tfList []any) *admin20240805.AdvancedAutoScalingSettings {
+func expandRegionConfigAutoScaling(tfList []any) *admin.AdvancedAutoScalingSettings {
tfMap, _ := tfList[0].(map[string]any)
- settings := admin20240805.AdvancedAutoScalingSettings{
- DiskGB: new(admin20240805.DiskGBAutoScaling),
- Compute: new(admin20240805.AdvancedComputeAutoScaling),
+ settings := admin.AdvancedAutoScalingSettings{
+ DiskGB: new(admin.DiskGBAutoScaling),
+ Compute: new(admin.AdvancedComputeAutoScaling),
}
if v, ok := tfMap["disk_gb_enabled"]; ok {
@@ -1099,7 +1159,7 @@ func expandRegionConfigAutoScaling(tfList []any) *admin20240805.AdvancedAutoScal
return &settings
}
-func flattenAdvancedReplicationSpecsDS(ctx context.Context, apiRepSpecs []admin.ReplicationSpec20240805, zoneNameToOldReplicationSpecIDs map[string]string, d *schema.ResourceData, connV2 *admin.APIClient) ([]map[string]any, error) {
+func flattenAdvancedReplicationSpecsDS(ctx context.Context, apiRepSpecs []admin.ReplicationSpec20240805, zoneNameToOldReplicationSpecMeta map[string]OldShardConfigMeta, d *schema.ResourceData, connV2 *admin.APIClient) ([]map[string]any, error) {
if len(apiRepSpecs) == 0 {
return nil, nil
}
@@ -1107,7 +1167,7 @@ func flattenAdvancedReplicationSpecsDS(ctx context.Context, apiRepSpecs []admin.
tfList := make([]map[string]any, len(apiRepSpecs))
for i, apiRepSpec := range apiRepSpecs {
- tfReplicationSpec, err := flattenAdvancedReplicationSpec(ctx, &apiRepSpec, zoneNameToOldReplicationSpecIDs, nil, d, connV2)
+ tfReplicationSpec, err := flattenAdvancedReplicationSpec(ctx, &apiRepSpec, zoneNameToOldReplicationSpecMeta, nil, d, connV2)
if err != nil {
return nil, err
}
@@ -1116,7 +1176,7 @@ func flattenAdvancedReplicationSpecsDS(ctx context.Context, apiRepSpecs []admin.
return tfList, nil
}
-func flattenAdvancedReplicationSpec(ctx context.Context, apiObject *admin.ReplicationSpec20240805, zoneNameToOldReplicationSpecIDs map[string]string, tfMapObject map[string]any,
+func flattenAdvancedReplicationSpec(ctx context.Context, apiObject *admin.ReplicationSpec20240805, zoneNameToOldReplicationSpecMeta map[string]OldShardConfigMeta, tfMapObject map[string]any,
d *schema.ResourceData, connV2 *admin.APIClient) (map[string]any, error) {
if apiObject == nil {
return nil, nil
@@ -1125,8 +1185,8 @@ func flattenAdvancedReplicationSpec(ctx context.Context, apiObject *admin.Replic
tfMap := map[string]any{}
tfMap["external_id"] = apiObject.GetId()
- if oldID, ok := zoneNameToOldReplicationSpecIDs[apiObject.GetZoneName()]; ok {
- tfMap["id"] = oldID // replicationSpecs.*.id stores value associated to old cluster API (2023-02-01)
+ if oldShardConfig, ok := zoneNameToOldReplicationSpecMeta[apiObject.GetZoneName()]; ok {
+ tfMap["id"] = oldShardConfig.ID // replicationSpecs.*.id stores value associated to old cluster API (2023-02-01)
}
// define num_shards for backwards compatibility as this attribute has default value of 1.
@@ -1153,24 +1213,26 @@ func flattenAdvancedReplicationSpec(ctx context.Context, apiObject *admin.Replic
return tfMap, nil
}
-func flattenAdvancedReplicationSpecOldSDK(ctx context.Context, apiObject *admin20240530.ReplicationSpec, zoneNameToZoneIDs map[string]string, rootDiskSizeGB float64, tfMapObject map[string]any,
+func flattenAdvancedReplicationSpecOldShardingConfig(ctx context.Context, apiObject *admin.ReplicationSpec20240805, zoneNameToOldShardConfigMeta map[string]OldShardConfigMeta, tfMapObject map[string]any,
d *schema.ResourceData, connV2 *admin.APIClient) (map[string]any, error) {
if apiObject == nil {
return nil, nil
}
tfMap := map[string]any{}
- tfMap["num_shards"] = apiObject.GetNumShards()
- tfMap["id"] = apiObject.GetId()
+ if oldShardConfigData, ok := zoneNameToOldShardConfigMeta[apiObject.GetZoneName()]; ok {
+ tfMap["num_shards"] = oldShardConfigData.NumShard
+ tfMap["id"] = oldShardConfigData.ID
+ }
if tfMapObject != nil {
- object, containerIDs, err := flattenAdvancedReplicationSpecRegionConfigs(ctx, *convertRegionConfigSliceToLatest(apiObject.RegionConfigs, rootDiskSizeGB), tfMapObject["region_configs"].([]any), d, connV2)
+ object, containerIDs, err := flattenAdvancedReplicationSpecRegionConfigs(ctx, apiObject.GetRegionConfigs(), tfMapObject["region_configs"].([]any), d, connV2)
if err != nil {
return nil, err
}
tfMap["region_configs"] = object
tfMap["container_id"] = containerIDs
} else {
- object, containerIDs, err := flattenAdvancedReplicationSpecRegionConfigs(ctx, *convertRegionConfigSliceToLatest(apiObject.RegionConfigs, rootDiskSizeGB), nil, d, connV2)
+ object, containerIDs, err := flattenAdvancedReplicationSpecRegionConfigs(ctx, apiObject.GetRegionConfigs(), nil, d, connV2)
if err != nil {
return nil, err
}
@@ -1178,9 +1240,7 @@ func flattenAdvancedReplicationSpecOldSDK(ctx context.Context, apiObject *admin2
tfMap["container_id"] = containerIDs
}
tfMap["zone_name"] = apiObject.GetZoneName()
- if zoneID, ok := zoneNameToZoneIDs[apiObject.GetZoneName()]; ok { // zone id is not present on old API SDK, so we fetch values from new API and map them using zone name
- tfMap["zone_id"] = zoneID
- }
+ tfMap["zone_id"] = apiObject.GetZoneId()
return tfMap, nil
}
diff --git a/internal/service/advancedcluster/model_advanced_cluster_test.go b/internal/service/advancedcluster/model_advanced_cluster_test.go
index 8c05a013c7..88d3f19441 100644
--- a/internal/service/advancedcluster/model_advanced_cluster_test.go
+++ b/internal/service/advancedcluster/model_advanced_cluster_test.go
@@ -8,7 +8,6 @@ import (
"testing"
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
- admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
"go.mongodb.org/atlas-sdk/v20241113003/admin"
"go.mongodb.org/atlas-sdk/v20241113003/mockadmin"
@@ -28,7 +27,7 @@ var (
advancedClusters = []admin.ClusterDescription20240805{{StateName: conversion.StringPtr("NOT IDLE")}}
)
-func TestFlattenReplicationSpecs(t *testing.T) {
+func TestFlattenAdvancedReplicationSpecsOldShardingConfig(t *testing.T) {
var (
regionName = "EU_WEST_1"
providerName = "AWS"
@@ -36,7 +35,7 @@ func TestFlattenReplicationSpecs(t *testing.T) {
unexpectedID = "id2"
expectedZoneName = "z1"
unexpectedZoneName = "z2"
- regionConfigAdmin = []admin20240530.CloudRegionConfig{{
+ regionConfigAdmin = []admin.CloudRegionConfig20240805{{
ProviderName: &providerName,
RegionName: ®ionName,
}}
@@ -49,8 +48,8 @@ func TestFlattenReplicationSpecs(t *testing.T) {
"region_name": regionName,
"zone_name": unexpectedZoneName,
}
- apiSpecExpected = admin20240530.ReplicationSpec{Id: &expectedID, ZoneName: &expectedZoneName, RegionConfigs: ®ionConfigAdmin}
- apiSpecDifferent = admin20240530.ReplicationSpec{Id: &unexpectedID, ZoneName: &unexpectedZoneName, RegionConfigs: ®ionConfigAdmin}
+ apiSpecExpected = admin.ReplicationSpec20240805{Id: &expectedID, ZoneName: &expectedZoneName, RegionConfigs: ®ionConfigAdmin}
+ apiSpecDifferent = admin.ReplicationSpec20240805{Id: &unexpectedID, ZoneName: &unexpectedZoneName, RegionConfigs: ®ionConfigAdmin}
testSchema = map[string]*schema.Schema{
"project_id": {Type: schema.TypeString},
}
@@ -80,47 +79,56 @@ func TestFlattenReplicationSpecs(t *testing.T) {
}
)
testCases := map[string]struct {
- adminSpecs []admin20240530.ReplicationSpec
- tfInputSpecs []any
- expectedLen int
+ adminSpecs []admin.ReplicationSpec20240805
+ zoneNameToOldReplicationSpecMeta map[string]advancedcluster.OldShardConfigMeta
+ tfInputSpecs []any
+ expectedLen int
}{
"empty admin spec should return empty list": {
- []admin20240530.ReplicationSpec{},
+ []admin.ReplicationSpec20240805{},
+ map[string]advancedcluster.OldShardConfigMeta{},
[]any{tfSameIDSameZone},
0,
},
"existing id, should match admin": {
- []admin20240530.ReplicationSpec{apiSpecExpected},
+ []admin.ReplicationSpec20240805{apiSpecExpected},
+ map[string]advancedcluster.OldShardConfigMeta{expectedZoneName: {expectedID, 1}},
[]any{tfSameIDSameZone},
1,
},
"existing different id, should change to admin spec": {
- []admin20240530.ReplicationSpec{apiSpecExpected},
+ []admin.ReplicationSpec20240805{apiSpecExpected},
+ map[string]advancedcluster.OldShardConfigMeta{expectedZoneName: {expectedID, 1}},
[]any{tfdiffIDDiffZone},
1,
},
"missing id, should be set when zone_name matches": {
- []admin20240530.ReplicationSpec{apiSpecExpected},
+ []admin.ReplicationSpec20240805{apiSpecExpected},
+ map[string]advancedcluster.OldShardConfigMeta{expectedZoneName: {expectedID, 1}},
[]any{tfNoIDSameZone},
1,
},
"missing id and diff zone, should change to admin spec": {
- []admin20240530.ReplicationSpec{apiSpecExpected},
+ []admin.ReplicationSpec20240805{apiSpecExpected},
+ map[string]advancedcluster.OldShardConfigMeta{expectedZoneName: {expectedID, 1}},
[]any{tfNoIDDiffZone},
1,
},
"existing id, should match correct api spec using `id` and extra api spec added": {
- []admin20240530.ReplicationSpec{apiSpecDifferent, apiSpecExpected},
+ []admin.ReplicationSpec20240805{apiSpecDifferent, apiSpecExpected},
+ map[string]advancedcluster.OldShardConfigMeta{unexpectedZoneName: {unexpectedID, 1}, expectedZoneName: {expectedID, 1}},
[]any{tfSameIDSameZone},
2,
},
"missing id, should match correct api spec using `zone_name` and extra api spec added": {
- []admin20240530.ReplicationSpec{apiSpecDifferent, apiSpecExpected},
+ []admin.ReplicationSpec20240805{apiSpecDifferent, apiSpecExpected},
+ map[string]advancedcluster.OldShardConfigMeta{unexpectedZoneName: {unexpectedID, 1}, expectedZoneName: {expectedID, 1}},
[]any{tfNoIDSameZone},
2,
},
"two matching specs should be set to api specs": {
- []admin20240530.ReplicationSpec{apiSpecExpected, apiSpecDifferent},
+ []admin.ReplicationSpec20240805{apiSpecExpected, apiSpecDifferent},
+ map[string]advancedcluster.OldShardConfigMeta{expectedZoneName: {expectedID, 1}, unexpectedZoneName: {unexpectedID, 1}},
[]any{tfSameIDSameZone, tfdiffIDDiffZone},
2,
},
@@ -138,7 +146,7 @@ func TestFlattenReplicationSpecs(t *testing.T) {
}
resourceData := schema.TestResourceDataRaw(t, testSchema, map[string]any{"project_id": "p1"})
- tfOutputSpecs, err := advancedcluster.FlattenAdvancedReplicationSpecsOldSDK(context.Background(), tc.adminSpecs, nil, 0, tc.tfInputSpecs, resourceData, client)
+ tfOutputSpecs, err := advancedcluster.FlattenAdvancedReplicationSpecsOldShardingConfig(context.Background(), tc.adminSpecs, tc.zoneNameToOldReplicationSpecMeta, tc.tfInputSpecs, resourceData, client)
require.NoError(t, err)
assert.Len(t, tfOutputSpecs, tc.expectedLen)
@@ -451,13 +459,13 @@ func TestCheckRegionConfigsPriorityOrder(t *testing.T) {
for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
- configs := make([]admin20240805.CloudRegionConfig20240805, len(tc.priorities))
+ configs := make([]admin.CloudRegionConfig20240805, len(tc.priorities))
configsOld := make([]admin20240530.CloudRegionConfig, len(tc.priorities))
for i, priority := range tc.priorities {
configs[i].Priority = conversion.IntPtr(priority)
configsOld[i].Priority = conversion.IntPtr(priority)
}
- err := advancedcluster.CheckRegionConfigsPriorityOrder([]admin20240805.ReplicationSpec20240805{{RegionConfigs: &configs}})
+ err := advancedcluster.CheckRegionConfigsPriorityOrder([]admin.ReplicationSpec20240805{{RegionConfigs: &configs}})
assert.Equal(t, tc.errorExpected, err != nil)
err = advancedcluster.CheckRegionConfigsPriorityOrderOld([]admin20240530.ReplicationSpec{{RegionConfigs: &configsOld}})
assert.Equal(t, tc.errorExpected, err != nil)
diff --git a/internal/service/advancedcluster/model_sdk_version_conversion.go b/internal/service/advancedcluster/model_sdk_version_conversion.go
index ba934f7cea..33bcb463ee 100644
--- a/internal/service/advancedcluster/model_sdk_version_conversion.go
+++ b/internal/service/advancedcluster/model_sdk_version_conversion.go
@@ -12,7 +12,7 @@ import (
// - These functions must not contain any business logic.
// - All will be removed once we rely on a single API version.
-func convertTagsPtrToOldSDK(tags *[]admin20240805.ResourceTag) *[]admin20240530.ResourceTag {
+func convertTagsPtrToOldSDK(tags *[]admin.ResourceTag) *[]admin20240530.ResourceTag {
if tags == nil {
return nil
}
@@ -28,19 +28,7 @@ func convertTagsPtrToOldSDK(tags *[]admin20240805.ResourceTag) *[]admin20240530.
return &results
}
-func convertTagsToLatest(tags []admin20240530.ResourceTag) []admin.ResourceTag {
- results := make([]admin.ResourceTag, len(tags))
- for i := range len(tags) {
- tag := tags[i]
- results[i] = admin.ResourceTag{
- Key: tag.Key,
- Value: tag.Value,
- }
- }
- return results
-}
-
-func convertBiConnectToOldSDK(biconnector *admin20240805.BiConnector) *admin20240530.BiConnector {
+func convertBiConnectToOldSDK(biconnector *admin.BiConnector) *admin20240530.BiConnector {
if biconnector == nil {
return nil
}
@@ -50,75 +38,7 @@ func convertBiConnectToOldSDK(biconnector *admin20240805.BiConnector) *admin2024
}
}
-func convertBiConnectToLatest(biconnector *admin20240530.BiConnector) *admin.BiConnector {
- return &admin.BiConnector{
- Enabled: biconnector.Enabled,
- ReadPreference: biconnector.ReadPreference,
- }
-}
-
-func convertConnectionStringToLatest(connStrings *admin20240530.ClusterConnectionStrings) *admin.ClusterConnectionStrings {
- return &admin.ClusterConnectionStrings{
- AwsPrivateLink: connStrings.AwsPrivateLink,
- AwsPrivateLinkSrv: connStrings.AwsPrivateLinkSrv,
- Private: connStrings.Private,
- PrivateEndpoint: convertPrivateEndpointToLatest(connStrings.PrivateEndpoint),
- PrivateSrv: connStrings.PrivateSrv,
- Standard: connStrings.Standard,
- StandardSrv: connStrings.StandardSrv,
- }
-}
-
-func convertPrivateEndpointToLatest(privateEndpoints *[]admin20240530.ClusterDescriptionConnectionStringsPrivateEndpoint) *[]admin.ClusterDescriptionConnectionStringsPrivateEndpoint {
- if privateEndpoints == nil {
- return nil
- }
- peSlice := *privateEndpoints
- results := make([]admin.ClusterDescriptionConnectionStringsPrivateEndpoint, len(peSlice))
- for i := range len(peSlice) {
- pe := peSlice[i]
- results[i] = admin.ClusterDescriptionConnectionStringsPrivateEndpoint{
- ConnectionString: pe.ConnectionString,
- Endpoints: convertEndpointsToLatest(pe.Endpoints),
- SrvConnectionString: pe.SrvConnectionString,
- SrvShardOptimizedConnectionString: pe.SrvShardOptimizedConnectionString,
- Type: pe.Type,
- }
- }
- return &results
-}
-
-func convertEndpointsToLatest(privateEndpoints *[]admin20240530.ClusterDescriptionConnectionStringsPrivateEndpointEndpoint) *[]admin.ClusterDescriptionConnectionStringsPrivateEndpointEndpoint {
- if privateEndpoints == nil {
- return nil
- }
- peSlice := *privateEndpoints
- results := make([]admin.ClusterDescriptionConnectionStringsPrivateEndpointEndpoint, len(peSlice))
- for i := range len(peSlice) {
- pe := peSlice[i]
- results[i] = admin.ClusterDescriptionConnectionStringsPrivateEndpointEndpoint{
- EndpointId: pe.EndpointId,
- ProviderName: pe.ProviderName,
- Region: pe.Region,
- }
- }
- return &results
-}
-
-func convertLabelsToLatest(labels *[]admin20240530.ComponentLabel) *[]admin.ComponentLabel {
- labelSlice := *labels
- results := make([]admin.ComponentLabel, len(labelSlice))
- for i := range len(labelSlice) {
- label := labelSlice[i]
- results[i] = admin.ComponentLabel{
- Key: label.Key,
- Value: label.Value,
- }
- }
- return &results
-}
-
-func convertLabelSliceToOldSDK(slice []admin20240805.ComponentLabel, err diag.Diagnostics) ([]admin20240530.ComponentLabel, diag.Diagnostics) {
+func convertLabelSliceToOldSDK(slice []admin.ComponentLabel, err diag.Diagnostics) ([]admin20240530.ComponentLabel, diag.Diagnostics) {
if err != nil {
return nil, err
}
@@ -133,7 +53,7 @@ func convertLabelSliceToOldSDK(slice []admin20240805.ComponentLabel, err diag.Di
return results, nil
}
-func convertRegionConfigSliceToOldSDK(slice *[]admin20240805.CloudRegionConfig20240805) *[]admin20240530.CloudRegionConfig {
+func convertRegionConfigSliceToOldSDK(slice *[]admin.CloudRegionConfig20240805) *[]admin20240530.CloudRegionConfig {
if slice == nil {
return nil
}
@@ -156,7 +76,7 @@ func convertRegionConfigSliceToOldSDK(slice *[]admin20240805.CloudRegionConfig20
return &results
}
-func convertHardwareSpecToOldSDK(hwspec *admin20240805.HardwareSpec20240805) *admin20240530.HardwareSpec {
+func convertHardwareSpecToOldSDK(hwspec *admin.HardwareSpec20240805) *admin20240530.HardwareSpec {
if hwspec == nil {
return nil
}
@@ -168,7 +88,7 @@ func convertHardwareSpecToOldSDK(hwspec *admin20240805.HardwareSpec20240805) *ad
}
}
-func convertAdvancedAutoScalingSettingsToOldSDK(settings *admin20240805.AdvancedAutoScalingSettings) *admin20240530.AdvancedAutoScalingSettings {
+func convertAdvancedAutoScalingSettingsToOldSDK(settings *admin.AdvancedAutoScalingSettings) *admin20240530.AdvancedAutoScalingSettings {
if settings == nil {
return nil
}
@@ -178,7 +98,7 @@ func convertAdvancedAutoScalingSettingsToOldSDK(settings *admin20240805.Advanced
}
}
-func convertAdvancedComputeAutoScalingToOldSDK(settings *admin20240805.AdvancedComputeAutoScaling) *admin20240530.AdvancedComputeAutoScaling {
+func convertAdvancedComputeAutoScalingToOldSDK(settings *admin.AdvancedComputeAutoScaling) *admin20240530.AdvancedComputeAutoScaling {
if settings == nil {
return nil
}
@@ -190,7 +110,7 @@ func convertAdvancedComputeAutoScalingToOldSDK(settings *admin20240805.AdvancedC
}
}
-func convertDiskGBAutoScalingToOldSDK(settings *admin20240805.DiskGBAutoScaling) *admin20240530.DiskGBAutoScaling {
+func convertDiskGBAutoScalingToOldSDK(settings *admin.DiskGBAutoScaling) *admin20240530.DiskGBAutoScaling {
if settings == nil {
return nil
}
@@ -199,7 +119,7 @@ func convertDiskGBAutoScalingToOldSDK(settings *admin20240805.DiskGBAutoScaling)
}
}
-func convertDedicatedHardwareSpecToOldSDK(spec *admin20240805.DedicatedHardwareSpec20240805) *admin20240530.DedicatedHardwareSpec {
+func convertDedicatedHardwareSpecToOldSDK(spec *admin.DedicatedHardwareSpec20240805) *admin20240530.DedicatedHardwareSpec {
if spec == nil {
return nil
}
@@ -211,82 +131,156 @@ func convertDedicatedHardwareSpecToOldSDK(spec *admin20240805.DedicatedHardwareS
}
}
-func convertDedicatedHwSpecToLatest(spec *admin20240530.DedicatedHardwareSpec, rootDiskSizeGB float64) *admin.DedicatedHardwareSpec20240805 {
- if spec == nil {
+func ConvertClusterDescription20241023to20240805(clusterDescription *admin.ClusterDescription20240805) *admin20240805.ClusterDescription20240805 {
+ return &admin20240805.ClusterDescription20240805{
+ Name: clusterDescription.Name,
+ ClusterType: clusterDescription.ClusterType,
+ ReplicationSpecs: convertReplicationSpecs20241023to20240805(clusterDescription.ReplicationSpecs),
+ BackupEnabled: clusterDescription.BackupEnabled,
+ BiConnector: convertBiConnector20241023to20240805(clusterDescription.BiConnector),
+ EncryptionAtRestProvider: clusterDescription.EncryptionAtRestProvider,
+ Labels: convertLabels20241023to20240805(clusterDescription.Labels),
+ Tags: convertTag20241023to20240805(clusterDescription.Tags),
+ MongoDBMajorVersion: clusterDescription.MongoDBMajorVersion,
+ PitEnabled: clusterDescription.PitEnabled,
+ RootCertType: clusterDescription.RootCertType,
+ TerminationProtectionEnabled: clusterDescription.TerminationProtectionEnabled,
+ VersionReleaseSystem: clusterDescription.VersionReleaseSystem,
+ GlobalClusterSelfManagedSharding: clusterDescription.GlobalClusterSelfManagedSharding,
+ ReplicaSetScalingStrategy: clusterDescription.ReplicaSetScalingStrategy,
+ RedactClientLogData: clusterDescription.RedactClientLogData,
+ ConfigServerManagementMode: clusterDescription.ConfigServerManagementMode,
+ }
+}
+
+func convertReplicationSpecs20241023to20240805(replicationSpecs *[]admin.ReplicationSpec20240805) *[]admin20240805.ReplicationSpec20240805 {
+ if replicationSpecs == nil {
return nil
}
- return &admin.DedicatedHardwareSpec20240805{
- NodeCount: spec.NodeCount,
- DiskIOPS: spec.DiskIOPS,
- EbsVolumeType: spec.EbsVolumeType,
- InstanceSize: spec.InstanceSize,
- DiskSizeGB: &rootDiskSizeGB,
+ result := make([]admin20240805.ReplicationSpec20240805, len(*replicationSpecs))
+ for i, replicationSpec := range *replicationSpecs {
+ result[i] = admin20240805.ReplicationSpec20240805{
+ Id: replicationSpec.Id,
+ ZoneName: replicationSpec.ZoneName,
+ ZoneId: replicationSpec.ZoneId,
+ RegionConfigs: convertCloudRegionConfig20241023to20240805(replicationSpec.RegionConfigs),
+ }
}
+ return &result
}
-func convertAdvancedAutoScalingSettingsToLatest(settings *admin20240530.AdvancedAutoScalingSettings) *admin.AdvancedAutoScalingSettings {
- if settings == nil {
+func convertCloudRegionConfig20241023to20240805(cloudRegionConfig *[]admin.CloudRegionConfig20240805) *[]admin20240805.CloudRegionConfig20240805 {
+ if cloudRegionConfig == nil {
return nil
}
- return &admin.AdvancedAutoScalingSettings{
- Compute: convertAdvancedComputeAutoScalingToLatest(settings.Compute),
- DiskGB: convertDiskGBAutoScalingToLatest(settings.DiskGB),
+ result := make([]admin20240805.CloudRegionConfig20240805, len(*cloudRegionConfig))
+ for i, regionConfig := range *cloudRegionConfig {
+ result[i] = admin20240805.CloudRegionConfig20240805{
+ ProviderName: regionConfig.ProviderName,
+ RegionName: regionConfig.RegionName,
+ BackingProviderName: regionConfig.BackingProviderName,
+ Priority: regionConfig.Priority,
+ ElectableSpecs: convertHardwareSpec20241023to20240805(regionConfig.ElectableSpecs),
+ ReadOnlySpecs: convertDedicatedHardwareSpec20241023to20240805(regionConfig.ReadOnlySpecs),
+ AnalyticsSpecs: convertDedicatedHardwareSpec20241023to20240805(regionConfig.AnalyticsSpecs),
+ AutoScaling: convertAdvancedAutoScalingSettings20241023to20240805(regionConfig.AutoScaling),
+ AnalyticsAutoScaling: convertAdvancedAutoScalingSettings20241023to20240805(regionConfig.AnalyticsAutoScaling),
+ }
}
+ return &result
}
-func convertAdvancedComputeAutoScalingToLatest(settings *admin20240530.AdvancedComputeAutoScaling) *admin.AdvancedComputeAutoScaling {
- if settings == nil {
+func convertAdvancedAutoScalingSettings20241023to20240805(advancedAutoScalingSettings *admin.AdvancedAutoScalingSettings) *admin20240805.AdvancedAutoScalingSettings {
+ if advancedAutoScalingSettings == nil {
return nil
}
- return &admin.AdvancedComputeAutoScaling{
- Enabled: settings.Enabled,
- MaxInstanceSize: settings.MaxInstanceSize,
- MinInstanceSize: settings.MinInstanceSize,
- ScaleDownEnabled: settings.ScaleDownEnabled,
+ return &admin20240805.AdvancedAutoScalingSettings{
+ Compute: convertAdvancedComputeAutoScaling20241023to20240805(advancedAutoScalingSettings.Compute),
+ DiskGB: convertDiskGBAutoScaling20241023to20240805(advancedAutoScalingSettings.DiskGB),
}
}
-func convertDiskGBAutoScalingToLatest(settings *admin20240530.DiskGBAutoScaling) *admin.DiskGBAutoScaling {
- if settings == nil {
+func convertDiskGBAutoScaling20241023to20240805(diskGBAutoScaling *admin.DiskGBAutoScaling) *admin20240805.DiskGBAutoScaling {
+ if diskGBAutoScaling == nil {
return nil
}
- return &admin.DiskGBAutoScaling{
- Enabled: settings.Enabled,
+ return &admin20240805.DiskGBAutoScaling{
+ Enabled: diskGBAutoScaling.Enabled,
}
}
-func convertHardwareSpecToLatest(hwspec *admin20240530.HardwareSpec, rootDiskSizeGB float64) *admin.HardwareSpec20240805 {
- if hwspec == nil {
+func convertAdvancedComputeAutoScaling20241023to20240805(advancedComputeAutoScaling *admin.AdvancedComputeAutoScaling) *admin20240805.AdvancedComputeAutoScaling {
+ if advancedComputeAutoScaling == nil {
return nil
}
- return &admin.HardwareSpec20240805{
- DiskIOPS: hwspec.DiskIOPS,
- EbsVolumeType: hwspec.EbsVolumeType,
- InstanceSize: hwspec.InstanceSize,
- NodeCount: hwspec.NodeCount,
- DiskSizeGB: &rootDiskSizeGB,
+ return &admin20240805.AdvancedComputeAutoScaling{
+ Enabled: advancedComputeAutoScaling.Enabled,
+ MaxInstanceSize: advancedComputeAutoScaling.MaxInstanceSize,
+ MinInstanceSize: advancedComputeAutoScaling.MinInstanceSize,
+ ScaleDownEnabled: advancedComputeAutoScaling.ScaleDownEnabled,
}
}
-func convertRegionConfigSliceToLatest(slice *[]admin20240530.CloudRegionConfig, rootDiskSizeGB float64) *[]admin.CloudRegionConfig20240805 {
- if slice == nil {
+func convertHardwareSpec20241023to20240805(hardwareSpec *admin.HardwareSpec20240805) *admin20240805.HardwareSpec20240805 {
+ if hardwareSpec == nil {
return nil
}
- cloudRegionSlice := *slice
- results := make([]admin.CloudRegionConfig20240805, len(cloudRegionSlice))
- for i := range len(cloudRegionSlice) {
- cloudRegion := cloudRegionSlice[i]
- results[i] = admin.CloudRegionConfig20240805{
- ElectableSpecs: convertHardwareSpecToLatest(cloudRegion.ElectableSpecs, rootDiskSizeGB),
- Priority: cloudRegion.Priority,
- ProviderName: cloudRegion.ProviderName,
- RegionName: cloudRegion.RegionName,
- AnalyticsAutoScaling: convertAdvancedAutoScalingSettingsToLatest(cloudRegion.AnalyticsAutoScaling),
- AnalyticsSpecs: convertDedicatedHwSpecToLatest(cloudRegion.AnalyticsSpecs, rootDiskSizeGB),
- AutoScaling: convertAdvancedAutoScalingSettingsToLatest(cloudRegion.AutoScaling),
- ReadOnlySpecs: convertDedicatedHwSpecToLatest(cloudRegion.ReadOnlySpecs, rootDiskSizeGB),
- BackingProviderName: cloudRegion.BackingProviderName,
+ return &admin20240805.HardwareSpec20240805{
+ DiskSizeGB: hardwareSpec.DiskSizeGB,
+ NodeCount: hardwareSpec.NodeCount,
+ DiskIOPS: hardwareSpec.DiskIOPS,
+ EbsVolumeType: hardwareSpec.EbsVolumeType,
+ InstanceSize: hardwareSpec.InstanceSize,
+ }
+}
+
+func convertDedicatedHardwareSpec20241023to20240805(hardwareSpec *admin.DedicatedHardwareSpec20240805) *admin20240805.DedicatedHardwareSpec20240805 {
+ if hardwareSpec == nil {
+ return nil
+ }
+ return &admin20240805.DedicatedHardwareSpec20240805{
+ DiskSizeGB: hardwareSpec.DiskSizeGB,
+ NodeCount: hardwareSpec.NodeCount,
+ DiskIOPS: hardwareSpec.DiskIOPS,
+ EbsVolumeType: hardwareSpec.EbsVolumeType,
+ InstanceSize: hardwareSpec.InstanceSize,
+ }
+}
+
+func convertBiConnector20241023to20240805(biConnector *admin.BiConnector) *admin20240805.BiConnector {
+ if biConnector == nil {
+ return nil
+ }
+ return &admin20240805.BiConnector{
+ ReadPreference: biConnector.ReadPreference,
+ Enabled: biConnector.Enabled,
+ }
+}
+
+func convertLabels20241023to20240805(labels *[]admin.ComponentLabel) *[]admin20240805.ComponentLabel {
+ if labels == nil {
+ return &[]admin20240805.ComponentLabel{}
+ }
+ result := make([]admin20240805.ComponentLabel, len(*labels))
+ for i, label := range *labels {
+ result[i] = admin20240805.ComponentLabel{
+ Key: label.Key,
+ Value: label.Value,
}
}
- return &results
+ return &result
+}
+
+func convertTag20241023to20240805(tags *[]admin.ResourceTag) *[]admin20240805.ResourceTag {
+ if tags == nil {
+ return &[]admin20240805.ResourceTag{}
+ }
+ result := make([]admin20240805.ResourceTag, len(*tags))
+ for i, tag := range *tags {
+ result[i] = admin20240805.ResourceTag{
+ Key: tag.Key,
+ Value: tag.Value,
+ }
+ }
+ return &result
}
diff --git a/internal/service/advancedcluster/model_sdk_version_conversion_test.go b/internal/service/advancedcluster/model_sdk_version_conversion_test.go
new file mode 100644
index 0000000000..d90b3ac499
--- /dev/null
+++ b/internal/service/advancedcluster/model_sdk_version_conversion_test.go
@@ -0,0 +1,193 @@
+package advancedcluster_test
+
+import (
+ "testing"
+
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
+ "github.com/stretchr/testify/assert"
+ admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
+ "go.mongodb.org/atlas-sdk/v20241113003/admin"
+)
+
+func TestConvertClusterDescription20241023to20240805(t *testing.T) {
+ var (
+ clusterName = "clusterName"
+ clusterType = "REPLICASET"
+ earProvider = "AWS"
+ booleanValue = true
+ mongoDBMajorVersion = "7.0"
+ rootCertType = "rootCertType"
+ replicaSetScalingStrategy = "WORKLOAD_TYPE"
+ configServerManagementMode = "ATLAS_MANAGED"
+ readPreference = "primary"
+ zoneName = "z1"
+ id = "id1"
+ regionConfigProvider = "AWS"
+ region = "EU_WEST_1"
+ priority = 7
+ instanceSize = "M10"
+ nodeCount = 3
+ diskSizeGB = 30.3
+ ebsVolumeType = "STANDARD"
+ diskIOPS = 100
+ )
+ testCases := []struct {
+ input *admin.ClusterDescription20240805
+ expectedOutput *admin20240805.ClusterDescription20240805
+ name string
+ }{
+ {
+ name: "Converts cluster description from 20241023 to 20240805",
+ input: &admin.ClusterDescription20240805{
+ Name: conversion.StringPtr(clusterName),
+ ClusterType: conversion.StringPtr(clusterType),
+ ReplicationSpecs: &[]admin.ReplicationSpec20240805{
+ {
+ Id: conversion.StringPtr(id),
+ ZoneName: conversion.StringPtr(zoneName),
+ RegionConfigs: &[]admin.CloudRegionConfig20240805{
+ {
+ ProviderName: conversion.StringPtr(regionConfigProvider),
+ RegionName: conversion.StringPtr(region),
+ BackingProviderName: conversion.StringPtr(regionConfigProvider),
+ Priority: conversion.IntPtr(priority),
+ AnalyticsSpecs: &admin.DedicatedHardwareSpec20240805{
+ InstanceSize: conversion.StringPtr(instanceSize),
+ NodeCount: conversion.IntPtr(nodeCount),
+ DiskSizeGB: conversion.Pointer(diskSizeGB),
+ EbsVolumeType: conversion.StringPtr(ebsVolumeType),
+ DiskIOPS: conversion.IntPtr(diskIOPS),
+ },
+ ElectableSpecs: &admin.HardwareSpec20240805{
+ InstanceSize: conversion.StringPtr(instanceSize),
+ NodeCount: conversion.IntPtr(nodeCount),
+ DiskSizeGB: conversion.Pointer(diskSizeGB),
+ EbsVolumeType: conversion.StringPtr(ebsVolumeType),
+ DiskIOPS: conversion.IntPtr(diskIOPS),
+ },
+ AutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
+ Enabled: conversion.Pointer(booleanValue),
+ MaxInstanceSize: conversion.Pointer(instanceSize),
+ MinInstanceSize: conversion.Pointer(instanceSize),
+ ScaleDownEnabled: conversion.Pointer(booleanValue),
+ },
+ DiskGB: &admin.DiskGBAutoScaling{
+ Enabled: conversion.Pointer(booleanValue),
+ },
+ },
+ },
+ },
+ },
+ },
+ BackupEnabled: conversion.Pointer(booleanValue),
+ BiConnector: &admin.BiConnector{
+ Enabled: conversion.Pointer(booleanValue),
+ ReadPreference: conversion.StringPtr(readPreference),
+ },
+ EncryptionAtRestProvider: conversion.StringPtr(earProvider),
+ Labels: &[]admin.ComponentLabel{
+ {Key: conversion.StringPtr("key1"), Value: conversion.StringPtr("value1")},
+ {Key: conversion.StringPtr("key2"), Value: conversion.StringPtr("value2")},
+ },
+ Tags: &[]admin.ResourceTag{
+ {Key: "key1", Value: "value1"},
+ {Key: "key2", Value: "value2"},
+ },
+ MongoDBMajorVersion: conversion.StringPtr(mongoDBMajorVersion),
+ PitEnabled: conversion.Pointer(booleanValue),
+ RootCertType: conversion.StringPtr(rootCertType),
+ TerminationProtectionEnabled: conversion.Pointer(booleanValue),
+ VersionReleaseSystem: conversion.StringPtr(""),
+ GlobalClusterSelfManagedSharding: conversion.Pointer(booleanValue),
+ ReplicaSetScalingStrategy: conversion.StringPtr(replicaSetScalingStrategy),
+ RedactClientLogData: conversion.Pointer(booleanValue),
+ ConfigServerManagementMode: conversion.StringPtr(configServerManagementMode),
+ },
+ expectedOutput: &admin20240805.ClusterDescription20240805{
+ Name: conversion.StringPtr(clusterName),
+ ClusterType: conversion.StringPtr(clusterType),
+ ReplicationSpecs: &[]admin20240805.ReplicationSpec20240805{
+ {
+ Id: conversion.StringPtr(id),
+ ZoneName: conversion.StringPtr(zoneName),
+ RegionConfigs: &[]admin20240805.CloudRegionConfig20240805{
+ {
+ ProviderName: conversion.StringPtr(regionConfigProvider),
+ RegionName: conversion.StringPtr(region),
+ BackingProviderName: conversion.StringPtr(regionConfigProvider),
+ Priority: conversion.IntPtr(priority),
+ AnalyticsSpecs: &admin20240805.DedicatedHardwareSpec20240805{
+ InstanceSize: conversion.StringPtr(instanceSize),
+ NodeCount: conversion.IntPtr(nodeCount),
+ DiskSizeGB: conversion.Pointer(diskSizeGB),
+ EbsVolumeType: conversion.StringPtr(ebsVolumeType),
+ DiskIOPS: conversion.IntPtr(diskIOPS),
+ },
+ ElectableSpecs: &admin20240805.HardwareSpec20240805{
+ InstanceSize: conversion.StringPtr(instanceSize),
+ NodeCount: conversion.IntPtr(nodeCount),
+ DiskSizeGB: conversion.Pointer(diskSizeGB),
+ EbsVolumeType: conversion.StringPtr(ebsVolumeType),
+ DiskIOPS: conversion.IntPtr(diskIOPS),
+ },
+ AutoScaling: &admin20240805.AdvancedAutoScalingSettings{
+ Compute: &admin20240805.AdvancedComputeAutoScaling{
+ Enabled: conversion.Pointer(booleanValue),
+ MaxInstanceSize: conversion.Pointer(instanceSize),
+ MinInstanceSize: conversion.Pointer(instanceSize),
+ ScaleDownEnabled: conversion.Pointer(booleanValue),
+ },
+ DiskGB: &admin20240805.DiskGBAutoScaling{
+ Enabled: conversion.Pointer(booleanValue),
+ },
+ },
+ },
+ },
+ },
+ },
+ BackupEnabled: conversion.Pointer(booleanValue),
+ BiConnector: &admin20240805.BiConnector{
+ Enabled: conversion.Pointer(booleanValue),
+ ReadPreference: conversion.StringPtr(readPreference),
+ },
+ EncryptionAtRestProvider: conversion.StringPtr(earProvider),
+ Labels: &[]admin20240805.ComponentLabel{
+ {Key: conversion.StringPtr("key1"), Value: conversion.StringPtr("value1")},
+ {Key: conversion.StringPtr("key2"), Value: conversion.StringPtr("value2")},
+ },
+ Tags: &[]admin20240805.ResourceTag{
+ {Key: "key1", Value: "value1"},
+ {Key: "key2", Value: "value2"},
+ },
+ MongoDBMajorVersion: conversion.StringPtr(mongoDBMajorVersion),
+ PitEnabled: conversion.Pointer(booleanValue),
+ RootCertType: conversion.StringPtr(rootCertType),
+ TerminationProtectionEnabled: conversion.Pointer(booleanValue),
+ VersionReleaseSystem: conversion.StringPtr(""),
+ GlobalClusterSelfManagedSharding: conversion.Pointer(booleanValue),
+ ReplicaSetScalingStrategy: conversion.StringPtr(replicaSetScalingStrategy),
+ RedactClientLogData: conversion.Pointer(booleanValue),
+ ConfigServerManagementMode: conversion.StringPtr(configServerManagementMode),
+ },
+ },
+ {
+ name: "Converts cluster description from 20241023 to 20240805 with nil values",
+ input: &admin.ClusterDescription20240805{},
+ expectedOutput: &admin20240805.ClusterDescription20240805{
+ ReplicationSpecs: nil,
+ BiConnector: nil,
+ Labels: &[]admin20240805.ComponentLabel{},
+ Tags: &[]admin20240805.ResourceTag{},
+ },
+ },
+ }
+
+ for _, tc := range testCases {
+ t.Run(tc.name, func(t *testing.T) {
+ result := advancedcluster.ConvertClusterDescription20241023to20240805(tc.input)
+ assert.Equal(t, tc.expectedOutput, result)
+ })
+ }
+}
diff --git a/internal/service/advancedcluster/resource_advanced_cluster.go b/internal/service/advancedcluster/resource_advanced_cluster.go
index cd578bd8dc..94acd87062 100644
--- a/internal/service/advancedcluster/resource_advanced_cluster.go
+++ b/internal/service/advancedcluster/resource_advanced_cluster.go
@@ -36,13 +36,14 @@ const (
errorConfigUpdate = "error updating advanced cluster configuration options (%s): %s"
errorConfigRead = "error reading advanced cluster configuration options (%s): %s"
ErrorClusterSetting = "error setting `%s` for MongoDB Cluster (%s): %s"
- ErrorAdvancedConfRead = "error reading Advanced Configuration Option form MongoDB Cluster (%s): %s"
+ ErrorAdvancedConfRead = "error reading Advanced Configuration Option %s for MongoDB Cluster (%s): %s"
ErrorClusterAdvancedSetting = "error setting `%s` for MongoDB ClusterAdvanced (%s): %s"
ErrorAdvancedClusterListStatus = "error awaiting MongoDB ClusterAdvanced List IDLE: %s"
ErrorOperationNotPermitted = "error operation not permitted"
ErrorDefaultMaxTimeMinVersion = "default_max_time_ms can not be set for mongo_db_major_version lower than 8.0"
ignoreLabel = "Infrastructure Tool"
DeprecationOldSchemaAction = "Please refer to our examples, documentation, and 1.18.0 migration guide for more details at https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/1.18.0-upgrade-guide.html.markdown"
+ V20240530 = "(v20240530)"
)
var DeprecationMsgOldSchema = fmt.Sprintf("%s %s", constant.DeprecationParam, DeprecationOldSchemaAction)
@@ -434,7 +435,7 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
rootDiskSizeGB = conversion.Pointer(v.(float64))
}
- params := &admin20240805.ClusterDescription20240805{
+ params := &admin.ClusterDescription20240805{
Name: conversion.StringPtr(cast.ToString(d.Get("name"))),
ClusterType: conversion.StringPtr(cast.ToString(d.Get("cluster_type"))),
ReplicationSpecs: expandAdvancedReplicationSpecs(d.Get("replication_specs").([]any), rootDiskSizeGB),
@@ -460,7 +461,7 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
}
if _, ok := d.GetOk("tags"); ok {
- params.Tags = conversion.ExpandTagsFromSetSchemaV220240805(d)
+ params.Tags = conversion.ExpandTagsFromSetSchema(d)
}
if v, ok := d.GetOk("mongo_db_major_version"); ok {
params.MongoDBMajorVersion = conversion.StringPtr(FormatMongoDBMajorVersion(v.(string)))
@@ -505,10 +506,27 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
if err := CheckRegionConfigsPriorityOrder(params.GetReplicationSpecs()); err != nil {
return diag.FromErr(err)
}
- // cannot call latest API (2024-10-23 or newer) as it can enable ISS autoscaling
- cluster, _, err := connV220240805.ClustersApi.CreateCluster(ctx, projectID, params).Execute()
- if err != nil {
- return diag.FromErr(fmt.Errorf(errorCreate, err))
+
+ var clusterName string
+ var clusterID string
+ var err error
+ // With old sharding config we call older API (2024-08-05) to avoid cluster having asymmetric autoscaling mode. Old sharding config can only represent symmetric clusters.
+ if isUsingOldShardingConfiguration(d) {
+ var cluster20240805 *admin20240805.ClusterDescription20240805
+ cluster20240805, _, err = connV220240805.ClustersApi.CreateCluster(ctx, projectID, ConvertClusterDescription20241023to20240805(params)).Execute()
+ if err != nil {
+ return diag.FromErr(fmt.Errorf(errorCreate, err))
+ }
+ clusterName = cluster20240805.GetName()
+ clusterID = cluster20240805.GetId()
+ } else {
+ var cluster *admin.ClusterDescription20240805
+ cluster, _, err = connV2.ClustersApi.CreateCluster(ctx, projectID, params).Execute()
+ if err != nil {
+ return diag.FromErr(fmt.Errorf(errorCreate, err))
+ }
+ clusterName = cluster.GetName()
+ clusterID = cluster.GetId()
}
timeout := d.Timeout(schema.TimeoutCreate)
@@ -521,13 +539,13 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
if ac, ok := d.GetOk("advanced_configuration"); ok {
if aclist, ok := ac.([]any); ok && len(aclist) > 0 {
params20240530, params := expandProcessArgs(d, aclist[0].(map[string]any), params.MongoDBMajorVersion)
- _, _, err = connV220240530.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, cluster.GetName(), ¶ms20240530).Execute()
+ _, _, err := connV220240530.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, clusterName, ¶ms20240530).Execute()
if err != nil {
- return diag.FromErr(fmt.Errorf(errorConfigUpdate, cluster.GetName(), err))
+ return diag.FromErr(fmt.Errorf(errorConfigUpdate, clusterName, err))
}
- _, _, err = connV2.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, cluster.GetName(), ¶ms).Execute()
+ _, _, err = connV2.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, clusterName, ¶ms).Execute()
if err != nil {
- return diag.FromErr(fmt.Errorf(errorConfigUpdate, cluster.GetName(), err))
+ return diag.FromErr(fmt.Errorf(errorConfigUpdate, clusterName, err))
}
}
}
@@ -545,7 +563,7 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
}
if pinnedFCVBlock, _ := d.Get("pinned_fcv").([]any); len(pinnedFCVBlock) > 0 {
- if diags := PinFCV(ctx, connV2, projectID, cluster.GetName(), pinnedFCVBlock[0]); diags.HasError() {
+ if diags := PinFCV(ctx, connV2, projectID, clusterName, pinnedFCVBlock[0]); diags.HasError() {
return diags
}
waitForChanges = true
@@ -558,9 +576,9 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
}
d.SetId(conversion.EncodeStateID(map[string]string{
- "cluster_id": cluster.GetId(),
+ "cluster_id": clusterID,
"project_id": projectID,
- "cluster_name": cluster.GetName(),
+ "cluster_name": clusterName,
}))
return resourceRead(ctx, d, meta)
@@ -584,72 +602,40 @@ func resourceRead(ctx context.Context, d *schema.ResourceData, meta any) diag.Di
projectID := ids["project_id"]
clusterName := ids["cluster_name"]
- var clusterResp *admin.ClusterDescription20240805
-
var replicationSpecs []map[string]any
- if isUsingOldAPISchemaStructure(d) {
- clusterOldSDK, resp, err := connV220240530.ClustersApi.GetCluster(ctx, projectID, clusterName).Execute()
- if err != nil {
- if resp != nil && resp.StatusCode == http.StatusNotFound {
- d.SetId("")
- return nil
- }
- return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
- }
- if err := d.Set("disk_size_gb", clusterOldSDK.GetDiskSizeGB()); err != nil {
- return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "disk_size_gb", clusterName, err))
- }
- cluster, resp, err := connV2.ClustersApi.GetCluster(ctx, projectID, clusterName).Execute()
- if err != nil {
- if resp != nil && resp.StatusCode == http.StatusNotFound {
- d.SetId("")
- return nil
- }
- return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
+ cluster, resp, err := connV2.ClustersApi.GetCluster(ctx, projectID, clusterName).Execute()
+ if err != nil {
+ if resp != nil && resp.StatusCode == http.StatusNotFound {
+ d.SetId("")
+ return nil
}
+ return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
+ }
- zoneNameToZoneIDs, err := getZoneIDsFromNewAPI(cluster)
- if err != nil {
+ zoneNameToOldReplicationSpecMeta, err := GetReplicationSpecAttributesFromOldAPI(ctx, projectID, clusterName, connV220240530.ClustersApi)
+ if err != nil {
+ if apiError, ok := admin20240530.AsError(err); !ok {
return diag.FromErr(err)
+ } else if apiError.GetErrorCode() != "ASYMMETRIC_SHARD_UNSUPPORTED" || (apiError.GetErrorCode() == "ASYMMETRIC_SHARD_UNSUPPORTED" && isUsingOldShardingConfiguration(d)) {
+ return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
}
-
- replicationSpecs, err = FlattenAdvancedReplicationSpecsOldSDK(ctx, clusterOldSDK.GetReplicationSpecs(), zoneNameToZoneIDs, clusterOldSDK.GetDiskSizeGB(), d.Get("replication_specs").([]any), d, connV2)
+ }
+ // if config uses old sharding configuration we call latest API but group replications specs from the same zone and define num_shards attribute
+ if isUsingOldShardingConfiguration(d) {
+ replicationSpecs, err = FlattenAdvancedReplicationSpecsOldShardingConfig(ctx, cluster.GetReplicationSpecs(), zoneNameToOldReplicationSpecMeta, d.Get("replication_specs").([]any), d, connV2)
if err != nil {
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "replication_specs", clusterName, err))
}
-
- clusterResp = cluster
} else {
- cluster, resp, err := connV2.ClustersApi.GetCluster(ctx, projectID, clusterName).Execute()
- if err != nil {
- if resp != nil && resp.StatusCode == http.StatusNotFound {
- d.SetId("")
- return nil
- }
- return diag.FromErr(fmt.Errorf(errorRead, clusterName, err))
- }
-
- // root disk_size_gb defined for backwards compatibility avoiding breaking changes
- if err := d.Set("disk_size_gb", GetDiskSizeGBFromReplicationSpec(cluster)); err != nil {
- return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "disk_size_gb", clusterName, err))
- }
-
- zoneNameToOldReplicationSpecIDs, err := getReplicationSpecIDsFromOldAPI(ctx, projectID, clusterName, connV220240530)
- if err != nil {
- return diag.FromErr(err)
- }
-
- replicationSpecs, err = flattenAdvancedReplicationSpecs(ctx, cluster.GetReplicationSpecs(), zoneNameToOldReplicationSpecIDs, d.Get("replication_specs").([]any), d, connV2)
+ replicationSpecs, err = flattenAdvancedReplicationSpecs(ctx, cluster.GetReplicationSpecs(), zoneNameToOldReplicationSpecMeta, d.Get("replication_specs").([]any), d, connV2)
if err != nil {
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "replication_specs", clusterName, err))
}
-
- clusterResp = cluster
}
- warning := WarningIfFCVExpiredOrUnpinnedExternally(d, clusterResp) // has to be called before pinned_fcv value is updated in ResourceData to know prior state value
- diags := setRootFields(d, clusterResp, true)
+ warning := WarningIfFCVExpiredOrUnpinnedExternally(d, cluster) // has to be called before pinned_fcv value is updated in ResourceData to know prior state value
+ diags := setRootFields(d, cluster, true)
if diags.HasError() {
return diags
}
@@ -674,31 +660,17 @@ func resourceRead(ctx context.Context, d *schema.ResourceData, meta any) diag.Di
return warning
}
-// getReplicationSpecIDsFromOldAPI returns the id values of replication specs coming from old API. This is used to populate old replication_specs.*.id attribute avoiding breaking changes.
-// In the old API each replications spec has a 1:1 relation with each zone, so ids are returned in a map from zoneName to id.
-func getReplicationSpecIDsFromOldAPI(ctx context.Context, projectID, clusterName string, connV220240530 *admin20240530.APIClient) (map[string]string, error) {
- clusterOldAPI, _, err := connV220240530.ClustersApi.GetCluster(ctx, projectID, clusterName).Execute()
- if apiError, ok := admin20240530.AsError(err); ok {
- if apiError.GetErrorCode() == "ASYMMETRIC_SHARD_UNSUPPORTED" {
- return nil, nil // if its the case of an asymmetric shard an error is expected in old API, replication_specs.*.id attribute will not be populated
- }
- readErrorMsg := "error reading advanced cluster with 2023-02-01 API (%s): %s"
- return nil, fmt.Errorf(readErrorMsg, clusterName, err)
+// GetReplicationSpecAttributesFromOldAPI returns the id and num shard values of replication specs coming from old API. This is used to populate replication_specs.*.id and replication_specs.*.num_shard attributes for old sharding confirgurations.
+// In the old API (2023-02-01), each replications spec has a 1:1 relation with each zone, so ids and num shards are stored in a struct oldShardConfigMeta and are returned in a map from zoneName to oldShardConfigMeta.
+func GetReplicationSpecAttributesFromOldAPI(ctx context.Context, projectID, clusterName string, client20240530 admin20240530.ClustersApi) (map[string]OldShardConfigMeta, error) {
+ clusterOldAPI, _, err := client20240530.GetCluster(ctx, projectID, clusterName).Execute()
+ if err != nil {
+ return nil, err
}
specs := clusterOldAPI.GetReplicationSpecs()
- result := make(map[string]string, len(specs))
- for _, spec := range specs {
- result[spec.GetZoneName()] = spec.GetId()
- }
- return result, nil
-}
-
-// getZoneIDsFromNewAPI returns the zone id values of replication specs coming from new API. This is used to populate zone_id when old API is called in the read.
-func getZoneIDsFromNewAPI(cluster *admin.ClusterDescription20240805) (map[string]string, error) {
- specs := cluster.GetReplicationSpecs()
- result := make(map[string]string, len(specs))
+ result := make(map[string]OldShardConfigMeta, len(specs))
for _, spec := range specs {
- result[spec.GetZoneName()] = spec.GetZoneId()
+ result[spec.GetZoneName()] = OldShardConfigMeta{spec.GetId(), spec.GetNumShards()}
}
return result, nil
}
@@ -736,6 +708,11 @@ func setRootFields(d *schema.ResourceData, cluster *admin.ClusterDescription2024
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "create_date", clusterName, err))
}
+ // root disk_size_gb defined for backwards compatibility avoiding breaking changes
+ if err := d.Set("disk_size_gb", GetDiskSizeGBFromReplicationSpec(cluster)); err != nil {
+ return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "disk_size_gb", clusterName, err))
+ }
+
if err := d.Set("encryption_at_rest_provider", cluster.GetEncryptionAtRestProvider()); err != nil {
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "encryption_at_rest_provider", clusterName, err))
}
@@ -788,12 +765,9 @@ func setRootFields(d *schema.ResourceData, cluster *admin.ClusterDescription2024
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "global_cluster_self_managed_sharding", clusterName, err))
}
- // fields not supported in connV220240530 SDK (mapping to 2023-02-01 API)
-
if err := d.Set("replica_set_scaling_strategy", cluster.GetReplicaSetScalingStrategy()); err != nil {
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "replica_set_scaling_strategy", clusterName, err))
}
-
if err := d.Set("redact_client_log_data", cluster.GetRedactClientLogData()); err != nil {
return diag.FromErr(fmt.Errorf(ErrorClusterAdvancedSetting, "redact_client_log_data", clusterName, err))
}
@@ -841,8 +815,8 @@ func WarningIfFCVExpiredOrUnpinnedExternally(d *schema.ResourceData, cluster *ad
return nil
}
-// For both read and update operations if old sharding schema structure is used (at least one replication spec with numShards > 1) we continue to invoke the old API
-func isUsingOldAPISchemaStructure(d *schema.ResourceData) bool {
+// isUsingOldShardingConfiguration is identified if at least one replication spec defines num_shards > 1. This legacy form is from 2023-02-01 API and can only represent symmetric sharded clusters.
+func isUsingOldShardingConfiguration(d *schema.ResourceData) bool {
tfList := d.Get("replication_specs").([]any)
for _, tfMapRaw := range tfList {
tfMap, ok := tfMapRaw.(map[string]any)
@@ -887,7 +861,6 @@ func resourceUpgrade(ctx context.Context, upgradeRequest *admin.LegacyAtlasTenan
func resourceUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics {
connV220240530 := meta.(*config.MongoDBClient).AtlasV220240530
- connV220240805 := meta.(*config.MongoDBClient).AtlasV220240805
connV2 := meta.(*config.MongoDBClient).AtlasV2
ids := conversion.DecodeStateID(d.Id())
projectID := ids["project_id"]
@@ -904,7 +877,8 @@ func resourceUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.
return diags
}
- if isUsingOldAPISchemaStructure(d) {
+ // With old sharding config we call older API (2023-02-01) to avoid cluster having asymmetric autoscaling mode. Old sharding config can only represent symmetric clusters.
+ if isUsingOldShardingConfiguration(d) {
req, diags := updateRequestOldAPI(d, clusterName)
if diags != nil {
return diags
@@ -921,7 +895,7 @@ func resourceUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.
waitOnUpdate = true
}
if d.HasChange("replica_set_scaling_strategy") || d.HasChange("redact_client_log_data") || d.HasChange("config_server_management_mode") {
- request := new(admin20240805.ClusterDescription20240805)
+ request := new(admin.ClusterDescription20240805)
if d.HasChange("replica_set_scaling_strategy") {
request.ReplicaSetScalingStrategy = conversion.Pointer(d.Get("replica_set_scaling_strategy").(string))
}
@@ -931,8 +905,8 @@ func resourceUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.
if d.HasChange("config_server_management_mode") {
request.ConfigServerManagementMode = conversion.StringPtr(d.Get("config_server_management_mode").(string))
}
- // can call latest API (2024-10-23 or newer) as autoscaling property is not specified, using older version just for caution until iss autoscaling epic is done
- if _, _, err := connV220240805.ClustersApi.UpdateCluster(ctx, projectID, clusterName, request).Execute(); err != nil {
+ // can call latest API (2024-10-23 or newer) as replications specs (with nested autoscaling property) is not specified
+ if _, _, err := connV2.ClustersApi.UpdateCluster(ctx, projectID, clusterName, request).Execute(); err != nil {
return diag.FromErr(fmt.Errorf(errorUpdate, clusterName, err))
}
waitOnUpdate = true
@@ -952,8 +926,7 @@ func resourceUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.
if err := CheckRegionConfigsPriorityOrder(req.GetReplicationSpecs()); err != nil {
return diag.FromErr(err)
}
- // cannot call latest API (2024-10-23 or newer) as it can enable ISS autoscaling
- if _, _, err := connV220240805.ClustersApi.UpdateCluster(ctx, projectID, clusterName, req).Execute(); err != nil {
+ if _, _, err := connV2.ClustersApi.UpdateCluster(ctx, projectID, clusterName, req).Execute(); err != nil {
return diag.FromErr(fmt.Errorf(errorUpdate, clusterName, err))
}
if err := waitForUpdateToFinish(ctx, connV2, projectID, clusterName, timeout); err != nil {
@@ -987,11 +960,10 @@ func resourceUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.
}
if d.Get("paused").(bool) {
- clusterRequest := &admin20240805.ClusterDescription20240805{
+ clusterRequest := &admin.ClusterDescription20240805{
Paused: conversion.Pointer(true),
}
- // can call latest API (2024-10-23 or newer) as autoscaling property is not specified, using older version just for caution until iss autoscaling epic is done
- if _, _, err := connV220240805.ClustersApi.UpdateCluster(ctx, projectID, clusterName, clusterRequest).Execute(); err != nil {
+ if _, _, err := connV2.ClustersApi.UpdateCluster(ctx, projectID, clusterName, clusterRequest).Execute(); err != nil {
return diag.FromErr(fmt.Errorf(errorUpdate, clusterName, err))
}
if err := waitForUpdateToFinish(ctx, connV2, projectID, clusterName, timeout); err != nil {
@@ -1041,8 +1013,8 @@ func PinFCV(ctx context.Context, connV2 *admin.APIClient, projectID, clusterName
return nil
}
-func updateRequest(ctx context.Context, d *schema.ResourceData, projectID, clusterName string, connV2 *admin.APIClient) (*admin20240805.ClusterDescription20240805, diag.Diagnostics) {
- cluster := new(admin20240805.ClusterDescription20240805)
+func updateRequest(ctx context.Context, d *schema.ResourceData, projectID, clusterName string, connV2 *admin.APIClient) (*admin.ClusterDescription20240805, diag.Diagnostics) {
+ cluster := new(admin.ClusterDescription20240805)
if d.HasChange("replication_specs") || d.HasChange("disk_size_gb") {
var updatedDiskSizeGB *float64
@@ -1089,7 +1061,7 @@ func updateRequest(ctx context.Context, d *schema.ResourceData, projectID, clust
}
if d.HasChange("tags") {
- cluster.Tags = conversion.ExpandTagsFromSetSchemaV220240805(d)
+ cluster.Tags = conversion.ExpandTagsFromSetSchema(d)
}
if d.HasChange("mongo_db_major_version") {
@@ -1183,7 +1155,7 @@ func updateRequestOldAPI(d *schema.ResourceData, clusterName string) (*admin2024
}
if d.HasChange("tags") {
- cluster.Tags = convertTagsPtrToOldSDK(conversion.ExpandTagsFromSetSchemaV220240805(d))
+ cluster.Tags = convertTagsPtrToOldSDK(conversion.ExpandTagsFromSetSchema(d))
}
if d.HasChange("mongo_db_major_version") {
diff --git a/internal/service/advancedcluster/resource_advanced_cluster_migration_test.go b/internal/service/advancedcluster/resource_advanced_cluster_migration_test.go
index de6aa266ad..9fbfc16488 100644
--- a/internal/service/advancedcluster/resource_advanced_cluster_migration_test.go
+++ b/internal/service/advancedcluster/resource_advanced_cluster_migration_test.go
@@ -27,26 +27,20 @@ func TestMigAdvancedCluster_replicaSetMultiCloud(t *testing.T) {
}
func TestMigAdvancedCluster_singleShardedMultiCloud(t *testing.T) {
+ acc.SkipIfAdvancedClusterV2Schema(t) // AttributeName("advanced_configuration"): invalid JSON, expected "{", got "["
testCase := singleShardedMultiCloudTestCase(t, false)
mig.CreateAndRunTest(t, &testCase)
}
func TestMigAdvancedCluster_symmetricGeoShardedOldSchema(t *testing.T) {
+ acc.SkipIfAdvancedClusterV2Schema(t) // AttributeName("advanced_configuration"): invalid JSON, expected "{", got "["
testCase := symmetricGeoShardedOldSchemaTestCase(t, false)
mig.CreateAndRunTest(t, &testCase)
}
func TestMigAdvancedCluster_asymmetricShardedNewSchema(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error, note that TestAccClusterAdvancedClusterConfig_asymmetricShardedNewSchema is passing though:
- // resource_advanced_cluster_migration_test.go:39: Step 1/2 error: Check failed: Check 2/15 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.0.electable_specs.disk_iops' not found
- // Check 5/15 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.0.electable_specs.instance_size' not found
- // Check 6/15 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.1.region_configs.0.electable_specs.instance_size' not found
- // Check 7/15 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.1.region_configs.0.electable_specs.disk_size_gb' not found
- // Check 8/15 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.0.analytics_specs.disk_size_gb' not found
- // Check 9/15 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.1.region_configs.0.analytics_specs.disk_size_gb' not found
- // Check 10/15 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.0.electable_specs.disk_size_gb' not found
- // Check 11/15 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.1.region_configs.0.electable_specs.disk_iops' not found
acc.SkipIfAdvancedClusterV2Schema(t)
+ mig.SkipIfVersionBelow(t, "1.23.0") // version where sharded cluster tier auto-scaling was introduced
testCase := asymmetricShardedNewSchemaTestCase(t, false)
mig.CreateAndRunTest(t, &testCase)
}
@@ -116,12 +110,12 @@ func TestMigAdvancedCluster_shardedMigrationFromOldToNewSchema(t *testing.T) {
Steps: []resource.TestStep{
{
ExternalProviders: acc.ExternalProviders(versionBeforeISSRelease),
- Config: configShardedTransitionOldToNewSchema(t, false, orgID, projectName, clusterName, false),
+ Config: configShardedTransitionOldToNewSchema(t, false, orgID, projectName, clusterName, false, false),
Check: checkShardedTransitionOldToNewSchema(false, false),
},
{
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
- Config: configShardedTransitionOldToNewSchema(t, false, orgID, projectName, clusterName, true),
+ Config: configShardedTransitionOldToNewSchema(t, false, orgID, projectName, clusterName, true, false),
Check: checkShardedTransitionOldToNewSchema(false, true),
},
},
@@ -156,7 +150,7 @@ func TestMigAdvancedCluster_geoShardedMigrationFromOldToNewSchema(t *testing.T)
func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) {
acc.SkipIfAdvancedClusterV2Schema(t) // This test is specific to the legacy schema
- mig.SkipIfVersionBelow(t, "1.22.1") // version where default_max_time_ms was introduced
+ mig.SkipIfVersionBelow(t, "1.24.0") // version where tls_cipher_config_mode was introduced
var (
projectID = acc.ProjectIDExecution(t)
clusterName = acc.RandomClusterName()
@@ -188,6 +182,8 @@ func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) {
sample_size_bi_connector = 110
sample_refresh_interval_bi_connector = 310
default_max_time_ms = 65
+ tls_cipher_config_mode = "CUSTOM"
+ custom_openssl_cipher_config_tls12 = ["TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"]
}
bi_connector_config {
@@ -212,6 +208,7 @@ func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.minimum_enabled_tls_protocol", "TLS1_1"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.no_table_scan", "false"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.oplog_min_retention_hours", "4"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.tls_cipher_config_mode", "DEFAULT"),
resource.TestCheckResourceAttr(resourceName, "bi_connector_config.0.enabled", "true"),
),
},
@@ -228,6 +225,8 @@ func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_refresh_interval_bi_connector", "310"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_size_bi_connector", "110"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.default_max_time_ms", "65"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.tls_cipher_config_mode", "CUSTOM"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.custom_openssl_cipher_config_tls12.#", "1"),
resource.TestCheckResourceAttr(resourceName, "bi_connector_config.0.enabled", "false"),
resource.TestCheckResourceAttr(resourceName, "bi_connector_config.0.read_preference", "secondary"),
),
@@ -237,6 +236,32 @@ func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) {
})
}
+func TestMigAdvancedCluster_newSchemaFromAutoscalingDisabledToEnabled(t *testing.T) {
+ acc.SkipIfAdvancedClusterV2Schema(t)
+ var (
+ orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
+ projectName = acc.RandomProjectName()
+ clusterName = acc.RandomClusterName()
+ )
+
+ resource.ParallelTest(t, resource.TestCase{
+ PreCheck: acc.PreCheckBasicSleep(t, nil, orgID, projectName),
+ CheckDestroy: acc.CheckDestroyCluster,
+ Steps: []resource.TestStep{
+ {
+ ExternalProviders: acc.ExternalProviders("1.22.0"), // last version before cluster tier auto-scaling per shard was introduced
+ Config: configShardedTransitionOldToNewSchema(t, false, orgID, projectName, clusterName, true, false),
+ Check: checkIndependentShardScalingMode(clusterName, "CLUSTER"),
+ },
+ {
+ ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
+ Config: configShardedTransitionOldToNewSchema(t, false, orgID, projectName, clusterName, true, true),
+ Check: checkIndependentShardScalingMode(clusterName, "SHARD"),
+ },
+ },
+ })
+}
+
func configPartialAdvancedConfig(projectID, clusterName, extraArgs, autoScaling string) string {
return fmt.Sprintf(`
resource "mongodbatlas_advanced_cluster" "test" {
diff --git a/internal/service/advancedcluster/resource_advanced_cluster_test.go b/internal/service/advancedcluster/resource_advanced_cluster_test.go
index 5cf47fc748..bb2e244ca1 100644
--- a/internal/service/advancedcluster/resource_advanced_cluster_test.go
+++ b/internal/service/advancedcluster/resource_advanced_cluster_test.go
@@ -1,17 +1,24 @@
package advancedcluster_test
import (
+ "context"
"fmt"
+ "net/http"
"os"
"regexp"
"strconv"
+ "strings"
"testing"
"time"
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
+ mockadmin20240530 "go.mongodb.org/atlas-sdk/v20240530005/mockadmin"
"go.mongodb.org/atlas-sdk/v20241113003/admin"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
+ "github.com/hashicorp/terraform-plugin-testing/terraform"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
@@ -29,6 +36,61 @@ var (
configServerManagementModeAtlasManaged = "ATLAS_MANAGED"
)
+func TestGetReplicationSpecAttributesFromOldAPI(t *testing.T) {
+ var (
+ projectID = "11111"
+ clusterName = "testCluster"
+ ID = "111111"
+ numShard = 2
+ zoneName = "ZoneName managed by Terraform"
+ )
+
+ testCases := map[string]struct {
+ mockCluster *admin20240530.AdvancedClusterDescription
+ mockResponse *http.Response
+ mockError error
+ expectedResult map[string]advancedcluster.OldShardConfigMeta
+ expectedError error
+ }{
+ "Error in the API call": {
+ mockCluster: &admin20240530.AdvancedClusterDescription{},
+ mockResponse: &http.Response{StatusCode: 400},
+ mockError: errGeneric,
+ expectedError: errGeneric,
+ expectedResult: nil,
+ },
+ "Successful": {
+ mockCluster: &admin20240530.AdvancedClusterDescription{
+ ReplicationSpecs: &[]admin20240530.ReplicationSpec{
+ {
+ NumShards: &numShard,
+ Id: &ID,
+ ZoneName: &zoneName,
+ },
+ },
+ },
+ mockResponse: &http.Response{},
+ mockError: nil,
+ expectedError: nil,
+ expectedResult: map[string]advancedcluster.OldShardConfigMeta{
+ zoneName: {ID: ID, NumShard: numShard},
+ },
+ },
+ }
+ for name, tc := range testCases {
+ t.Run(name, func(t *testing.T) {
+ testObject := mockadmin20240530.NewClustersApi(t)
+
+ testObject.EXPECT().GetCluster(mock.Anything, mock.Anything, mock.Anything).Return(admin20240530.GetClusterApiRequest{ApiService: testObject}).Once()
+ testObject.EXPECT().GetClusterExecute(mock.Anything).Return(tc.mockCluster, tc.mockResponse, tc.mockError).Once()
+
+ result, err := advancedcluster.GetReplicationSpecAttributesFromOldAPI(context.Background(), projectID, clusterName, testObject)
+ assert.Equal(t, tc.expectedError, err)
+ assert.Equal(t, tc.expectedResult, result)
+ })
+ }
+}
+
func TestAccClusterAdvancedCluster_basicTenant(t *testing.T) {
var (
projectID = acc.ProjectIDExecution(t)
@@ -119,11 +181,6 @@ func TestAccClusterAdvancedCluster_singleShardedMultiCloud(t *testing.T) {
func singleShardedMultiCloudTestCase(t *testing.T, isAcc bool) resource.TestCase {
t.Helper()
- // TODO: Already prepared for TPF but getting this error:
- // resource_advanced_cluster_test.go:119: Step 1/3 error: Check failed: Check 9/12 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.0.electable_specs.0.disk_iops' expected to be set
- // Check 10/12 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.0.analytics_specs.0.disk_iops' expected to be set
- // Check 11/12 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.1.electable_specs.0.disk_iops' expected to be set
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName() // No ProjectIDExecution to avoid cross-region limits because multi-region
@@ -212,9 +269,7 @@ func TestAccClusterAdvancedCluster_pausedToUnpaused(t *testing.T) {
}
func TestAccClusterAdvancedCluster_advancedConfig_oldMongoDBVersion(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // unexpected new value: .advanced_configuration.fail_index_key_too_long: was cty.False, but now null
- acc.SkipIfAdvancedClusterV2Schema(t)
+ acc.SkipIfAdvancedClusterV2Schema(t) // TODO: default_max_time_ms not implemented in TPF yet
var (
projectID = acc.ProjectIDExecution(t)
clusterName = acc.RandomClusterName()
@@ -235,6 +290,11 @@ func TestAccClusterAdvancedCluster_advancedConfig_oldMongoDBVersion(t *testing.T
ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: conversion.IntPtr(-1), // this will not be set in the TF configuration
DefaultMaxTimeMS: conversion.IntPtr(65),
}
+
+ processArgsCipherConfig = &admin.ClusterDescriptionProcessArgs20240805{
+ TlsCipherConfigMode: conversion.StringPtr("CUSTOM"),
+ CustomOpensslCipherConfigTls12: &[]string{"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"},
+ }
)
resource.ParallelTest(t, resource.TestCase{
@@ -247,15 +307,15 @@ func TestAccClusterAdvancedCluster_advancedConfig_oldMongoDBVersion(t *testing.T
ExpectError: regexp.MustCompile(advancedcluster.ErrorDefaultMaxTimeMinVersion),
},
{
- Config: configAdvanced(t, true, projectID, clusterName, "6.0", processArgs20240530, &admin.ClusterDescriptionProcessArgs20240805{}),
- Check: checkAdvanced(true, clusterName, "TLS1_1", &admin.ClusterDescriptionProcessArgs20240805{}),
+ Config: configAdvanced(t, true, projectID, clusterName, "6.0", processArgs20240530, processArgsCipherConfig),
+ Check: checkAdvanced(true, clusterName, "TLS1_1", processArgsCipherConfig),
},
},
})
}
func TestAccClusterAdvancedCluster_advancedConfig(t *testing.T) {
- acc.SkipIfAdvancedClusterV2Schema(t)
+ acc.SkipIfAdvancedClusterV2Schema(t) // TODO: default_max_time_ms not implemented in TPF yet
var (
projectID = acc.ProjectIDExecution(t)
clusterName = acc.RandomClusterName()
@@ -274,6 +334,7 @@ func TestAccClusterAdvancedCluster_advancedConfig(t *testing.T) {
}
processArgs = &admin.ClusterDescriptionProcessArgs20240805{
ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: conversion.IntPtr(-1), // this will not be set in the TF configuration
+ TlsCipherConfigMode: conversion.StringPtr("DEFAULT"),
}
processArgs20240530Updated = &admin20240530.ClusterDescriptionProcessArgs{
@@ -291,6 +352,13 @@ func TestAccClusterAdvancedCluster_advancedConfig(t *testing.T) {
processArgsUpdated = &admin.ClusterDescriptionProcessArgs20240805{
DefaultMaxTimeMS: conversion.IntPtr(65),
ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: conversion.IntPtr(100),
+ TlsCipherConfigMode: conversion.StringPtr("CUSTOM"),
+ CustomOpensslCipherConfigTls12: &[]string{"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"},
+ }
+ processArgsUpdatedCipherConfig = &admin.ClusterDescriptionProcessArgs20240805{
+ DefaultMaxTimeMS: conversion.IntPtr(65),
+ ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: conversion.IntPtr(100),
+ TlsCipherConfigMode: conversion.StringPtr("DEFAULT"), // To unset TlsCipherConfigMode, user needs to set this to DEFAULT
}
)
@@ -307,14 +375,16 @@ func TestAccClusterAdvancedCluster_advancedConfig(t *testing.T) {
Config: configAdvanced(t, true, projectID, clusterNameUpdated, "", processArgs20240530Updated, processArgsUpdated),
Check: checkAdvanced(true, clusterNameUpdated, "TLS1_2", processArgsUpdated),
},
+ {
+ Config: configAdvanced(t, true, projectID, clusterNameUpdated, "", processArgs20240530Updated, processArgsUpdatedCipherConfig),
+ Check: checkAdvanced(true, clusterNameUpdated, "TLS1_2", processArgsUpdatedCipherConfig),
+ },
},
})
}
func TestAccClusterAdvancedCluster_defaultWrite(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // Check failed: Check 8/14 error: mongodbatlas_advanced_cluster.test: Attribute 'advanced_configuration.fail_index_key_too_long' not found
- acc.SkipIfAdvancedClusterV2Schema(t)
+ acc.SkipIfAdvancedClusterV2Schema(t) // TODO: tls_cipher_config_mode not implemented in TPF yet
var (
projectID = acc.ProjectIDExecution(t)
clusterName = acc.RandomClusterName()
@@ -360,9 +430,6 @@ func TestAccClusterAdvancedCluster_defaultWrite(t *testing.T) {
}
func TestAccClusterAdvancedClusterConfig_replicationSpecsAutoScaling(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // POST: HTTP 400 Bad Request (Error code: "INVALID_ENUM_VALUE") Detail: An invalid enumeration value was specified. Reason: Bad Request. Params: [],
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
projectID = acc.ProjectIDExecution(t)
clusterName = acc.RandomClusterName()
@@ -406,9 +473,6 @@ func TestAccClusterAdvancedClusterConfig_replicationSpecsAutoScaling(t *testing.
}
func TestAccClusterAdvancedClusterConfig_replicationSpecsAnalyticsAutoScaling(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // POST: HTTP 400 Bad Request (Error code: "INVALID_ENUM_VALUE") Detail: An invalid enumeration value was specified. Reason: Bad Request. Params: [],
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
projectID = acc.ProjectIDExecution(t)
clusterName = acc.RandomClusterName()
@@ -451,9 +515,6 @@ func TestAccClusterAdvancedClusterConfig_replicationSpecsAnalyticsAutoScaling(t
}
func TestAccClusterAdvancedClusterConfig_singleShardedTransitionToOldSchemaExpectsError(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // POST: HTTP 400 Bad Request (Error code: "ASYMMETRIC_REGION_TOPOLOGY_IN_ZONE"). Detail: All shards in the same zone must have the same region topology.
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName() // No ProjectIDExecution to avoid cross-region limits because multi-region
@@ -534,9 +595,6 @@ func TestAccClusterAdvancedCluster_withLabels(t *testing.T) {
}
func TestAccClusterAdvancedClusterConfig_selfManagedSharding(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // POST: HTTP 400 Bad Request (Error code: "ASYMMETRIC_REGION_TOPOLOGY_IN_ZONE"). Detail: All shards in the same zone must have the same region topology.
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName() // No ProjectIDExecution to avoid cross-region limits because multi-region
@@ -586,12 +644,6 @@ func TestAccClusterAdvancedClusterConfig_selfManagedShardingIncorrectType(t *tes
}
func TestAccClusterAdvancedClusterConfig_symmetricShardedOldSchema(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // resource_advanced_cluster_test.go:545: Step 1/2 error: Check failed: Check 3/13 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.num_shards' expected "2", got "1"
- // Check 9/13 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.0.electable_specs.0.disk_iops' expected to be set
- // Check 10/13 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.0.analytics_specs.0.disk_iops' expected to be set
- // Check 11/13 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs.1.electable_specs.0.disk_iops' expected to be set
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName() // No ProjectIDExecution to avoid cross-region limits because multi-region
@@ -621,9 +673,6 @@ func TestAccClusterAdvancedClusterConfig_symmetricGeoShardedOldSchema(t *testing
func symmetricGeoShardedOldSchemaTestCase(t *testing.T, isAcc bool) resource.TestCase {
t.Helper()
- // TODO: Already prepared for TPF but getting this error:
- // POST: HTTP 400 Bad Request (Error code: "INVALID_ENUM_VALUE") Detail: An invalid enumeration value was specified. Reason: Bad Request. Params: [],
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName() // No ProjectIDExecution to avoid cross-region limits because multi-region
@@ -637,20 +686,21 @@ func symmetricGeoShardedOldSchemaTestCase(t *testing.T, isAcc bool) resource.Tes
Steps: []resource.TestStep{
{
Config: configGeoShardedOldSchema(t, isAcc, orgID, projectName, clusterName, 2, 2, false),
- Check: checkGeoShardedOldSchema(isAcc, clusterName, 2, 2, true, false),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ checkGeoShardedOldSchema(isAcc, clusterName, 2, 2, true, false),
+ checkIndependentShardScalingMode(clusterName, "CLUSTER")),
},
{
Config: configGeoShardedOldSchema(t, isAcc, orgID, projectName, clusterName, 3, 3, false),
- Check: checkGeoShardedOldSchema(isAcc, clusterName, 3, 3, true, false),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ checkGeoShardedOldSchema(isAcc, clusterName, 3, 3, true, false),
+ checkIndependentShardScalingMode(clusterName, "CLUSTER")),
},
},
}
}
func TestAccClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // Check failed: Check 2/5 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.num_shards' expected \"2\", got \"1\"
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName()
@@ -675,9 +725,6 @@ func TestAccClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtEl
}
func TestAccClusterAdvancedClusterConfig_symmetricShardedNewSchemaToAsymmetricAddingRemovingShard(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // PATCH: HTTP 400 Bad Request (Error code: \"AUTO_SCALINGS_MUST_BE_IN_EVERY_REGION_CONFIG\") Detail: If any regionConfigs specify an autoScaling object, all regionConfigs must also specify an autoScaling object.
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName()
@@ -724,22 +771,21 @@ func asymmetricShardedNewSchemaTestCase(t *testing.T, isAcc bool) resource.TestC
Steps: []resource.TestStep{
{
Config: configShardedNewSchema(t, isAcc, orgID, projectName, clusterName, 50, "M30", "M40", admin.PtrInt(2000), admin.PtrInt(2500), false),
- Check: checkShardedNewSchema(isAcc, 50, "M30", "M40", admin.PtrInt(2000), admin.PtrInt(2500), true, false),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ checkShardedNewSchema(isAcc, 50, "M30", "M40", admin.PtrInt(2000), admin.PtrInt(2500), true, false),
+ resource.TestCheckResourceAttr("data.mongodbatlas_advanced_clusters.test-replication-specs-per-shard-false", "results.#", "0"),
+ checkIndependentShardScalingMode(clusterName, "SHARD")),
},
},
}
}
func TestAccClusterAdvancedClusterConfig_asymmetricGeoShardedNewSchemaAddingRemovingShard(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // POST: HTTP 400 Bad Request (Error code: "ASYMMETRIC_REGION_TOPOLOGY_IN_ZONE"). Detail: All shards in the same zone must have the same region topology.
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName()
clusterName = acc.RandomClusterName()
)
-
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acc.PreCheckBasic(t) },
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
@@ -762,9 +808,6 @@ func TestAccClusterAdvancedClusterConfig_asymmetricGeoShardedNewSchemaAddingRemo
}
func TestAccClusterAdvancedClusterConfig_shardedTransitionFromOldToNewSchema(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // PATCH: HTTP 400 Bad Request (Error code: "AUTO_SCALINGS_MUST_BE_IN_EVERY_REGION_CONFIG") Detail: If any regionConfigs specify an autoScaling object, all regionConfigs must also specify an autoScaling object.
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName()
@@ -777,11 +820,13 @@ func TestAccClusterAdvancedClusterConfig_shardedTransitionFromOldToNewSchema(t *
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
- Config: configShardedTransitionOldToNewSchema(t, true, orgID, projectName, clusterName, false),
- Check: checkShardedTransitionOldToNewSchema(true, false),
+ Config: configShardedTransitionOldToNewSchema(t, true, orgID, projectName, clusterName, false, false),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ checkShardedTransitionOldToNewSchema(true, false),
+ checkIndependentShardScalingMode(clusterName, "CLUSTER")),
},
{
- Config: configShardedTransitionOldToNewSchema(t, true, orgID, projectName, clusterName, true),
+ Config: configShardedTransitionOldToNewSchema(t, true, orgID, projectName, clusterName, true, false),
Check: checkShardedTransitionOldToNewSchema(true, true),
},
},
@@ -789,9 +834,6 @@ func TestAccClusterAdvancedClusterConfig_shardedTransitionFromOldToNewSchema(t *
}
func TestAccClusterAdvancedClusterConfig_geoShardedTransitionFromOldToNewSchema(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // POST: HTTP 400 Bad Request (Error code: "ASYMMETRIC_REGION_TOPOLOGY_IN_ZONE"). Detail: All shards in the same zone must have the same region topology.
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName()
@@ -877,14 +919,6 @@ func TestAccAdvancedCluster_replicaSetScalingStrategyAndRedactClientLogDataOldSc
// TestAccClusterAdvancedCluster_priorityOldSchema will be able to be simplied or deleted in CLOUDP-275825
func TestAccClusterAdvancedCluster_priorityOldSchema(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // .replication_specs[0].region_configs[0].electable_specs.node_count: was cty.NumberIntVal(1), but now cty.NumberIntVal(2)
- // .replication_specs[0].region_configs[0].priority: was cty.NumberIntVal(6), but now cty.NumberIntVal(7).
- // .replication_specs[0].region_configs[0].region_name: was cty.StringVal("US_WEST_2"), but now cty.StringVal("US_EAST_1").
- // .replication_specs[0].region_configs[1].electable_specs.node_count: was cty.NumberIntVal(2), but now cty.NumberIntVal(1).
- // .replication_specs[0].region_configs[1].priority: was cty.NumberIntVal(7), but now cty.NumberIntVal(6).
- // .replication_specs[0].region_configs[1].region_name: was cty.StringVal("US_EAST_1"), but now cty.StringVal("US_WEST_2").
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName() // No ProjectIDExecution to avoid cross-region limits because multi-region
@@ -908,15 +942,17 @@ func TestAccClusterAdvancedCluster_priorityOldSchema(t *testing.T) {
Config: configPriority(t, true, orgID, projectName, clusterName, true, true),
ExpectError: regexp.MustCompile("priority values in region_configs must be in descending order"),
},
+ // Extra step added to allow deletion, otherwise we get `Error running post-test destroy` since validation of TF fails
+ {
+ Config: configPriority(t, true, orgID, projectName, clusterName, true, false),
+ Check: acc.TestCheckResourceAttrSchemaV2(true, resourceName, "replication_specs.0.region_configs.#", "2"),
+ },
},
})
}
// TestAccClusterAdvancedCluster_priorityNewSchema will be able to be simplied or deleted in CLOUDP-275825
func TestAccClusterAdvancedCluster_priorityNewSchema(t *testing.T) {
- // TODO: Already prepared for TPF but getting this error:
- // Error: errorUpdateLegacy. PATCH: HTTP 400 Bad Request (Error code: "AUTO_SCALINGS_MUST_BE_IN_EVERY_REGION_CONFIG") Detail: If any regionConfigs specify an autoScaling object, all regionConfigs must also specify an autoScaling object.
- acc.SkipIfAdvancedClusterV2Schema(t)
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName() // No ProjectIDExecution to avoid cross-region limits because multi-region
@@ -940,6 +976,11 @@ func TestAccClusterAdvancedCluster_priorityNewSchema(t *testing.T) {
Config: configPriority(t, true, orgID, projectName, clusterName, false, true),
ExpectError: regexp.MustCompile("priority values in region_configs must be in descending order"),
},
+ // Extra step added to allow deletion, otherwise we get `Error running post-test destroy` since validation of TF fails
+ {
+ Config: configPriority(t, true, orgID, projectName, clusterName, false, false),
+ Check: acc.TestCheckResourceAttrSchemaV2(true, resourceName, "replication_specs.0.region_configs.#", "2"),
+ },
},
})
}
@@ -967,7 +1008,7 @@ func TestAccClusterAdvancedCluster_biConnectorConfig(t *testing.T) {
}
func TestAccClusterAdvancedCluster_pinnedFCVWithVersionUpgradeAndDowngrade(t *testing.T) {
- acc.SkipIfAdvancedClusterV2Schema(t)
+ acc.SkipIfAdvancedClusterV2Schema(t) // TODO: pinned_fcv not implemented in TPF yet
var (
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
projectName = acc.RandomProjectName() // Using single project to assert plural data source
@@ -1020,6 +1061,81 @@ func TestAccClusterAdvancedCluster_pinnedFCVWithVersionUpgradeAndDowngrade(t *te
})
}
+func TestAccAdvancedCluster_oldToNewSchemaWithAutoscalingEnabled(t *testing.T) {
+ acc.SkipIfAdvancedClusterV2Schema(t)
+ var (
+ orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
+ projectName = acc.RandomProjectName()
+ clusterName = acc.RandomClusterName()
+ )
+
+ resource.ParallelTest(t, resource.TestCase{
+ PreCheck: acc.PreCheckBasicSleep(t, nil, orgID, projectName),
+ ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
+ CheckDestroy: acc.CheckDestroyCluster,
+ Steps: []resource.TestStep{
+ {
+ Config: configShardedTransitionOldToNewSchema(t, true, orgID, projectName, clusterName, false, true),
+ Check: checkIndependentShardScalingMode(clusterName, "CLUSTER"),
+ },
+ {
+ Config: configShardedTransitionOldToNewSchema(t, true, orgID, projectName, clusterName, true, true),
+ Check: checkIndependentShardScalingMode(clusterName, "SHARD"),
+ },
+ },
+ })
+}
+
+func TestAccAdvancedCluster_oldToNewSchemaWithAutoscalingDisabledToEnabled(t *testing.T) {
+ acc.SkipIfAdvancedClusterV2Schema(t)
+ var (
+ orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
+ projectName = acc.RandomProjectName()
+ clusterName = acc.RandomClusterName()
+ )
+
+ resource.ParallelTest(t, resource.TestCase{
+ PreCheck: acc.PreCheckBasicSleep(t, nil, orgID, projectName),
+ ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
+ CheckDestroy: acc.CheckDestroyCluster,
+ Steps: []resource.TestStep{
+ {
+ Config: configShardedTransitionOldToNewSchema(t, true, orgID, projectName, clusterName, false, false),
+ Check: checkIndependentShardScalingMode(clusterName, "CLUSTER"),
+ },
+ {
+ Config: configShardedTransitionOldToNewSchema(t, true, orgID, projectName, clusterName, true, false),
+ Check: checkIndependentShardScalingMode(clusterName, "CLUSTER"),
+ },
+ {
+ Config: configShardedTransitionOldToNewSchema(t, true, orgID, projectName, clusterName, true, true),
+ Check: checkIndependentShardScalingMode(clusterName, "SHARD"),
+ },
+ },
+ })
+}
+
+func checkIndependentShardScalingMode(clusterName, expectedMode string) resource.TestCheckFunc {
+ return func(s *terraform.State) error {
+ rs, ok := s.RootModule().Resources[resourceName]
+ if !ok {
+ return fmt.Errorf("not found: %s", resourceName)
+ }
+ if rs.Primary.ID == "" {
+ return fmt.Errorf("no ID is set")
+ }
+ projectID := rs.Primary.Attributes["project_id"]
+ issMode, _, err := acc.GetIndependentShardScalingMode(context.Background(), projectID, clusterName)
+ if err != nil {
+ return fmt.Errorf("error getting independent shard scaling mode: %w", err)
+ }
+ if *issMode != expectedMode {
+ return fmt.Errorf("expected independent shard scaling mode to be %s, got %s", expectedMode, *issMode)
+ }
+ return nil
+ }
+}
+
func checkAggr(isAcc bool, attrsSet []string, attrsMap map[string]string, extra ...resource.TestCheckFunc) resource.TestCheckFunc {
checks := []resource.TestCheckFunc{acc.CheckExistsCluster(resourceName)}
checks = acc.AddAttrChecksSchemaV2(isAcc, resourceName, checks, attrsMap)
@@ -1468,20 +1584,32 @@ func checkSingleProviderPaused(isAcc bool, name string, paused bool) resource.Te
func configAdvanced(t *testing.T, isAcc bool, projectID, clusterName, mongoDBMajorVersion string, p20240530 *admin20240530.ClusterDescriptionProcessArgs, p *admin.ClusterDescriptionProcessArgs20240805) string {
t.Helper()
- changeStreamOptionsString := ""
- defaultMaxTimeString := ""
- mongoDBMajorVersionString := ""
+ changeStreamOptionsStr := ""
+ defaultMaxTimeStr := ""
+ tlsCipherConfigModeStr := ""
+ customOpensslCipherConfigTLS12Str := ""
+ mongoDBMajorVersionStr := ""
if p != nil {
if p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds != nil && p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds != conversion.IntPtr(-1) {
- changeStreamOptionsString = fmt.Sprintf(`change_stream_options_pre_and_post_images_expire_after_seconds = %[1]d`, *p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds)
+ changeStreamOptionsStr = fmt.Sprintf(`change_stream_options_pre_and_post_images_expire_after_seconds = %[1]d`, *p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds)
}
if p.DefaultMaxTimeMS != nil {
- defaultMaxTimeString = fmt.Sprintf(`default_max_time_ms = %[1]d`, *p.DefaultMaxTimeMS)
+ defaultMaxTimeStr = fmt.Sprintf(`default_max_time_ms = %[1]d`, *p.DefaultMaxTimeMS)
+ }
+ if p.TlsCipherConfigMode != nil {
+ tlsCipherConfigModeStr = fmt.Sprintf(`tls_cipher_config_mode = %[1]q`, *p.TlsCipherConfigMode)
+ if p.CustomOpensslCipherConfigTls12 != nil && len(*p.CustomOpensslCipherConfigTls12) > 0 {
+ //nolint:gocritic // reason: simplifying string array construction
+ customOpensslCipherConfigTLS12Str = fmt.Sprintf(
+ `custom_openssl_cipher_config_tls12 = ["%s"]`,
+ strings.Join(*p.CustomOpensslCipherConfigTls12, `", "`),
+ )
+ }
}
}
if mongoDBMajorVersion != "" {
- mongoDBMajorVersionString = fmt.Sprintf(`mongo_db_major_version = %[1]q`, mongoDBMajorVersion)
+ mongoDBMajorVersionStr = fmt.Sprintf(`mongo_db_major_version = %[1]q`, mongoDBMajorVersion)
}
return acc.ConvertAdvancedClusterToSchemaV2(t, isAcc, fmt.Sprintf(`
@@ -1518,6 +1646,8 @@ func configAdvanced(t *testing.T, isAcc bool, projectID, clusterName, mongoDBMaj
transaction_lifetime_limit_seconds = %[10]d
%[11]s
%[12]s
+ %[14]s
+ %[15]s
}
}
@@ -1532,7 +1662,7 @@ func configAdvanced(t *testing.T, isAcc bool, projectID, clusterName, mongoDBMaj
`, projectID, clusterName,
p20240530.GetFailIndexKeyTooLong(), p20240530.GetJavascriptEnabled(), p20240530.GetMinimumEnabledTlsProtocol(), p20240530.GetNoTableScan(),
p20240530.GetOplogSizeMB(), p20240530.GetSampleSizeBIConnector(), p20240530.GetSampleRefreshIntervalBIConnector(), p20240530.GetTransactionLifetimeLimitSeconds(),
- changeStreamOptionsString, defaultMaxTimeString, mongoDBMajorVersionString))
+ changeStreamOptionsStr, defaultMaxTimeStr, mongoDBMajorVersionStr, tlsCipherConfigModeStr, customOpensslCipherConfigTLS12Str))
}
func checkAdvanced(isAcc bool, name, tls string, processArgs *admin.ClusterDescriptionProcessArgs20240805) resource.TestCheckFunc {
@@ -1556,6 +1686,13 @@ func checkAdvanced(isAcc bool, name, tls string, processArgs *admin.ClusterDescr
advancedConfig["advanced_configuration.0.default_max_time_ms"] = strconv.Itoa(*processArgs.DefaultMaxTimeMS)
}
+ if processArgs.TlsCipherConfigMode != nil && processArgs.CustomOpensslCipherConfigTls12 != nil {
+ advancedConfig["advanced_configuration.0.tls_cipher_config_mode"] = "CUSTOM"
+ advancedConfig["advanced_configuration.0.custom_openssl_cipher_config_tls12.#"] = strconv.Itoa(len(*processArgs.CustomOpensslCipherConfigTls12))
+ } else {
+ advancedConfig["advanced_configuration.0.tls_cipher_config_mode"] = "DEFAULT"
+ }
+
pluralChecks := []resource.TestCheckFunc{
acc.TestCheckResourceAttrSetSchemaV2(isAcc, dataSourcePluralName, "results.#"),
acc.TestCheckResourceAttrSetSchemaV2(isAcc, dataSourcePluralName, "results.0.replication_specs.#"),
@@ -1635,7 +1772,8 @@ func checkAdvancedDefaultWrite(isAcc bool, name, writeConcern, tls string) resou
"advanced_configuration.0.no_table_scan": "false",
"advanced_configuration.0.oplog_size_mb": "1000",
"advanced_configuration.0.sample_refresh_interval_bi_connector": "310",
- "advanced_configuration.0.sample_size_bi_connector": "110"},
+ "advanced_configuration.0.sample_size_bi_connector": "110",
+ "advanced_configuration.0.tls_cipher_config_mode": "DEFAULT"},
pluralChecks...)
}
@@ -1948,6 +2086,11 @@ func configShardedNewSchema(t *testing.T, isAcc bool, orgID, projectName, name s
use_replication_spec_per_shard = true
}
+ data "mongodbatlas_advanced_clusters" "test-replication-specs-per-shard-false" {
+ project_id = mongodbatlas_advanced_cluster.test.project_id
+ use_replication_spec_per_shard = false
+ }
+
data "mongodbatlas_advanced_clusters" "test" {
project_id = mongodbatlas_advanced_cluster.test.project_id
use_replication_spec_per_shard = true
@@ -1988,8 +2131,6 @@ func checkShardedNewSchema(isAcc bool, diskSizeGB int, firstInstanceSize, lastIn
[]string{"results.#", "results.0.replication_specs.#", "results.0.replication_specs.0.region_configs.#", "results.0.name", "results.0.termination_protection_enabled", "results.0.global_cluster_self_managed_sharding"}...)
pluralChecks = acc.AddAttrChecksPrefixSchemaV2(isAcc, dataSourcePluralName, pluralChecks, clusterChecks, "results.0")
-
- // expected id attribute only if cluster is symmetric
if isAsymmetricCluster {
pluralChecks = append(pluralChecks, checkAggr(isAcc, []string{}, map[string]string{
"replication_specs.0.id": "",
@@ -2003,7 +2144,6 @@ func checkShardedNewSchema(isAcc bool, diskSizeGB int, firstInstanceSize, lastIn
pluralChecks = append(pluralChecks, checkAggr(isAcc, []string{"replication_specs.0.id", "replication_specs.1.id"}, map[string]string{}))
pluralChecks = acc.AddAttrSetChecksSchemaV2(isAcc, dataSourcePluralName, pluralChecks, "results.0.replication_specs.0.id", "results.0.replication_specs.1.id")
}
-
return checkAggr(isAcc,
[]string{"replication_specs.0.external_id", "replication_specs.0.zone_id", "replication_specs.1.external_id", "replication_specs.1.zone_id"},
clusterChecks,
@@ -2087,18 +2227,27 @@ func checkGeoShardedNewSchema(isAcc, includeThirdShardInFirstZone bool) resource
amtOfReplicationSpecs = 2
}
clusterChecks := map[string]string{
- "replication_specs.#": fmt.Sprintf("%d", amtOfReplicationSpecs),
+ "replication_specs.#": fmt.Sprintf("%d", amtOfReplicationSpecs),
+ "replication_specs.0.container_id.%": "1",
+ "replication_specs.1.container_id.%": "1",
}
-
return checkAggr(isAcc, []string{}, clusterChecks)
}
-func configShardedTransitionOldToNewSchema(t *testing.T, isAcc bool, orgID, projectName, name string, useNewSchema bool) string {
+func configShardedTransitionOldToNewSchema(t *testing.T, isAcc bool, orgID, projectName, name string, useNewSchema, autoscaling bool) string {
t.Helper()
var numShardsStr string
if !useNewSchema {
numShardsStr = `num_shards = 2`
}
+ var autoscalingStr string
+ if autoscaling {
+ autoscalingStr = `auto_scaling {
+ compute_enabled = true
+ disk_gb_enabled = true
+ compute_max_instance_size = "M20"
+ }`
+ }
replicationSpec := fmt.Sprintf(`
replication_specs {
%[1]s
@@ -2114,9 +2263,10 @@ func configShardedTransitionOldToNewSchema(t *testing.T, isAcc bool, orgID, proj
provider_name = "AWS"
priority = 7
region_name = "EU_WEST_1"
+ %[2]s
}
}
- `, numShardsStr)
+ `, numShardsStr, autoscalingStr)
var replicationSpecs string
if useNewSchema {
diff --git a/internal/service/advancedcluster/resource_update_logic.go b/internal/service/advancedcluster/resource_update_logic.go
index 978791e573..a8aff3958c 100644
--- a/internal/service/advancedcluster/resource_update_logic.go
+++ b/internal/service/advancedcluster/resource_update_logic.go
@@ -6,11 +6,10 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
- admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
"go.mongodb.org/atlas-sdk/v20241113003/admin"
)
-func noIDsPopulatedInReplicationSpecs(replicationSpecs *[]admin20240805.ReplicationSpec20240805) bool {
+func noIDsPopulatedInReplicationSpecs(replicationSpecs *[]admin.ReplicationSpec20240805) bool {
if replicationSpecs == nil || len(*replicationSpecs) == 0 {
return false
}
@@ -22,7 +21,7 @@ func noIDsPopulatedInReplicationSpecs(replicationSpecs *[]admin20240805.Replicat
return true
}
-func populateIDValuesUsingNewAPI(ctx context.Context, projectID, clusterName string, connV2ClusterAPI admin.ClustersApi, replicationSpecs *[]admin20240805.ReplicationSpec20240805) (*[]admin20240805.ReplicationSpec20240805, diag.Diagnostics) {
+func populateIDValuesUsingNewAPI(ctx context.Context, projectID, clusterName string, connV2ClusterAPI admin.ClustersApi, replicationSpecs *[]admin.ReplicationSpec20240805) (*[]admin.ReplicationSpec20240805, diag.Diagnostics) {
if replicationSpecs == nil || len(*replicationSpecs) == 0 {
return replicationSpecs, nil
}
@@ -36,7 +35,7 @@ func populateIDValuesUsingNewAPI(ctx context.Context, projectID, clusterName str
return &result, nil
}
-func AddIDsToReplicationSpecs(replicationSpecs []admin20240805.ReplicationSpec20240805, zoneToReplicationSpecsIDs map[string][]string) []admin20240805.ReplicationSpec20240805 {
+func AddIDsToReplicationSpecs(replicationSpecs []admin.ReplicationSpec20240805, zoneToReplicationSpecsIDs map[string][]string) []admin.ReplicationSpec20240805 {
for zoneName, availableIDs := range zoneToReplicationSpecsIDs {
var indexOfIDToUse = 0
for i := range replicationSpecs {
@@ -65,12 +64,12 @@ func groupIDsByZone(specs []admin.ReplicationSpec20240805) map[string][]string {
// - Existing replication specs can have the autoscaling values present in the state with default values even if not defined in the config (case when cluster is imported)
// - API expects autoScaling and analyticsAutoScaling aligned cross all region configs in the PATCH request
// This function is needed to avoid errors if a new replication spec is added, ensuring the PATCH request will have the auto scaling aligned with other replication specs when not present in config.
-func SyncAutoScalingConfigs(replicationSpecs *[]admin20240805.ReplicationSpec20240805) {
+func SyncAutoScalingConfigs(replicationSpecs *[]admin.ReplicationSpec20240805) {
if replicationSpecs == nil || len(*replicationSpecs) == 0 {
return
}
- var defaultAnalyticsAutoScaling, defaultAutoScaling *admin20240805.AdvancedAutoScalingSettings
+ var defaultAnalyticsAutoScaling, defaultAutoScaling *admin.AdvancedAutoScalingSettings
for _, spec := range *replicationSpecs {
for i := range *spec.RegionConfigs {
@@ -86,7 +85,7 @@ func SyncAutoScalingConfigs(replicationSpecs *[]admin20240805.ReplicationSpec202
applyDefaultAutoScaling(replicationSpecs, defaultAutoScaling, defaultAnalyticsAutoScaling)
}
-func applyDefaultAutoScaling(replicationSpecs *[]admin20240805.ReplicationSpec20240805, defaultAutoScaling, defaultAnalyticsAutoScaling *admin20240805.AdvancedAutoScalingSettings) {
+func applyDefaultAutoScaling(replicationSpecs *[]admin.ReplicationSpec20240805, defaultAutoScaling, defaultAnalyticsAutoScaling *admin.AdvancedAutoScalingSettings) {
for _, spec := range *replicationSpecs {
for i := range *spec.RegionConfigs {
regionConfig := &(*spec.RegionConfigs)[i]
diff --git a/internal/service/advancedcluster/resource_update_logic_test.go b/internal/service/advancedcluster/resource_update_logic_test.go
index 607ef5709c..5d7af23929 100644
--- a/internal/service/advancedcluster/resource_update_logic_test.go
+++ b/internal/service/advancedcluster/resource_update_logic_test.go
@@ -5,18 +5,17 @@ import (
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
"github.com/stretchr/testify/assert"
- admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
"go.mongodb.org/atlas-sdk/v20241113003/admin"
)
func TestAddIDsToReplicationSpecs(t *testing.T) {
testCases := map[string]struct {
- ReplicationSpecs []admin20240805.ReplicationSpec20240805
+ ReplicationSpecs []admin.ReplicationSpec20240805
ZoneToReplicationSpecsIDs map[string][]string
- ExpectedReplicationSpecs []admin20240805.ReplicationSpec20240805
+ ExpectedReplicationSpecs []admin.ReplicationSpec20240805
}{
"two zones with same amount of available ids and replication specs to populate": {
- ReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ReplicationSpecs: []admin.ReplicationSpec20240805{
{
ZoneName: admin.PtrString("Zone 1"),
},
@@ -34,7 +33,7 @@ func TestAddIDsToReplicationSpecs(t *testing.T) {
"Zone 1": {"zone1-id1", "zone1-id2"},
"Zone 2": {"zone2-id1", "zone2-id2"},
},
- ExpectedReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ExpectedReplicationSpecs: []admin.ReplicationSpec20240805{
{
ZoneName: admin.PtrString("Zone 1"),
Id: admin.PtrString("zone1-id1"),
@@ -54,7 +53,7 @@ func TestAddIDsToReplicationSpecs(t *testing.T) {
},
},
"less available ids than replication specs to populate": {
- ReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ReplicationSpecs: []admin.ReplicationSpec20240805{
{
ZoneName: admin.PtrString("Zone 1"),
},
@@ -72,7 +71,7 @@ func TestAddIDsToReplicationSpecs(t *testing.T) {
"Zone 1": {"zone1-id1"},
"Zone 2": {"zone2-id1"},
},
- ExpectedReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ExpectedReplicationSpecs: []admin.ReplicationSpec20240805{
{
ZoneName: admin.PtrString("Zone 1"),
Id: admin.PtrString("zone1-id1"),
@@ -92,7 +91,7 @@ func TestAddIDsToReplicationSpecs(t *testing.T) {
},
},
"more available ids than replication specs to populate": {
- ReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ReplicationSpecs: []admin.ReplicationSpec20240805{
{
ZoneName: admin.PtrString("Zone 1"),
},
@@ -104,7 +103,7 @@ func TestAddIDsToReplicationSpecs(t *testing.T) {
"Zone 1": {"zone1-id1", "zone1-id2"},
"Zone 2": {"zone2-id1", "zone2-id2"},
},
- ExpectedReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ExpectedReplicationSpecs: []admin.ReplicationSpec20240805{
{
ZoneName: admin.PtrString("Zone 1"),
Id: admin.PtrString("zone1-id1"),
@@ -127,23 +126,23 @@ func TestAddIDsToReplicationSpecs(t *testing.T) {
func TestSyncAutoScalingConfigs(t *testing.T) {
testCases := map[string]struct {
- ReplicationSpecs []admin20240805.ReplicationSpec20240805
- ExpectedReplicationSpecs []admin20240805.ReplicationSpec20240805
+ ReplicationSpecs []admin.ReplicationSpec20240805
+ ExpectedReplicationSpecs []admin.ReplicationSpec20240805
}{
"apply same autoscaling options for new replication spec which does not have autoscaling defined": {
- ReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ReplicationSpecs: []admin.ReplicationSpec20240805{
{
Id: admin.PtrString("id-1"),
- RegionConfigs: &[]admin20240805.CloudRegionConfig20240805{
+ RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
- AutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
ScaleDownEnabled: admin.PtrBool(false),
},
},
- AnalyticsAutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AnalyticsAutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
ScaleDownEnabled: admin.PtrBool(false),
},
@@ -153,7 +152,7 @@ func TestSyncAutoScalingConfigs(t *testing.T) {
},
{
Id: admin.PtrString("id-2"),
- RegionConfigs: &[]admin20240805.CloudRegionConfig20240805{
+ RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
AutoScaling: nil,
AnalyticsAutoScaling: nil,
@@ -161,19 +160,19 @@ func TestSyncAutoScalingConfigs(t *testing.T) {
},
},
},
- ExpectedReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ExpectedReplicationSpecs: []admin.ReplicationSpec20240805{
{
Id: admin.PtrString("id-1"),
- RegionConfigs: &[]admin20240805.CloudRegionConfig20240805{
+ RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
- AutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
ScaleDownEnabled: admin.PtrBool(false),
},
},
- AnalyticsAutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AnalyticsAutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
ScaleDownEnabled: admin.PtrBool(false),
},
@@ -183,16 +182,16 @@ func TestSyncAutoScalingConfigs(t *testing.T) {
},
{
Id: admin.PtrString("id-2"),
- RegionConfigs: &[]admin20240805.CloudRegionConfig20240805{
+ RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
- AutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
ScaleDownEnabled: admin.PtrBool(false),
},
},
- AnalyticsAutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AnalyticsAutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
ScaleDownEnabled: admin.PtrBool(false),
},
@@ -204,19 +203,19 @@ func TestSyncAutoScalingConfigs(t *testing.T) {
},
// for this case the API will respond with an error and guide the user to align autoscaling options cross all nodes
"when different autoscaling options are defined values will not be changed": {
- ReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ReplicationSpecs: []admin.ReplicationSpec20240805{
{
Id: admin.PtrString("id-1"),
- RegionConfigs: &[]admin20240805.CloudRegionConfig20240805{
+ RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
- AutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
ScaleDownEnabled: admin.PtrBool(false),
},
},
- AnalyticsAutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AnalyticsAutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(true),
ScaleDownEnabled: admin.PtrBool(true),
},
@@ -226,15 +225,15 @@ func TestSyncAutoScalingConfigs(t *testing.T) {
},
{
Id: admin.PtrString("id-2"),
- RegionConfigs: &[]admin20240805.CloudRegionConfig20240805{
+ RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
- AutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(true),
},
},
- AnalyticsAutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AnalyticsAutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
},
},
@@ -242,19 +241,19 @@ func TestSyncAutoScalingConfigs(t *testing.T) {
},
},
},
- ExpectedReplicationSpecs: []admin20240805.ReplicationSpec20240805{
+ ExpectedReplicationSpecs: []admin.ReplicationSpec20240805{
{
Id: admin.PtrString("id-1"),
- RegionConfigs: &[]admin20240805.CloudRegionConfig20240805{
+ RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
- AutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
ScaleDownEnabled: admin.PtrBool(false),
},
},
- AnalyticsAutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AnalyticsAutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(true),
ScaleDownEnabled: admin.PtrBool(true),
},
@@ -264,15 +263,15 @@ func TestSyncAutoScalingConfigs(t *testing.T) {
},
{
Id: admin.PtrString("id-2"),
- RegionConfigs: &[]admin20240805.CloudRegionConfig20240805{
+ RegionConfigs: &[]admin.CloudRegionConfig20240805{
{
- AutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(true),
},
},
- AnalyticsAutoScaling: &admin20240805.AdvancedAutoScalingSettings{
- Compute: &admin20240805.AdvancedComputeAutoScaling{
+ AnalyticsAutoScaling: &admin.AdvancedAutoScalingSettings{
+ Compute: &admin.AdvancedComputeAutoScaling{
Enabled: admin.PtrBool(false),
},
},
diff --git a/internal/service/advancedclustertpf/README.md b/internal/service/advancedclustertpf/README.md
index 8e4dcd2ae2..5e825c0252 100644
--- a/internal/service/advancedclustertpf/README.md
+++ b/internal/service/advancedclustertpf/README.md
@@ -7,6 +7,7 @@ This package contains the WIP for `mongodbatlas_advanced_cluster` in TPF. Curren
## Changes in advancedcluster that needs to be added here
(list changes done in advancedcluster which couldn't also be done here at that moment)
- [PR #2825](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2825) Add new `advanced_configuration.0.default_max_time_ms` attribute to mongodbatlas_advanced_cluster resource and data sources.
-
-
+- feat: Ensures asymmetric auto-scaling is not defined in the cluster when using the old sharding configuration in mongodbatlas_advanced_cluster (https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2836)
- `pinned_fcv` attribute was a recently added attribute in `advanced_cluster`. It has been defined in the new tpf schema but we need to make sure that the implementation is also present.
+- [PR #2872](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2872) Adds support for Customer Cipher Configuration for Data Plane Connections.
+
diff --git a/internal/service/advancedclustertpf/data_source.go b/internal/service/advancedclustertpf/data_source.go
index 0bb0905091..801c02b023 100644
--- a/internal/service/advancedclustertpf/data_source.go
+++ b/internal/service/advancedclustertpf/data_source.go
@@ -2,17 +2,24 @@ package advancedclustertpf
import (
"context"
+ "fmt"
"github.com/hashicorp/terraform-plugin-framework/datasource"
- "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
- "github.com/hashicorp/terraform-plugin-framework/types"
+ "github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
+ "go.mongodb.org/atlas-sdk/v20241113003/admin"
)
var _ datasource.DataSource = &ds{}
var _ datasource.DataSourceWithConfigure = &ds{}
+const (
+ errorReadDatasource = "Error reading advanced cluster datasource"
+ errorReadDatasourceForceAsymmetric = "Error reading advanced cluster datasource, was expecting symmetric shards but found asymmetric shards"
+ errorReadDatasourceForceAsymmetricDetail = "Cluster name %s. Please add `use_replication_spec_per_shard = true` to your data source configuration to enable asymmetric shard support. %s"
+)
+
func DataSource() datasource.DataSource {
return &ds{
DSCommon: config.DSCommon{
@@ -26,22 +33,52 @@ type ds struct {
}
func (d *ds) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
- resp.Schema = conversion.DataSourceSchemaFromResource(ResourceSchema(ctx), &conversion.DataSourceSchemaRequest{
- RequiredFields: []string{"project_id", "name"},
- OverridenFields: map[string]schema.Attribute{
- "use_replication_spec_per_shard": schema.BoolAttribute{ // TODO: added as in current resource
- Optional: true,
- MarkdownDescription: "use_replication_spec_per_shard", // TODO: add documentation
- },
- },
- })
+ resp.Schema = dataSourceSchema(ctx)
}
func (d *ds) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
+ var state TFModelDS
+ diags := &resp.Diagnostics
+ diags.Append(req.Config.Get(ctx, &state)...)
+ if diags.HasError() {
+ return
+ }
+ model := d.readCluster(ctx, diags, &state)
+ if model != nil {
+ diags.Append(resp.State.Set(ctx, model)...)
+ }
}
-// TODO: see if resource model can be used instead, probably different only in timeouts
-type ModelDS struct {
- ProjectID types.String `tfsdk:"project_id"`
- Name types.String `tfsdk:"name"`
+func (d *ds) readCluster(ctx context.Context, diags *diag.Diagnostics, modelDS *TFModelDS) *TFModelDS {
+ clusterName := modelDS.Name.ValueString()
+ projectID := modelDS.ProjectID.ValueString()
+ useReplicationSpecPerShard := modelDS.UseReplicationSpecPerShard.ValueBool()
+ api := d.Client.AtlasV2.ClustersApi
+ clusterResp, _, err := api.GetCluster(ctx, projectID, clusterName).Execute()
+ if err != nil {
+ if admin.IsErrorCode(err, ErrorCodeClusterNotFound) {
+ return nil
+ }
+ diags.AddError(errorReadDatasource, defaultAPIErrorDetails(clusterName, err))
+ return nil
+ }
+ modelIn := &TFModel{
+ ProjectID: modelDS.ProjectID,
+ Name: modelDS.Name,
+ }
+ modelOut, extraInfo := getBasicClusterModel(ctx, diags, d.Client, clusterResp, modelIn, !useReplicationSpecPerShard)
+ if diags.HasError() {
+ return nil
+ }
+ if extraInfo.ForceLegacySchemaFailed {
+ diags.AddError(errorReadDatasourceForceAsymmetric, fmt.Sprintf(errorReadDatasourceForceAsymmetricDetail, clusterName, DeprecationOldSchemaAction))
+ return nil
+ }
+ updateModelAdvancedConfig(ctx, diags, d.Client, modelOut, nil, nil)
+ if diags.HasError() {
+ return nil
+ }
+ modelOutDS := conversion.CopyModel[TFModelDS](modelOut)
+ modelOutDS.UseReplicationSpecPerShard = modelDS.UseReplicationSpecPerShard // attrs not in resource model
+ return modelOutDS
}
diff --git a/internal/service/advancedclustertpf/model_ClusterDescription20240805.go b/internal/service/advancedclustertpf/model_ClusterDescription20240805.go
index 6491fc2879..d57b4fa70c 100644
--- a/internal/service/advancedclustertpf/model_ClusterDescription20240805.go
+++ b/internal/service/advancedclustertpf/model_ClusterDescription20240805.go
@@ -25,6 +25,7 @@ type ExtraAPIInfo struct {
RootDiskSize *float64
ContainerIDs map[string]string
UsingLegacySchema bool
+ ForceLegacySchemaFailed bool
}
func NewTFModel(ctx context.Context, input *admin.ClusterDescription20240805, timeout timeouts.Value, diags *diag.Diagnostics, apiInfo ExtraAPIInfo) *TFModel {
@@ -38,32 +39,32 @@ func NewTFModel(ctx context.Context, input *admin.ClusterDescription20240805, ti
}
return &TFModel{
AcceptDataRisksAndForceReplicaSetReconfig: types.StringPointerValue(conversion.TimePtrToStringPtr(input.AcceptDataRisksAndForceReplicaSetReconfig)),
- BackupEnabled: types.BoolPointerValue(input.BackupEnabled),
+ BackupEnabled: types.BoolValue(conversion.SafeValue(input.BackupEnabled)),
BiConnectorConfig: biConnector,
- ClusterType: types.StringPointerValue(input.ClusterType),
- ConfigServerManagementMode: types.StringPointerValue(input.ConfigServerManagementMode),
- ConfigServerType: types.StringPointerValue(input.ConfigServerType),
+ ClusterType: types.StringValue(conversion.SafeValue(input.ClusterType)),
+ ConfigServerManagementMode: types.StringValue(conversion.SafeValue(input.ConfigServerManagementMode)),
+ ConfigServerType: types.StringValue(conversion.SafeValue(input.ConfigServerType)),
ConnectionStrings: connectionStrings,
- CreateDate: types.StringPointerValue(conversion.TimePtrToStringPtr(input.CreateDate)),
+ CreateDate: types.StringValue(conversion.SafeValue(conversion.TimePtrToStringPtr(input.CreateDate))),
DiskSizeGB: types.Float64PointerValue(findRegionRootDiskSize(input.ReplicationSpecs)),
- EncryptionAtRestProvider: types.StringPointerValue(input.EncryptionAtRestProvider),
- GlobalClusterSelfManagedSharding: types.BoolPointerValue(input.GlobalClusterSelfManagedSharding),
- ProjectID: types.StringPointerValue(input.GroupId),
- ClusterID: types.StringPointerValue(input.Id),
+ EncryptionAtRestProvider: types.StringValue(conversion.SafeValue(input.EncryptionAtRestProvider)),
+ GlobalClusterSelfManagedSharding: types.BoolValue(conversion.SafeValue(input.GlobalClusterSelfManagedSharding)),
+ ProjectID: types.StringValue(conversion.SafeValue(input.GroupId)),
+ ClusterID: types.StringValue(conversion.SafeValue(input.Id)),
Labels: labels,
- MongoDBMajorVersion: types.StringPointerValue(input.MongoDBMajorVersion),
- MongoDBVersion: types.StringPointerValue(input.MongoDBVersion),
- Name: types.StringPointerValue(input.Name),
- Paused: types.BoolPointerValue(input.Paused),
- PitEnabled: types.BoolPointerValue(input.PitEnabled),
- RedactClientLogData: types.BoolPointerValue(input.RedactClientLogData),
- ReplicaSetScalingStrategy: types.StringPointerValue(input.ReplicaSetScalingStrategy),
+ MongoDBMajorVersion: types.StringValue(conversion.SafeValue(input.MongoDBMajorVersion)),
+ MongoDBVersion: types.StringValue(conversion.SafeValue(input.MongoDBVersion)),
+ Name: types.StringValue(conversion.SafeValue(input.Name)),
+ Paused: types.BoolValue(conversion.SafeValue(input.Paused)),
+ PitEnabled: types.BoolValue(conversion.SafeValue(input.PitEnabled)),
+ RedactClientLogData: types.BoolValue(conversion.SafeValue(input.RedactClientLogData)),
+ ReplicaSetScalingStrategy: types.StringValue(conversion.SafeValue(input.ReplicaSetScalingStrategy)),
ReplicationSpecs: replicationSpecs,
- RootCertType: types.StringPointerValue(input.RootCertType),
- StateName: types.StringPointerValue(input.StateName),
+ RootCertType: types.StringValue(conversion.SafeValue(input.RootCertType)),
+ StateName: types.StringValue(conversion.SafeValue(input.StateName)),
Tags: tags,
- TerminationProtectionEnabled: types.BoolPointerValue(input.TerminationProtectionEnabled),
- VersionReleaseSystem: types.StringPointerValue(input.VersionReleaseSystem),
+ TerminationProtectionEnabled: types.BoolValue(conversion.SafeValue(input.TerminationProtectionEnabled)),
+ VersionReleaseSystem: types.StringValue(conversion.SafeValue(input.VersionReleaseSystem)),
PinnedFCV: types.ObjectNull(PinnedFCVObjType.AttrTypes), // TODO static object
Timeouts: timeout,
}
@@ -74,8 +75,8 @@ func NewBiConnectorConfigObjType(ctx context.Context, input *admin.BiConnector,
return types.ObjectNull(BiConnectorConfigObjType.AttrTypes)
}
tfModel := TFBiConnectorModel{
- Enabled: types.BoolPointerValue(input.Enabled),
- ReadPreference: types.StringPointerValue(input.ReadPreference),
+ Enabled: types.BoolValue(conversion.SafeValue(input.Enabled)),
+ ReadPreference: types.StringValue(conversion.SafeValue(input.ReadPreference)),
}
objType, diagsLocal := types.ObjectValueFrom(ctx, BiConnectorConfigObjType.AttrTypes, tfModel)
diags.Append(diagsLocal...)
@@ -88,11 +89,11 @@ func NewConnectionStringsObjType(ctx context.Context, input *admin.ClusterConnec
}
privateEndpoint := NewPrivateEndpointObjType(ctx, input.PrivateEndpoint, diags)
tfModel := TFConnectionStringsModel{
- Private: types.StringPointerValue(input.Private),
+ Private: types.StringValue(conversion.SafeValue(input.Private)),
PrivateEndpoint: privateEndpoint,
- PrivateSrv: types.StringPointerValue(input.PrivateSrv),
- Standard: types.StringPointerValue(input.Standard),
- StandardSrv: types.StringPointerValue(input.StandardSrv),
+ PrivateSrv: types.StringValue(conversion.SafeValue(input.PrivateSrv)),
+ Standard: types.StringValue(conversion.SafeValue(input.Standard)),
+ StandardSrv: types.StringValue(conversion.SafeValue(input.StandardSrv)),
}
objType, diagsLocal := types.ObjectValueFrom(ctx, ConnectionStringsObjType.AttrTypes, tfModel)
diags.Append(diagsLocal...)
@@ -106,8 +107,8 @@ func NewLabelsObjType(ctx context.Context, input *[]admin.ComponentLabel, diags
tfModels := make([]TFLabelsModel, len(*input))
for i, item := range *input {
tfModels[i] = TFLabelsModel{
- Key: types.StringPointerValue(item.Key),
- Value: types.StringPointerValue(item.Value),
+ Key: types.StringValue(conversion.SafeValue(item.Key)),
+ Value: types.StringValue(conversion.SafeValue(item.Value)),
}
}
setType, diagsLocal := types.SetValueFrom(ctx, LabelsObjType, tfModels)
@@ -143,19 +144,37 @@ func convertReplicationSpecs(ctx context.Context, input *[]admin.ReplicationSpec
return &tfModels
}
legacyID := apiInfo.ZoneNameReplicationSpecIDs[zoneName]
+ containerIDs := selectContainerIDs(&item, apiInfo.ContainerIDs)
tfModels[i] = TFReplicationSpecsModel{
- Id: conversion.StringNullIfEmpty(legacyID),
- ExternalId: types.StringPointerValue(item.Id),
+ Id: types.StringValue(legacyID),
+ ExternalId: types.StringValue(conversion.SafeValue(item.Id)),
NumShards: types.Int64Value(1),
- ContainerId: conversion.ToTFMapOfString(ctx, diags, &apiInfo.ContainerIDs),
+ ContainerId: conversion.ToTFMapOfString(ctx, diags, &containerIDs),
RegionConfigs: regionConfigs,
- ZoneId: types.StringPointerValue(item.ZoneId),
- ZoneName: types.StringPointerValue(item.ZoneName),
+ ZoneId: types.StringValue(conversion.SafeValue(item.ZoneId)),
+ ZoneName: types.StringValue(conversion.SafeValue(item.ZoneName)),
}
}
return &tfModels
}
+func selectContainerIDs(spec *admin.ReplicationSpec20240805, allIDs map[string]string) map[string]string {
+ containerIDs := map[string]string{}
+ regions := spec.GetRegionConfigs()
+ for i := range regions {
+ regionConfig := regions[i]
+ providerName := regionConfig.GetProviderName()
+ key := containerIDKey(providerName, regionConfig.GetRegionName())
+ value := allIDs[key]
+ // Should be no hard failure if not found, as it is not required for TENANT, error responsibility in resolveContainerIDs
+ if value == "" {
+ continue
+ }
+ containerIDs[key] = value
+ }
+ return containerIDs
+}
+
func convertReplicationSpecsLegacy(ctx context.Context, input *[]admin.ReplicationSpec20240805, diags *diag.Diagnostics, apiInfo *ExtraAPIInfo) *[]TFReplicationSpecsModel {
tfModels := []TFReplicationSpecsModel{}
tfModelsSkipIndexes := []int{}
@@ -187,14 +206,15 @@ func convertReplicationSpecsLegacy(ctx context.Context, input *[]admin.Replicati
tfModelsSkipIndexes = append(tfModelsSkipIndexes, i+j)
}
}
+ containerIDs := selectContainerIDs(&item, apiInfo.ContainerIDs)
tfModels = append(tfModels, TFReplicationSpecsModel{
- ContainerId: conversion.ToTFMapOfString(ctx, diags, &apiInfo.ContainerIDs),
- ExternalId: types.StringPointerValue(item.Id),
+ ContainerId: conversion.ToTFMapOfString(ctx, diags, &containerIDs),
+ ExternalId: types.StringValue(conversion.SafeValue(item.Id)),
Id: types.StringValue(legacyID),
RegionConfigs: regionConfigs,
NumShards: types.Int64Value(numShards),
- ZoneId: types.StringPointerValue(item.ZoneId),
- ZoneName: types.StringPointerValue(item.ZoneName),
+ ZoneId: types.StringValue(conversion.SafeValue(item.ZoneId)),
+ ZoneName: types.StringValue(conversion.SafeValue(item.ZoneName)),
})
}
return &tfModels
@@ -225,11 +245,11 @@ func NewPrivateEndpointObjType(ctx context.Context, input *[]admin.ClusterDescri
for i, item := range *input {
endpoints := NewEndpointsObjType(ctx, item.Endpoints, diags)
tfModels[i] = TFPrivateEndpointModel{
- ConnectionString: types.StringPointerValue(item.ConnectionString),
+ ConnectionString: types.StringValue(conversion.SafeValue(item.ConnectionString)),
Endpoints: endpoints,
- SrvConnectionString: types.StringPointerValue(item.SrvConnectionString),
- SrvShardOptimizedConnectionString: types.StringPointerValue(item.SrvShardOptimizedConnectionString),
- Type: types.StringPointerValue(item.Type),
+ SrvConnectionString: types.StringValue(conversion.SafeValue(item.SrvConnectionString)),
+ SrvShardOptimizedConnectionString: types.StringValue(conversion.SafeValue(item.SrvShardOptimizedConnectionString)),
+ Type: types.StringValue(conversion.SafeValue(item.Type)),
}
}
listType, diagsLocal := types.ListValueFrom(ctx, PrivateEndpointObjType, tfModels)
@@ -255,9 +275,9 @@ func NewRegionConfigsObjType(ctx context.Context, input *[]admin.CloudRegionConf
BackingProviderName: types.StringPointerValue(item.BackingProviderName),
ElectableSpecs: electableSpecs,
Priority: types.Int64PointerValue(conversion.IntPtrToInt64Ptr(item.Priority)),
- ProviderName: types.StringPointerValue(item.ProviderName),
+ ProviderName: types.StringValue(conversion.SafeValue(item.ProviderName)),
ReadOnlySpecs: readOnlySpecs,
- RegionName: types.StringPointerValue(item.RegionName),
+ RegionName: types.StringValue(conversion.SafeValue(item.RegionName)),
}
}
listType, diagsLocal := types.ListValueFrom(ctx, RegionConfigsObjType, tfModels)
@@ -272,9 +292,9 @@ func NewEndpointsObjType(ctx context.Context, input *[]admin.ClusterDescriptionC
tfModels := make([]TFEndpointsModel, len(*input))
for i, item := range *input {
tfModels[i] = TFEndpointsModel{
- EndpointId: types.StringPointerValue(item.EndpointId),
- ProviderName: types.StringPointerValue(item.ProviderName),
- Region: types.StringPointerValue(item.Region),
+ EndpointId: types.StringValue(conversion.SafeValue(item.EndpointId)),
+ ProviderName: types.StringValue(conversion.SafeValue(item.ProviderName)),
+ Region: types.StringValue(conversion.SafeValue(item.Region)),
}
}
listType, diagsLocal := types.ListValueFrom(ctx, EndpointsObjType, tfModels)
@@ -289,8 +309,8 @@ func NewSpecsObjType(ctx context.Context, input *admin.DedicatedHardwareSpec2024
tfModel := TFSpecsModel{
DiskIops: types.Int64PointerValue(conversion.IntPtrToInt64Ptr(input.DiskIOPS)),
DiskSizeGb: types.Float64PointerValue(input.DiskSizeGB),
- EbsVolumeType: types.StringPointerValue(input.EbsVolumeType),
- InstanceSize: types.StringPointerValue(input.InstanceSize),
+ EbsVolumeType: types.StringValue(conversion.SafeValue(input.EbsVolumeType)),
+ InstanceSize: types.StringValue(conversion.SafeValue(input.InstanceSize)),
NodeCount: types.Int64PointerValue(conversion.IntPtrToInt64Ptr(input.NodeCount)),
}
objType, diagsLocal := types.ObjectValueFrom(ctx, SpecsObjType.AttrTypes, tfModel)
@@ -305,8 +325,8 @@ func NewSpecsFromHwObjType(ctx context.Context, input *admin.HardwareSpec2024080
tfModel := TFSpecsModel{
DiskIops: types.Int64PointerValue(conversion.IntPtrToInt64Ptr(input.DiskIOPS)),
DiskSizeGb: types.Float64PointerValue(input.DiskSizeGB),
- EbsVolumeType: types.StringPointerValue(input.EbsVolumeType),
- InstanceSize: types.StringPointerValue(input.InstanceSize),
+ EbsVolumeType: types.StringValue(conversion.SafeValue(input.EbsVolumeType)),
+ InstanceSize: types.StringValue(conversion.SafeValue(input.InstanceSize)),
NodeCount: types.Int64PointerValue(conversion.IntPtrToInt64Ptr(input.NodeCount)),
}
objType, diagsLocal := types.ObjectValueFrom(ctx, SpecsObjType.AttrTypes, tfModel)
@@ -321,14 +341,14 @@ func NewAutoScalingObjType(ctx context.Context, input *admin.AdvancedAutoScaling
compute := input.Compute
tfModel := TFAutoScalingModel{}
if compute != nil {
- tfModel.ComputeMaxInstanceSize = types.StringPointerValue(compute.MaxInstanceSize)
- tfModel.ComputeMinInstanceSize = types.StringPointerValue(compute.MinInstanceSize)
- tfModel.ComputeEnabled = types.BoolPointerValue(compute.Enabled)
- tfModel.ComputeScaleDownEnabled = types.BoolPointerValue(compute.ScaleDownEnabled)
+ tfModel.ComputeMaxInstanceSize = types.StringValue(conversion.SafeValue(compute.MaxInstanceSize))
+ tfModel.ComputeMinInstanceSize = types.StringValue(conversion.SafeValue(compute.MinInstanceSize))
+ tfModel.ComputeEnabled = types.BoolValue(conversion.SafeValue(compute.Enabled))
+ tfModel.ComputeScaleDownEnabled = types.BoolValue(conversion.SafeValue(compute.ScaleDownEnabled))
}
diskGB := input.DiskGB
if diskGB != nil {
- tfModel.DiskGBEnabled = types.BoolPointerValue(diskGB.Enabled)
+ tfModel.DiskGBEnabled = types.BoolValue(conversion.SafeValue(diskGB.Enabled))
}
objType, diagsLocal := types.ObjectValueFrom(ctx, AutoScalingObjType.AttrTypes, tfModel)
diags.Append(diagsLocal...)
diff --git a/internal/service/advancedclustertpf/model_ClusterDescriptionProcessArgs20240805.go b/internal/service/advancedclustertpf/model_ClusterDescriptionProcessArgs20240805.go
index dbcd79b6b1..ff14a68650 100644
--- a/internal/service/advancedclustertpf/model_ClusterDescriptionProcessArgs20240805.go
+++ b/internal/service/advancedclustertpf/model_ClusterDescriptionProcessArgs20240805.go
@@ -19,19 +19,31 @@ func AddAdvancedConfig(ctx context.Context, tfModel *TFModel, input *admin.Clust
// special behavior using -1 when it is unset by the user
changeStreamOptionsPreAndPostImagesExpireAfterSeconds = conversion.Pointer(-1)
}
+ // When MongoDBMajorVersion is not 4.4 or lower, the API response for fail_index_key_too_long will always be null, to ensure no consistency issues, we need to match the config
+ failIndexKeyTooLong := inputLegacy.GetFailIndexKeyTooLong()
+ if tfModel != nil {
+ stateConfig := tfModel.AdvancedConfiguration
+ stateConfigSDK := NewAtlasReqAdvancedConfigurationLegacy(ctx, &stateConfig, diags)
+ if diags.HasError() {
+ return
+ }
+ if stateConfigSDK != nil && stateConfigSDK.GetFailIndexKeyTooLong() != failIndexKeyTooLong {
+ failIndexKeyTooLong = stateConfigSDK.GetFailIndexKeyTooLong()
+ }
+ }
advancedConfig = TFAdvancedConfigurationModel{
ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: types.Int64PointerValue(conversion.IntPtrToInt64Ptr(changeStreamOptionsPreAndPostImagesExpireAfterSeconds)),
- DefaultWriteConcern: types.StringPointerValue(input.DefaultWriteConcern),
- DefaultReadConcern: types.StringPointerValue(inputLegacy.DefaultReadConcern),
- FailIndexKeyTooLong: types.BoolPointerValue(inputLegacy.FailIndexKeyTooLong),
- JavascriptEnabled: types.BoolPointerValue(input.JavascriptEnabled),
- MinimumEnabledTlsProtocol: types.StringPointerValue(input.MinimumEnabledTlsProtocol),
- NoTableScan: types.BoolPointerValue(input.NoTableScan),
- OplogMinRetentionHours: types.Float64PointerValue(input.OplogMinRetentionHours),
- OplogSizeMb: types.Int64PointerValue(conversion.IntPtrToInt64Ptr(input.OplogSizeMB)),
- SampleSizeBiconnector: types.Int64PointerValue(conversion.IntPtrToInt64Ptr(input.SampleSizeBIConnector)),
- SampleRefreshIntervalBiconnector: types.Int64PointerValue(conversion.IntPtrToInt64Ptr(input.SampleRefreshIntervalBIConnector)),
- TransactionLifetimeLimitSeconds: types.Int64PointerValue(input.TransactionLifetimeLimitSeconds),
+ DefaultWriteConcern: types.StringValue(conversion.SafeValue(input.DefaultWriteConcern)),
+ DefaultReadConcern: types.StringValue(conversion.SafeValue(inputLegacy.DefaultReadConcern)),
+ FailIndexKeyTooLong: types.BoolValue(failIndexKeyTooLong),
+ JavascriptEnabled: types.BoolValue(conversion.SafeValue(input.JavascriptEnabled)),
+ MinimumEnabledTlsProtocol: types.StringValue(conversion.SafeValue(input.MinimumEnabledTlsProtocol)),
+ NoTableScan: types.BoolValue(conversion.SafeValue(input.NoTableScan)),
+ OplogMinRetentionHours: types.Float64Value(conversion.SafeValue(input.OplogMinRetentionHours)),
+ OplogSizeMb: types.Int64Value(conversion.SafeValue(conversion.IntPtrToInt64Ptr(input.OplogSizeMB))),
+ SampleSizeBiconnector: types.Int64Value(conversion.SafeValue(conversion.IntPtrToInt64Ptr(input.SampleSizeBIConnector))),
+ SampleRefreshIntervalBiconnector: types.Int64Value(conversion.SafeValue(conversion.IntPtrToInt64Ptr(input.SampleRefreshIntervalBIConnector))),
+ TransactionLifetimeLimitSeconds: types.Int64Value(conversion.SafeValue(input.TransactionLifetimeLimitSeconds)),
}
}
objType, diagsLocal := types.ObjectValueFrom(ctx, AdvancedConfigurationObjType.AttrTypes, advancedConfig)
diff --git a/internal/service/advancedclustertpf/model_to_ClusterDescription20240805.go b/internal/service/advancedclustertpf/model_to_ClusterDescription20240805.go
index 2e3b9f5eb5..a0bf99fc5a 100644
--- a/internal/service/advancedclustertpf/model_to_ClusterDescription20240805.go
+++ b/internal/service/advancedclustertpf/model_to_ClusterDescription20240805.go
@@ -61,7 +61,7 @@ func newBiConnector(ctx context.Context, input types.Object, diags *diag.Diagnos
}
}
func newComponentLabel(ctx context.Context, input types.Set, diags *diag.Diagnostics) *[]admin.ComponentLabel {
- if input.IsUnknown() || input.IsNull() {
+ if input.IsUnknown() {
return nil
}
elements := make([]TFLabelsModel, len(input.Elements()))
@@ -110,7 +110,7 @@ func resolveZoneNameOrUseDefault(item *TFReplicationSpecsModel) string {
}
func newResourceTag(ctx context.Context, input types.Set, diags *diag.Diagnostics) *[]admin.ResourceTag {
- if input.IsUnknown() || input.IsNull() {
+ if input.IsUnknown() {
return nil
}
elements := make([]TFTagsModel, len(input.Elements()))
@@ -183,7 +183,7 @@ func newHardwareSpec20240805(ctx context.Context, input types.Object, diags *dia
return &admin.HardwareSpec20240805{
DiskIOPS: conversion.NilForUnknown(item.DiskIops, conversion.Int64PtrToIntPtr(item.DiskIops.ValueInt64Pointer())),
DiskSizeGB: conversion.NilForUnknown(item.DiskSizeGb, item.DiskSizeGb.ValueFloat64Pointer()),
- EbsVolumeType: conversion.NilForUnknown(item.EbsVolumeType, item.EbsVolumeType.ValueStringPointer()),
+ EbsVolumeType: conversion.NilForUnknownOrEmptyString(item.EbsVolumeType),
InstanceSize: conversion.NilForUnknown(item.InstanceSize, item.InstanceSize.ValueStringPointer()),
NodeCount: conversion.NilForUnknown(item.NodeCount, conversion.Int64PtrToIntPtr(item.NodeCount.ValueInt64Pointer())),
}
@@ -201,8 +201,8 @@ func newDedicatedHardwareSpec20240805(ctx context.Context, input types.Object, d
return &admin.DedicatedHardwareSpec20240805{
DiskIOPS: conversion.NilForUnknown(item.DiskIops, conversion.Int64PtrToIntPtr(item.DiskIops.ValueInt64Pointer())),
DiskSizeGB: conversion.NilForUnknown(item.DiskSizeGb, item.DiskSizeGb.ValueFloat64Pointer()),
- EbsVolumeType: conversion.NilForUnknown(item.EbsVolumeType, item.EbsVolumeType.ValueStringPointer()),
- InstanceSize: conversion.NilForUnknown(item.InstanceSize, item.InstanceSize.ValueStringPointer()),
+ EbsVolumeType: conversion.NilForUnknownOrEmptyString(item.EbsVolumeType),
+ InstanceSize: conversion.NilForUnknownOrEmptyString(item.InstanceSize),
NodeCount: conversion.NilForUnknown(item.NodeCount, conversion.Int64PtrToIntPtr(item.NodeCount.ValueInt64Pointer())),
}
}
@@ -220,8 +220,8 @@ func newAdvancedComputeAutoScaling(ctx context.Context, input types.Object, diag
return &admin.AdvancedComputeAutoScaling{
Enabled: conversion.NilForUnknown(item.ComputeEnabled, item.ComputeEnabled.ValueBoolPointer()),
ScaleDownEnabled: conversion.NilForUnknown(item.ComputeScaleDownEnabled, item.ComputeScaleDownEnabled.ValueBoolPointer()),
- MaxInstanceSize: conversion.NilForUnknown(item.ComputeMaxInstanceSize, item.ComputeMaxInstanceSize.ValueStringPointer()),
- MinInstanceSize: conversion.NilForUnknown(item.ComputeMinInstanceSize, item.ComputeMinInstanceSize.ValueStringPointer()),
+ MaxInstanceSize: conversion.NilForUnknownOrEmptyString(item.ComputeMaxInstanceSize),
+ MinInstanceSize: conversion.NilForUnknownOrEmptyString(item.ComputeMinInstanceSize),
}
}
func newDiskGBAutoScaling(ctx context.Context, input types.Object, diags *diag.Diagnostics) *admin.DiskGBAutoScaling {
diff --git a/internal/service/advancedclustertpf/plural_data_source.go b/internal/service/advancedclustertpf/plural_data_source.go
index 5da1ba424f..46560e717a 100644
--- a/internal/service/advancedclustertpf/plural_data_source.go
+++ b/internal/service/advancedclustertpf/plural_data_source.go
@@ -3,12 +3,15 @@ package advancedclustertpf
import (
"context"
"fmt"
+ "net/http"
"github.com/hashicorp/terraform-plugin-framework/datasource"
- "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
+ "github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/common/dsschema"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
+ "go.mongodb.org/atlas-sdk/v20241113003/admin"
)
var _ datasource.DataSource = &pluralDS{}
@@ -27,26 +30,63 @@ type pluralDS struct {
}
func (d *pluralDS) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
- resp.Schema = conversion.PluralDataSourceSchemaFromResource(ResourceSchema(ctx), &conversion.PluralDataSourceSchemaRequest{
- RequiredFields: []string{"project_id"},
- OverridenRootFields: map[string]schema.Attribute{
- "use_replication_spec_per_shard": schema.BoolAttribute{ // TODO: added as in current resource
- Optional: true,
- MarkdownDescription: "use_replication_spec_per_shard", // TODO: add documentation
- },
- "include_deleted_with_retained_backups": schema.BoolAttribute{ // TODO: not in current resource, decide if keep
- Optional: true,
- MarkdownDescription: "Flag that indicates whether to return Clusters with retain backups.",
- },
- },
- })
+ resp.Schema = pluralDataSourceSchema(ctx)
}
func (d *pluralDS) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
+ var state TFModelPluralDS
+ diags := &resp.Diagnostics
+ diags.Append(req.Config.Get(ctx, &state)...)
+ if diags.HasError() {
+ return
+ }
+ model := d.readClusters(ctx, diags, &state)
+ if model != nil {
+ diags.Append(resp.State.Set(ctx, model)...)
+ }
}
-type AdvancedClustersModel struct {
- ProjectID types.String `tfsdk:"project_id"`
- UseReplicationSpecPerShard types.Bool `tfsdk:"use_replication_spec_per_shard"` // TODO: added as in current resource
- IncludeDeletedWithRetainedBackups types.Bool `tfsdk:"include_deleted_with_retained_backups"` // TODO: not in current resource, decide if keep
+func (d *pluralDS) readClusters(ctx context.Context, diags *diag.Diagnostics, pluralModel *TFModelPluralDS) *TFModelPluralDS {
+ projectID := pluralModel.ProjectID.ValueString()
+ useReplicationSpecPerShard := pluralModel.UseReplicationSpecPerShard.ValueBool()
+ api := d.Client.AtlasV2.ClustersApi
+ params := admin.ListClustersApiParams{
+ GroupId: projectID,
+ }
+ list, err := dsschema.AllPages(ctx, func(ctx context.Context, pageNum int) (dsschema.PaginateResponse[admin.ClusterDescription20240805], *http.Response, error) {
+ request := api.ListClustersWithParams(ctx, ¶ms)
+ request = request.PageNum(pageNum)
+ return request.Execute()
+ })
+ if err != nil {
+ diags.AddError(errorList, fmt.Sprintf(errorListDetail, projectID, err.Error()))
+ return nil
+ }
+ outs := &TFModelPluralDS{
+ ProjectID: pluralModel.ProjectID,
+ UseReplicationSpecPerShard: pluralModel.UseReplicationSpecPerShard,
+ IncludeDeletedWithRetainedBackups: pluralModel.IncludeDeletedWithRetainedBackups,
+ }
+ for i := range list {
+ clusterResp := &list[i]
+ modelIn := &TFModel{
+ ProjectID: pluralModel.ProjectID,
+ Name: types.StringValue(clusterResp.GetName()),
+ }
+ modelOut, extraInfo := getBasicClusterModel(ctx, diags, d.Client, clusterResp, modelIn, !useReplicationSpecPerShard)
+ if diags.HasError() {
+ return nil
+ }
+ if extraInfo.ForceLegacySchemaFailed {
+ continue
+ }
+ updateModelAdvancedConfig(ctx, diags, d.Client, modelOut, nil, nil)
+ if diags.HasError() {
+ return nil
+ }
+ modelOutDS := conversion.CopyModel[TFModelDS](modelOut)
+ modelOutDS.UseReplicationSpecPerShard = pluralModel.UseReplicationSpecPerShard // attrs not in resource model
+ outs.Results = append(outs.Results, modelOutDS)
+ }
+ return outs
}
diff --git a/internal/service/advancedclustertpf/resource.go b/internal/service/advancedclustertpf/resource.go
index 95cd97d716..7dcfe14d69 100644
--- a/internal/service/advancedclustertpf/resource.go
+++ b/internal/service/advancedclustertpf/resource.go
@@ -9,7 +9,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
- "github.com/hashicorp/terraform-plugin-framework/types"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/constant"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/update"
@@ -24,31 +23,54 @@ var _ resource.ResourceWithImportState = &rs{}
var _ resource.ResourceWithMoveState = &rs{}
const (
- resourceName = "advanced_cluster"
- errorCreate = "error creating advanced cluster: %s"
- errorRead = "error reading advanced cluster (%s): %s"
- errorDelete = "error deleting advanced cluster (%s): %s"
- errorUpdate = "error updating advanced cluster (%s): %s"
- errorConfigUpdate = "error updating advanced cluster configuration options (%s): %s"
- errorConfigRead = "error reading advanced cluster configuration options (%s): %s"
- ErrorClusterSetting = "error setting `%s` for MongoDB Cluster (%s): %s"
- ErrorAdvancedConfRead = "error reading Advanced Configuration Option form MongoDB Cluster (%s): %s"
- ErrorClusterAdvancedSetting = "error setting `%s` for MongoDB ClusterAdvanced (%s): %s"
- ErrorAdvancedClusterListStatus = "error awaiting MongoDB ClusterAdvanced List IDLE: %s"
- ErrorOperationNotPermitted = "error operation not permitted"
- ignoreLabel = "Infrastructure Tool"
- DeprecationOldSchemaAction = "Please refer to our examples, documentation, and 1.18.0 migration guide for more details at https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/1.18.0-upgrade-guide.html.markdown"
- defaultTimeout = 3 * time.Hour
- ErrorCodeClusterNotFound = "CLUSTER_NOT_FOUND"
- changeReasonUpdate = "update"
- changeReasonCreate = "create"
- changeReasonDelete = "delete"
+ resourceName = "advanced_cluster"
+ errorSchemaDowngrade = "error operation not permitted, nums_shards from 1 -> > 1"
+ errorPatchPayload = "error creating patch payload"
+ errorCreate = "error creating advanced cluster"
+ errorDetailDefault = "cluster name %s. API error detail %s"
+ errorUpdateAdvancedConfigLegacy = "error updating advanced cluster advanced configuration options with legacy API"
+ errorSchemaUpgradeReadIDs = "error reading IDs from API when upgrading schema"
+ errorReadResource = "error reading advanced cluster"
+ errorAdvancedConfRead = "error reading Advanced Configuration"
+ errorAdvancedConfReadLegacy = "error reading Advanced Configuration from legacy API"
+ errorDelete = "error deleting advanced cluster"
+ errorUpdate = "error updating advanced cluster"
+ errorUpdateLegacy20240805 = "error updating advanced cluster legacy API 20240805"
+ errorUpdateLegacy20240530 = "error updating advanced cluster legacy API 20240530"
+ errorList = "error reading advanced cluster list"
+ errorListDetail = "project ID %s. Error %s"
+ errorTenantUpgrade = "error upgrading tenant cluster"
+ errorReadLegacy20240530 = "error reading cluster with legacy API 20240530"
+ errorResolveContainerIDs = "error resolving container IDs"
+ errorRegionPriorities = "priority values in region_configs must be in descending order"
+ errorUnknownChangeReason = "unknown change reason"
+ errorAwaitState = "error awaiting cluster to reach desired state"
+ errorAwaitStateResultType = "the result of awaiting cluster wasn't of the expected type"
+
+ // TODO: Used in two places
+ errorAdvancedConfUpdate = "error updating Advanced Configuration"
+ errorAdvancedConfUpdateLegacy = "error updating Advanced Configuration from legacy API"
+
+ DeprecationOldSchemaAction = "Please refer to our examples, documentation, and 1.18.0 migration guide for more details at https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/1.18.0-upgrade-guide.html.markdown"
+ defaultTimeout = 3 * time.Hour
+ ErrorCodeClusterNotFound = "CLUSTER_NOT_FOUND"
+ changeReasonUpdate = "update"
+ changeReasonCreate = "create"
+ changeReasonDelete = "delete"
)
+func defaultAPIErrorDetails(clusterName string, err error) string {
+ return fmt.Sprintf(errorDetailDefault, clusterName, err.Error())
+}
+
+func deprecationMsgOldSchema(name string) string {
+ return fmt.Sprintf("%s Name=%s. %s", constant.DeprecationParam, name, DeprecationOldSchemaAction)
+}
+
var (
- DeprecationMsgOldSchema = fmt.Sprintf("%s %s", constant.DeprecationParam, DeprecationOldSchemaAction)
- pauseRequest = admin.ClusterDescription20240805{Paused: conversion.Pointer(true)}
- resumeRequest = admin.ClusterDescription20240805{Paused: conversion.Pointer(false)}
+ pauseRequest = admin.ClusterDescription20240805{Paused: conversion.Pointer(true)}
+ resumeRequest = admin.ClusterDescription20240805{Paused: conversion.Pointer(false)}
+ errorSchemaDowngradeDetail = "Cluster name %s. " + fmt.Sprintf("cannot increase num_shards to > 1 under the current configuration. New shards can be defined by adding new replication spec objects; %s", DeprecationOldSchemaAction)
)
func Resource() resource.Resource {
@@ -64,7 +86,7 @@ type rs struct {
}
func (r *rs) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
- resp.Schema = ResourceSchema(ctx)
+ resp.Schema = resourceSchema(ctx)
conversion.UpdateSchemaDescription(&resp.Schema)
}
@@ -88,7 +110,7 @@ func (r *rs) Read(ctx context.Context, req resource.ReadRequest, resp *resource.
if diags.HasError() {
return
}
- model := r.readCluster(ctx, &state, &resp.State, diags, true)
+ model := r.readCluster(ctx, diags, &state, &resp.State)
if model != nil {
diags.Append(resp.State.Set(ctx, model)...)
}
@@ -102,24 +124,47 @@ func (r *rs) Update(ctx context.Context, req resource.UpdateRequest, resp *resou
if diags.HasError() {
return
}
+ stateUsingLegacy := usingLegacySchema(ctx, state.ReplicationSpecs, diags)
+ planUsingLegacy := usingLegacySchema(ctx, plan.ReplicationSpecs, diags)
+ if planUsingLegacy && !stateUsingLegacy {
+ diags.AddError(errorSchemaDowngrade, fmt.Sprintf(errorSchemaDowngradeDetail, plan.Name.ValueString()))
+ return
+ }
+ isSchemaUpgrade := stateUsingLegacy && !planUsingLegacy
stateReq := normalizeFromTFModel(ctx, &state, diags, false)
- planReq := normalizeFromTFModel(ctx, &plan, diags, false)
+ planReq := normalizeFromTFModel(ctx, &plan, diags, isSchemaUpgrade)
if diags.HasError() {
return
}
- normalizePatchState(stateReq)
- patchReq, err := update.PatchPayload(stateReq, planReq)
+ patchOptions := update.PatchOptions{
+ IgnoreInStatePrefix: []string{"regionConfigs"},
+ IgnoreInStateSuffix: []string{"id", "zoneId"}, // replication_spec.*.zone_id|id doesn't have to be included, the API will do its best to create a minimal change
+ }
+ if findNumShardsUpdates(ctx, &state, &plan, diags) != nil {
+ // force update the replicationSpecs when update.PatchPayload will not detect changes by default:
+ // `num_shards` updates is only in the legacy ClusterDescription
+ patchOptions.ForceUpdateAttr = append(patchOptions.ForceUpdateAttr, "replicationSpecs")
+ }
+ patchReq, err := update.PatchPayload(stateReq, planReq, patchOptions)
if err != nil {
- diags.AddError("errorPatchPayload", err.Error())
+ diags.AddError(errorPatchPayload, err.Error())
return
}
- var cluster *admin.ClusterDescription20240805
+ var clusterResp *admin.ClusterDescription20240805
if !update.IsZeroValues(patchReq) {
upgradeRequest := getTenantUpgradeRequest(stateReq, patchReq)
if upgradeRequest != nil {
- cluster = r.applyTenantUpgrade(ctx, &plan, upgradeRequest, diags)
+ clusterResp = r.applyTenantUpgrade(ctx, &plan, upgradeRequest, diags)
} else {
- cluster = r.applyClusterChanges(ctx, diags, &state, &plan, patchReq)
+ if isSchemaUpgrade {
+ specs, err := populateIDValuesUsingNewAPI(ctx, plan.ProjectID.ValueString(), plan.Name.ValueString(), r.Client.AtlasV2.ClustersApi, patchReq.ReplicationSpecs)
+ if err != nil {
+ diags.AddError(errorSchemaUpgradeReadIDs, defaultAPIErrorDetails(plan.Name.ValueString(), err))
+ return
+ }
+ patchReq.ReplicationSpecs = specs
+ }
+ clusterResp = r.applyClusterChanges(ctx, diags, &state, &plan, patchReq)
}
if diags.HasError() {
return
@@ -129,23 +174,22 @@ func (r *rs) Update(ctx context.Context, req resource.UpdateRequest, resp *resou
if diags.HasError() {
return
}
- var model *TFModel
- if cluster == nil {
- r.updateAdvConfig(ctx, legacyAdvConfig, advConfig, &state, diags)
+ modelOut := &state
+ if clusterResp != nil {
+ modelOut, _ = getBasicClusterModel(ctx, diags, r.Client, clusterResp, &plan, false)
if diags.HasError() {
return
}
- model = &state
- } else {
- var stateAdvConfig types.Object
- if !advConfigChanged {
- stateAdvConfig = state.AdvancedConfiguration
- }
- model = r.convertClusterAddAdvConfig(ctx, legacyAdvConfig, advConfig, cluster, &plan, &stateAdvConfig, diags)
}
- if model != nil {
- diags.Append(resp.State.Set(ctx, model)...)
+ if advConfigChanged {
+ updateModelAdvancedConfig(ctx, diags, r.Client, modelOut, legacyAdvConfig, advConfig)
+ if diags.HasError() {
+ return
+ }
+ } else {
+ modelOut.AdvancedConfiguration = state.AdvancedConfiguration
}
+ diags.Append(resp.State.Set(ctx, modelOut)...)
}
func (r *rs) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {
@@ -167,7 +211,7 @@ func (r *rs) Delete(ctx context.Context, req resource.DeleteRequest, resp *resou
}
_, err := api.DeleteClusterWithParams(ctx, params).Execute()
if err != nil {
- diags.AddError("errorDelete", fmt.Sprintf(errorDelete, clusterName, err.Error()))
+ diags.AddError(errorDelete, defaultAPIErrorDetails(clusterName, err))
return
}
_ = AwaitChanges(ctx, r.Client.AtlasV2.ClustersApi, &state.Timeouts, diags, projectID, clusterName, changeReasonDelete)
@@ -185,6 +229,7 @@ func (r *rs) createCluster(ctx context.Context, plan *TFModel, diags *diag.Diagn
var (
projectID = plan.ProjectID.ValueString()
clusterName = plan.Name.ValueString()
+ api20240805 = r.Client.AtlasV220240805.ClustersApi
api20240530 = r.Client.AtlasV220240530.ClustersApi
api = r.Client.AtlasV2.ClustersApi
err error
@@ -193,17 +238,22 @@ func (r *rs) createCluster(ctx context.Context, plan *TFModel, diags *diag.Diagn
if pauseAfter {
latestReq.Paused = nil
}
- _, _, err = api.CreateCluster(ctx, projectID, latestReq).Execute()
+ if usingLegacySchema(ctx, plan.ReplicationSpecs, diags) {
+ legacyReq := newLegacyModel(latestReq)
+ _, _, err = api20240805.CreateCluster(ctx, projectID, legacyReq).Execute()
+ } else {
+ _, _, err = api.CreateCluster(ctx, projectID, latestReq).Execute()
+ }
if err != nil {
- diags.AddError("errorCreate", fmt.Sprintf(errorCreate, err.Error()))
+ diags.AddError(errorCreate, defaultAPIErrorDetails(clusterName, err))
return nil
}
- cluster := AwaitChanges(ctx, api, &plan.Timeouts, diags, projectID, clusterName, changeReasonCreate)
+ clusterResp := AwaitChanges(ctx, api, &plan.Timeouts, diags, projectID, clusterName, changeReasonCreate)
if diags.HasError() {
return nil
}
if pauseAfter {
- cluster = r.updateAndWait(ctx, &pauseRequest, diags, plan)
+ clusterResp = r.updateAndWait(ctx, &pauseRequest, diags, plan)
}
var legacyAdvConfig *admin20240530.ClusterDescriptionProcessArgs
legacyAdvConfigUpdate := NewAtlasReqAdvancedConfigurationLegacy(ctx, &plan.AdvancedConfiguration, diags)
@@ -211,7 +261,11 @@ func (r *rs) createCluster(ctx context.Context, plan *TFModel, diags *diag.Diagn
legacyAdvConfig, _, err = api20240530.UpdateClusterAdvancedConfiguration(ctx, projectID, clusterName, legacyAdvConfigUpdate).Execute()
if err != nil {
// Maybe should be warning instead of error to avoid having to re-create the cluster
- diags.AddError("errorUpdateeAdvConfigLegacy", fmt.Sprintf(errorCreate, err.Error()))
+ diags.AddError(errorAdvancedConfUpdateLegacy, defaultAPIErrorDetails(clusterName, err))
+ return nil
+ }
+ _ = AwaitChanges(ctx, r.Client.AtlasV2.ClustersApi, &plan.Timeouts, diags, projectID, clusterName, changeReasonCreate)
+ if diags.HasError() {
return nil
}
}
@@ -222,28 +276,49 @@ func (r *rs) createCluster(ctx context.Context, plan *TFModel, diags *diag.Diagn
advConfig, _, err = api.UpdateClusterAdvancedConfiguration(ctx, projectID, clusterName, advConfigUpdate).Execute()
if err != nil {
// Maybe should be warning instead of error to avoid having to re-create the cluster
- diags.AddError("errorUpdateAdvConfig", fmt.Sprintf(errorCreate, err.Error()))
+ diags.AddError(errorAdvancedConfUpdate, defaultAPIErrorDetails(clusterName, err))
return nil
}
+ _ = AwaitChanges(ctx, r.Client.AtlasV2.ClustersApi, &plan.Timeouts, diags, projectID, clusterName, changeReasonCreate)
+ if diags.HasError() {
+ return nil
+ }
+ }
+ modelOut, _ := getBasicClusterModel(ctx, diags, r.Client, clusterResp, plan, false)
+ if diags.HasError() {
+ return nil
}
- return r.convertClusterAddAdvConfig(ctx, legacyAdvConfig, advConfig, cluster, plan, nil, diags)
+ updateModelAdvancedConfig(ctx, diags, r.Client, modelOut, legacyAdvConfig, advConfig)
+ if diags.HasError() {
+ return nil
+ }
+ return modelOut
}
-func (r *rs) readCluster(ctx context.Context, model *TFModel, state *tfsdk.State, diags *diag.Diagnostics, allowNotFound bool) *TFModel {
- clusterName := model.Name.ValueString()
- projectID := model.ProjectID.ValueString()
+func (r *rs) readCluster(ctx context.Context, diags *diag.Diagnostics, modelIn *TFModel, state *tfsdk.State) *TFModel {
+ clusterName := modelIn.Name.ValueString()
+ projectID := modelIn.ProjectID.ValueString()
api := r.Client.AtlasV2.ClustersApi
readResp, _, err := api.GetCluster(ctx, projectID, clusterName).Execute()
if err != nil {
- if admin.IsErrorCode(err, ErrorCodeClusterNotFound) && allowNotFound {
+ if admin.IsErrorCode(err, ErrorCodeClusterNotFound) {
state.RemoveResource(ctx)
return nil
}
- diags.AddError("errorRead", fmt.Sprintf(errorRead, clusterName, err.Error()))
+ diags.AddError(errorReadResource, defaultAPIErrorDetails(clusterName, err))
return nil
}
- return r.convertClusterAddAdvConfig(ctx, nil, nil, readResp, model, nil, diags)
+ modelOut, _ := getBasicClusterModel(ctx, diags, r.Client, readResp, modelIn, false)
+ if diags.HasError() {
+ return nil
+ }
+ updateModelAdvancedConfig(ctx, diags, r.Client, modelOut, nil, nil)
+ if diags.HasError() {
+ return nil
+ }
+ return modelOut
}
+
func (r *rs) applyAdvancedConfigurationChanges(ctx context.Context, diags *diag.Diagnostics, state, plan *TFModel) (legacy *admin20240530.ClusterDescriptionProcessArgs, latest *admin.ClusterDescriptionProcessArgs20240805, changed bool) {
var (
api = r.Client.AtlasV2.ClustersApi
@@ -258,8 +333,12 @@ func (r *rs) applyAdvancedConfigurationChanges(ctx context.Context, diags *diag.
changed = true
advConfig, _, err = api.UpdateClusterAdvancedConfiguration(ctx, projectID, clusterName, patchReqProcessArgs).Execute()
if err != nil {
- diags.AddError("errorUpdateAdvancedConfig", fmt.Sprintf(errorConfigUpdate, clusterName, err.Error()))
- return legacyAdvConfig, advConfig, changed
+ diags.AddError(errorAdvancedConfUpdate, defaultAPIErrorDetails(clusterName, err))
+ return nil, nil, false
+ }
+ _ = AwaitChanges(ctx, r.Client.AtlasV2.ClustersApi, &plan.Timeouts, diags, projectID, clusterName, changeReasonUpdate)
+ if diags.HasError() {
+ return nil, nil, false
}
}
patchReqProcessArgsLegacy := update.PatchPayloadTpf(ctx, diags, &state.AdvancedConfiguration, &plan.AdvancedConfiguration, NewAtlasReqAdvancedConfigurationLegacy)
@@ -267,7 +346,12 @@ func (r *rs) applyAdvancedConfigurationChanges(ctx context.Context, diags *diag.
changed = true
legacyAdvConfig, _, err = r.Client.AtlasV220240530.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, clusterName, patchReqProcessArgsLegacy).Execute()
if err != nil {
- diags.AddError("errorUpdateAdvancedConfigLegacy", fmt.Sprintf(errorConfigUpdate, clusterName, err.Error()))
+ diags.AddError(errorAdvancedConfUpdateLegacy, defaultAPIErrorDetails(clusterName, err))
+ return nil, nil, false
+ }
+ _ = AwaitChanges(ctx, r.Client.AtlasV2.ClustersApi, &plan.Timeouts, diags, projectID, clusterName, changeReasonUpdate)
+ if diags.HasError() {
+ return nil, nil, false
}
}
return legacyAdvConfig, advConfig, changed
@@ -345,10 +429,9 @@ func (r *rs) updateLegacyReplicationSpecs(ctx context.Context, state, plan *TFMo
return false
}
api20240530 := r.Client.AtlasV220240530.ClustersApi
- api20240530.UpdateCluster(ctx, plan.ProjectID.ValueString(), plan.Name.ValueString(), legacyPatch)
_, _, err := api20240530.UpdateCluster(ctx, plan.ProjectID.ValueString(), plan.Name.ValueString(), legacyPatch).Execute()
if err != nil {
- diags.AddError("errorUpdateLegacy", fmt.Sprintf(errorUpdate, plan.Name.ValueString(), err.Error()))
+ diags.AddError(errorUpdateLegacy20240530, defaultAPIErrorDetails(plan.Name.ValueString(), err))
return false
}
return true
@@ -360,18 +443,19 @@ func (r *rs) updateAndWait(ctx context.Context, patchReq *admin.ClusterDescripti
clusterName := tfModel.Name.ValueString()
_, _, err := api.UpdateCluster(ctx, projectID, clusterName, patchReq).Execute()
if err != nil {
- diags.AddError("errorUpdate", fmt.Sprintf(errorUpdate, clusterName, err.Error()))
+ diags.AddError(errorUpdate, defaultAPIErrorDetails(clusterName, err))
return nil
}
return AwaitChanges(ctx, r.Client.AtlasV2.ClustersApi, &tfModel.Timeouts, diags, projectID, clusterName, changeReasonUpdate)
}
+
func (r *rs) updateAndWaitLegacy(ctx context.Context, patchReq *admin20240805.ClusterDescription20240805, diags *diag.Diagnostics, plan *TFModel) *admin.ClusterDescription20240805 {
api20240805 := r.Client.AtlasV220240805.ClustersApi
projectID := plan.ProjectID.ValueString()
clusterName := plan.Name.ValueString()
_, _, err := api20240805.UpdateCluster(ctx, projectID, clusterName, patchReq).Execute()
if err != nil {
- diags.AddError("errorUpdateLegacy", fmt.Sprintf(errorUpdate, clusterName, err.Error()))
+ diags.AddError(errorUpdateLegacy20240805, defaultAPIErrorDetails(clusterName, err))
return nil
}
return AwaitChanges(ctx, r.Client.AtlasV2.ClustersApi, &plan.Timeouts, diags, projectID, clusterName, changeReasonUpdate)
@@ -384,43 +468,29 @@ func (r *rs) applyTenantUpgrade(ctx context.Context, plan *TFModel, upgradeReque
upgradeRequest.Name = clusterName
_, _, err := api.UpgradeSharedCluster(ctx, projectID, upgradeRequest).Execute()
if err != nil {
- diags.AddError("errorTenantUpgrade", fmt.Sprintf(errorUpdate, clusterName, err.Error()))
+ diags.AddError(errorTenantUpgrade, defaultAPIErrorDetails(clusterName, err))
return nil
}
return AwaitChanges(ctx, api, &plan.Timeouts, diags, projectID, clusterName, changeReasonUpdate)
}
-func (r *rs) convertClusterAddAdvConfig(ctx context.Context, legacyAdvConfig *admin20240530.ClusterDescriptionProcessArgs, advConfig *admin.ClusterDescriptionProcessArgs20240805, cluster *admin.ClusterDescription20240805, modelIn *TFModel, oldAdvConfig *types.Object, diags *diag.Diagnostics) *TFModel {
- apiInfo := resolveAPIInfo(ctx, modelIn, diags, cluster, r.Client)
+func getBasicClusterModel(ctx context.Context, diags *diag.Diagnostics, client *config.MongoDBClient, clusterResp *admin.ClusterDescription20240805, modelIn *TFModel, forceLegacySchema bool) (*TFModel, *ExtraAPIInfo) {
+ extraInfo := resolveAPIInfo(ctx, diags, client, modelIn, clusterResp, forceLegacySchema)
if diags.HasError() {
- return nil
- }
- modelOut := NewTFModel(ctx, cluster, modelIn.Timeouts, diags, *apiInfo)
- if diags.HasError() {
- return nil
+ return nil, nil
}
- if oldAdvConfig != nil {
- modelOut.AdvancedConfiguration = *oldAdvConfig
- } else {
- legacyAdvConfig, advConfig = readUnsetAdvancedConfiguration(ctx, r.Client, modelOut, legacyAdvConfig, advConfig, diags)
- AddAdvancedConfig(ctx, modelOut, advConfig, legacyAdvConfig, diags)
- if diags.HasError() {
- return nil
- }
+ if extraInfo.ForceLegacySchemaFailed { // can't create a model if legacy is forced but cluster does not support it
+ return nil, extraInfo
}
- overrideAttributesWithPrevStateValue(modelIn, modelOut)
- return modelOut
-}
-
-func (r *rs) updateAdvConfig(ctx context.Context, legacyAdvConfig *admin20240530.ClusterDescriptionProcessArgs, advConfig *admin.ClusterDescriptionProcessArgs20240805, state *TFModel, diags *diag.Diagnostics) {
- legacyAdvConfig, advConfig = readUnsetAdvancedConfiguration(ctx, r.Client, state, legacyAdvConfig, advConfig, diags)
+ modelOut := NewTFModel(ctx, clusterResp, modelIn.Timeouts, diags, *extraInfo)
if diags.HasError() {
- return
+ return nil, nil
}
- AddAdvancedConfig(ctx, state, advConfig, legacyAdvConfig, diags)
+ overrideAttributesWithPrevStateValue(modelIn, modelOut)
+ return modelOut, extraInfo
}
-func readUnsetAdvancedConfiguration(ctx context.Context, client *config.MongoDBClient, model *TFModel, legacyAdvConfig *admin20240530.ClusterDescriptionProcessArgs, advConfig *admin.ClusterDescriptionProcessArgs20240805, diags *diag.Diagnostics) (*admin20240530.ClusterDescriptionProcessArgs, *admin.ClusterDescriptionProcessArgs20240805) {
+func updateModelAdvancedConfig(ctx context.Context, diags *diag.Diagnostics, client *config.MongoDBClient, model *TFModel, legacyAdvConfig *admin20240530.ClusterDescriptionProcessArgs, advConfig *admin.ClusterDescriptionProcessArgs20240805) {
api := client.AtlasV2.ClustersApi
api20240530 := client.AtlasV220240530.ClustersApi
projectID := model.ProjectID.ValueString()
@@ -429,16 +499,16 @@ func readUnsetAdvancedConfiguration(ctx context.Context, client *config.MongoDBC
if legacyAdvConfig == nil {
legacyAdvConfig, _, err = api20240530.GetClusterAdvancedConfiguration(ctx, projectID, clusterName).Execute()
if err != nil {
- diags.AddError("errorReadAdvConfigLegacy", fmt.Sprintf(errorRead, clusterName, err.Error()))
- return nil, nil
+ diags.AddError(errorAdvancedConfReadLegacy, defaultAPIErrorDetails(clusterName, err))
+ return
}
}
if advConfig == nil {
advConfig, _, err = api.GetClusterAdvancedConfiguration(ctx, projectID, clusterName).Execute()
if err != nil {
- diags.AddError("errorReadAdvConfig", fmt.Sprintf(errorRead, clusterName, err.Error()))
- return nil, nil
+ diags.AddError(errorAdvancedConfRead, defaultAPIErrorDetails(clusterName, err))
+ return
}
}
- return legacyAdvConfig, advConfig
+ AddAdvancedConfig(ctx, model, advConfig, legacyAdvConfig, diags)
}
diff --git a/internal/service/advancedclustertpf/resource_compatibility_reuse.go b/internal/service/advancedclustertpf/resource_compatibility_reuse.go
index b827444670..556e22c984 100644
--- a/internal/service/advancedclustertpf/resource_compatibility_reuse.go
+++ b/internal/service/advancedclustertpf/resource_compatibility_reuse.go
@@ -8,6 +8,7 @@ import (
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/constant"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
"github.com/spf13/cast"
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
"go.mongodb.org/atlas-sdk/v20241113003/admin"
@@ -53,6 +54,10 @@ func FormatMongoDBMajorVersion(version string) string {
return fmt.Sprintf("%.1f", cast.ToFloat32(version))
}
+func containerIDKey(providerName, regionName string) string {
+ return fmt.Sprintf("%s:%s", providerName, regionName)
+}
+
// based on flattenAdvancedReplicationSpecRegionConfigs in model_advanced_cluster.go
func resolveContainerIDs(ctx context.Context, projectID string, cluster *admin.ClusterDescription20240805, api admin.NetworkPeeringApi) (map[string]string, error) {
containerIDs := map[string]string{}
@@ -67,8 +72,8 @@ func resolveContainerIDs(ctx context.Context, projectID string, cluster *admin.C
GroupId: projectID,
ProviderName: &providerName,
}
- containerIDKey := fmt.Sprintf("%s:%s", providerName, regionConfig.GetRegionName())
- if _, ok := containerIDs[containerIDKey]; ok {
+ key := containerIDKey(providerName, regionConfig.GetRegionName())
+ if _, ok := containerIDs[key]; ok {
continue
}
var containersResponse *admin.PaginatedCloudProviderContainer
@@ -83,9 +88,9 @@ func resolveContainerIDs(ctx context.Context, projectID string, cluster *admin.C
responseCache[providerName] = containersResponse
}
if results := getAdvancedClusterContainerID(containersResponse.GetResults(), ®ionConfig); results != "" {
- containerIDs[containerIDKey] = results
+ containerIDs[key] = results
} else {
- return nil, fmt.Errorf("container id not found for %s", containerIDKey)
+ return nil, fmt.Errorf("container id not found for %s", key)
}
}
}
@@ -105,22 +110,13 @@ func getAdvancedClusterContainerID(containers []admin.CloudProviderContainer, cl
return ""
}
-func getReplicationSpecIDsFromOldAPI(ctx context.Context, projectID, clusterName string, api admin20240530.ClustersApi) (map[string]string, error) {
- clusterOldAPI, _, err := api.GetCluster(ctx, projectID, clusterName).Execute()
- if err != nil {
- if apiError, ok := admin20240530.AsError(err); ok {
- if apiError.GetErrorCode() == "ASYMMETRIC_SHARD_UNSUPPORTED" {
- return nil, nil // if its the case of an asymmetric shard an error is expected in old API, replication_specs.*.id attribute will not be populated
- }
- }
- return nil, fmt.Errorf("error reading advanced cluster with 2023-02-01 API (%s): %s", clusterName, err)
- }
- specs := clusterOldAPI.GetReplicationSpecs()
- result := make(map[string]string, len(specs))
+func replicationSpecIDsFromOldAPI(clusterRespOld *admin20240530.AdvancedClusterDescription) map[string]string {
+ specs := clusterRespOld.GetReplicationSpecs()
+ zoneNameSpecIDs := make(map[string]string, len(specs))
for _, spec := range specs {
- result[spec.GetZoneName()] = spec.GetId()
+ zoneNameSpecIDs[spec.GetZoneName()] = spec.GetId()
}
- return result, nil
+ return zoneNameSpecIDs
}
func convertHardwareSpecToOldSDK(hwspec *admin.HardwareSpec20240805) *admin20240530.HardwareSpec {
@@ -177,3 +173,27 @@ func convertDedicatedHardwareSpecToOldSDK(spec *admin.DedicatedHardwareSpec20240
InstanceSize: spec.InstanceSize,
}
}
+
+// copied from advancedcluster/resource_update_logic.go
+func populateIDValuesUsingNewAPI(ctx context.Context, projectID, clusterName string, connV2ClusterAPI admin.ClustersApi, replicationSpecs *[]admin.ReplicationSpec20240805) (*[]admin.ReplicationSpec20240805, error) {
+ if replicationSpecs == nil || len(*replicationSpecs) == 0 {
+ return replicationSpecs, nil
+ }
+ cluster, _, err := connV2ClusterAPI.GetCluster(ctx, projectID, clusterName).Execute()
+ if err != nil {
+ return nil, err
+ }
+
+ zoneToReplicationSpecsIDs := groupIDsByZone(cluster.GetReplicationSpecs())
+ result := advancedcluster.AddIDsToReplicationSpecs(*replicationSpecs, zoneToReplicationSpecsIDs)
+ return &result, nil
+}
+
+// copied from advancedcluster/resource_update_logic.go
+func groupIDsByZone(specs []admin.ReplicationSpec20240805) map[string][]string {
+ result := make(map[string][]string)
+ for _, spec := range specs {
+ result[spec.GetZoneName()] = append(result[spec.GetZoneName()], spec.GetId())
+ }
+ return result
+}
diff --git a/internal/service/advancedclustertpf/resource_compatiblity.go b/internal/service/advancedclustertpf/resource_compatiblity.go
index e3ac60561b..1f61d103b3 100644
--- a/internal/service/advancedclustertpf/resource_compatiblity.go
+++ b/internal/service/advancedclustertpf/resource_compatiblity.go
@@ -2,12 +2,14 @@ package advancedclustertpf
import (
"context"
+ "fmt"
"reflect"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
+ admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
"go.mongodb.org/atlas-sdk/v20241113003/admin"
)
@@ -37,29 +39,45 @@ func findNumShardsUpdates(ctx context.Context, state, plan *TFModel, diags *diag
return planCounts
}
-func resolveAPIInfo(ctx context.Context, plan *TFModel, diags *diag.Diagnostics, clusterLatest *admin.ClusterDescription20240805, client *config.MongoDBClient) *ExtraAPIInfo {
- rootDiskSize := conversion.NilForUnknown(plan.DiskSizeGB, plan.DiskSizeGB.ValueFloat64Pointer())
- projectID := plan.ProjectID.ValueString()
- zoneNameSpecIDs, err := getReplicationSpecIDsFromOldAPI(ctx, projectID, plan.Name.ValueString(), client.AtlasV220240530.ClustersApi)
+func resolveAPIInfo(ctx context.Context, diags *diag.Diagnostics, client *config.MongoDBClient, plan *TFModel, clusterLatest *admin.ClusterDescription20240805, forceLegacySchema bool) *ExtraAPIInfo {
+ var (
+ api20240530 = client.AtlasV220240530.ClustersApi
+ rootDiskSize = conversion.NilForUnknown(plan.DiskSizeGB, plan.DiskSizeGB.ValueFloat64Pointer())
+ projectID = plan.ProjectID.ValueString()
+ clusterName = plan.Name.ValueString()
+ forceLegacySchemaFailed = false
+ )
+ clusterRespOld, _, err := api20240530.GetCluster(ctx, projectID, clusterName).Execute()
if err != nil {
- diags.AddError("getReplicationSpecIDsFromOldAPI", err.Error())
- return nil
+ if admin20240530.IsErrorCode(err, "ASYMMETRIC_SHARD_UNSUPPORTED") {
+ forceLegacySchemaFailed = forceLegacySchema
+ } else {
+ diags.AddError(errorReadLegacy20240530, defaultAPIErrorDetails(clusterName, err))
+ return nil
+ }
}
if rootDiskSize == nil {
rootDiskSize = findRegionRootDiskSize(clusterLatest.ReplicationSpecs)
}
containerIDs, err := resolveContainerIDs(ctx, projectID, clusterLatest, client.AtlasV2.NetworkPeeringApi)
if err != nil {
- diags.AddError("resolveContainerIDs failed", err.Error())
+ diags.AddError(errorResolveContainerIDs, fmt.Sprintf("cluster name = %s, error details: %s", clusterName, err.Error()))
return nil
}
- return &ExtraAPIInfo{
+ info := &ExtraAPIInfo{
ContainerIDs: containerIDs,
- UsingLegacySchema: usingLegacySchema(ctx, plan.ReplicationSpecs, diags),
- ZoneNameNumShards: numShardsMap(ctx, plan.ReplicationSpecs, diags),
RootDiskSize: rootDiskSize,
- ZoneNameReplicationSpecIDs: zoneNameSpecIDs,
+ ZoneNameReplicationSpecIDs: replicationSpecIDsFromOldAPI(clusterRespOld),
+ ForceLegacySchemaFailed: forceLegacySchemaFailed,
+ }
+ if forceLegacySchema {
+ info.UsingLegacySchema = true
+ info.ZoneNameNumShards = numShardsMapFromOldAPI(clusterRespOld) // plan is empty in data source Read when forcing legacy, so we get num_shards from the old API
+ } else {
+ info.UsingLegacySchema = usingLegacySchema(ctx, plan.ReplicationSpecs, diags)
+ info.ZoneNameNumShards = numShardsMap(ctx, plan.ReplicationSpecs, diags)
}
+ return info
}
// instead of using `num_shards` explode the replication specs, and set disk_size_gb
@@ -101,25 +119,6 @@ func normalizeDiskSize(model *TFModel, latestModel *admin.ClusterDescription2024
return rootDiskSize
}
-// Set "Computed" Specs to nil to avoid unnecessary diffs
-func normalizePatchState(cluster *admin.ClusterDescription20240805) {
- for i, specCopy := range cluster.GetReplicationSpecs() {
- for j := range specCopy.GetRegionConfigs() {
- spec := cluster.GetReplicationSpecs()[i]
- regionConfigs := *spec.RegionConfigs
- actualConfig := ®ionConfigs[j]
- analyticsSpecs := actualConfig.AnalyticsSpecs
- if analyticsSpecs != nil && analyticsSpecs.NodeCount != nil && *analyticsSpecs.NodeCount == 0 {
- actualConfig.AnalyticsSpecs = nil
- }
- readonly := actualConfig.ReadOnlySpecs
- if readonly != nil && readonly.NodeCount != nil && *readonly.NodeCount == 0 {
- actualConfig.ReadOnlySpecs = nil
- }
- }
- }
-}
-
func explodeNumShards(req *admin.ClusterDescription20240805, counts []int64) {
specs := req.GetReplicationSpecs()
newSpecs := []admin.ReplicationSpec20240805{}
@@ -140,6 +139,9 @@ func repSpecNoIDs(repspec admin.ReplicationSpec20240805) *admin.ReplicationSpec2
func numShardsCounts(ctx context.Context, input types.List, diags *diag.Diagnostics) []int64 {
elements := make([]TFReplicationSpecsModel, len(input.Elements()))
+ if len(elements) == 0 {
+ return nil
+ }
if localDiags := input.ElementsAs(ctx, &elements, false); len(localDiags) > 0 {
diags.Append(localDiags...)
return nil
@@ -162,6 +164,9 @@ func usingLegacySchema(ctx context.Context, input types.List, diags *diag.Diagno
func numShardsMap(ctx context.Context, input types.List, diags *diag.Diagnostics) map[string]int64 {
elements := make([]TFReplicationSpecsModel, len(input.Elements()))
+ if len(elements) == 0 {
+ return nil
+ }
if localDiags := input.ElementsAs(ctx, &elements, false); len(localDiags) > 0 {
diags.Append(localDiags...)
return nil
@@ -175,6 +180,15 @@ func numShardsMap(ctx context.Context, input types.List, diags *diag.Diagnostics
return counts
}
+func numShardsMapFromOldAPI(clusterRespOld *admin20240530.AdvancedClusterDescription) map[string]int64 {
+ ret := make(map[string]int64)
+ for i := range clusterRespOld.GetReplicationSpecs() {
+ spec := &clusterRespOld.GetReplicationSpecs()[i]
+ ret[spec.GetZoneName()] = int64(spec.GetNumShards())
+ }
+ return ret
+}
+
func isNumShardsGreaterThanOne(counts []int64) bool {
for _, count := range counts {
if count > 1 {
diff --git a/internal/service/advancedclustertpf/resource_test.go b/internal/service/advancedclustertpf/resource_test.go
index efe29be364..f1b1c4e861 100644
--- a/internal/service/advancedclustertpf/resource_test.go
+++ b/internal/service/advancedclustertpf/resource_test.go
@@ -1,53 +1,50 @@
package advancedclustertpf_test
import (
- "os"
"testing"
+ "time"
- "github.com/hashicorp/terraform-plugin-testing/helper/resource"
- "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc"
- "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/tc"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedclustertpf"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/unit"
)
-const (
- resourceName = "mongodbatlas_advanced_cluster.test"
+var (
+ mockConfig = unit.MockHTTPDataConfig{AllowMissingRequests: true, SideEffect: shortenRetries, IsDiffMustSubstrings: []string{"/clusters"}}
)
-func TestAccClusterAdvancedCluster_basicTenant(t *testing.T) {
- var (
- projectID = acc.ProjectIDExecution(t)
- clusterName = acc.RandomClusterName()
- clusterNameUpdated = acc.RandomClusterName()
- )
- testCase := tc.BasicTenantTestCase(t, projectID, clusterName, clusterNameUpdated)
- resource.ParallelTest(t, *testCase)
+func shortenRetries() error {
+ advancedclustertpf.RetryMinTimeout = 100 * time.Millisecond
+ advancedclustertpf.RetryDelay = 100 * time.Millisecond
+ advancedclustertpf.RetryPollInterval = 100 * time.Millisecond
+ return nil
}
-func TestAccClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel(t *testing.T) {
- var (
- orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
- projectName = acc.RandomProjectName()
- clusterName = acc.RandomClusterName()
- )
- testCase := tc.SymmetricShardedOldSchemaDiskSizeGBAtElectableLevel(t, orgID, projectName, clusterName)
- resource.ParallelTest(t, *testCase)
+func TestAccMockableAdvancedCluster_basicTenant(t *testing.T) {
+ testCase := basicTenantTestCase(t)
+ unit.CaptureOrMockTestCaseAndRun(t, mockConfig, testCase)
}
-func TestAccClusterAdvancedClusterConfig_symmetricShardedOldSchema(t *testing.T) {
- var (
- orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
- projectName = acc.RandomProjectName()
- clusterName = acc.RandomClusterName()
- )
- testCase := tc.SymmetricShardedOldSchema(t, orgID, projectName, clusterName)
- resource.ParallelTest(t, *testCase)
+func TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel(t *testing.T) {
+ testCase := symmetricShardedOldSchemaDiskSizeGBAtElectableLevel(t)
+ unit.CaptureOrMockTestCaseAndRun(t, mockConfig, testCase)
}
-func TestAccClusterAdvancedCluster_tenantUpgrade(t *testing.T) {
- var (
- projectID = acc.ProjectIDExecution(t)
- clusterName = acc.RandomClusterName()
- )
- testCase := tc.TenantUpgrade(t, projectID, clusterName)
- resource.ParallelTest(t, *testCase)
+func TestAccMockableAdvancedCluster_symmetricShardedOldSchema(t *testing.T) {
+ testCase := symmetricShardedOldSchema(t)
+ unit.CaptureOrMockTestCaseAndRun(t, mockConfig, testCase)
+}
+
+func TestAccMockableAdvancedCluster_tenantUpgrade(t *testing.T) {
+ testCase := tenantUpgrade(t)
+ unit.CaptureOrMockTestCaseAndRun(t, mockConfig, testCase)
+}
+
+func TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate(t *testing.T) {
+ testCase := replicasetAdvConfigUpdate(t)
+ unit.CaptureOrMockTestCaseAndRun(t, mockConfig, testCase)
+}
+
+func TestAccMockableAdvancedCluster_shardedBasic(t *testing.T) {
+ testCase := shardedBasic(t)
+ unit.CaptureOrMockTestCaseAndRun(t, mockConfig, testCase)
}
diff --git a/internal/testutil/tc/advanced_cluster.go b/internal/service/advancedclustertpf/resource_test_cases_test.go
similarity index 53%
rename from internal/testutil/tc/advanced_cluster.go
rename to internal/service/advancedclustertpf/resource_test_cases_test.go
index 78e40f6fec..335c2793c8 100644
--- a/internal/testutil/tc/advanced_cluster.go
+++ b/internal/service/advancedclustertpf/resource_test_cases_test.go
@@ -1,4 +1,4 @@
-package tc
+package advancedclustertpf_test
import (
"fmt"
@@ -22,35 +22,34 @@ var (
configServerManagementModeAtlasManaged = "ATLAS_MANAGED"
)
-func SymmetricShardedOldSchemaDiskSizeGBAtElectableLevel(t *testing.T, orgID, projectName, clusterName string) *resource.TestCase {
+func symmetricShardedOldSchemaDiskSizeGBAtElectableLevel(t *testing.T) *resource.TestCase {
t.Helper()
+ var (
+ projectID = acc.ProjectIDExecution(t)
+ clusterName = acc.RandomClusterName()
+ )
return &resource.TestCase{
PreCheck: func() { acc.PreCheckBasic(t) },
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
- Config: configShardedOldSchemaDiskSizeGBElectableLevel(orgID, projectName, clusterName, 50),
+ Config: configShardedOldSchemaDiskSizeGBElectableLevel(projectID, clusterName, 50),
Check: checkShardedOldSchemaDiskSizeGBElectableLevel(50),
},
{
- Config: configShardedOldSchemaDiskSizeGBElectableLevel(orgID, projectName, clusterName, 55),
+ Config: configShardedOldSchemaDiskSizeGBElectableLevel(projectID, clusterName, 55),
Check: checkShardedOldSchemaDiskSizeGBElectableLevel(55),
},
},
}
}
-func configShardedOldSchemaDiskSizeGBElectableLevel(orgID, projectName, name string, diskSizeGB int) string {
+func configShardedOldSchemaDiskSizeGBElectableLevel(projectID, name string, diskSizeGB int) string {
return fmt.Sprintf(`
- resource "mongodbatlas_project" "cluster_project" {
- org_id = %[1]q
- name = %[2]q
- }
-
resource "mongodbatlas_advanced_cluster" "test" {
- project_id = mongodbatlas_project.cluster_project.id
- name = %[3]q
+ project_id = %[1]q
+ name = %[2]q
backup_enabled = false
mongo_db_major_version = "7.0"
cluster_type = "SHARDED"
@@ -62,12 +61,12 @@ func configShardedOldSchemaDiskSizeGBElectableLevel(orgID, projectName, name str
electable_specs = {
instance_size = "M10"
node_count = 3
- disk_size_gb = %[4]d
+ disk_size_gb = %[3]d
}
analytics_specs = {
instance_size = "M10"
node_count = 0
- disk_size_gb = %[4]d
+ disk_size_gb = %[3]d
}
provider_name = "AWS"
priority = 7
@@ -76,7 +75,7 @@ func configShardedOldSchemaDiskSizeGBElectableLevel(orgID, projectName, name str
]
}]
}
- `, orgID, projectName, name, diskSizeGB)
+ `, projectID, name, diskSizeGB)
}
func checkShardedOldSchemaDiskSizeGBElectableLevel(diskSizeGB int) resource.TestCheckFunc {
@@ -98,26 +97,30 @@ func checkAggr(attrsSet []string, attrsMap map[string]string, extra ...resource.
return resource.ComposeAggregateTestCheckFunc(checks...)
}
-func SymmetricShardedOldSchema(t *testing.T, orgID, projectName, clusterName string) *resource.TestCase {
+func symmetricShardedOldSchema(t *testing.T) *resource.TestCase {
t.Helper()
+ var (
+ projectID = acc.ProjectIDExecution(t)
+ clusterName = acc.RandomClusterName()
+ )
return &resource.TestCase{
PreCheck: func() { acc.PreCheckBasic(t) },
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
- Config: configShardedOldSchemaMultiCloud(orgID, projectName, clusterName, 2, "M10", &configServerManagementModeFixedToDedicated),
+ Config: configShardedOldSchemaMultiCloud(projectID, clusterName, 2, "M10", &configServerManagementModeFixedToDedicated),
Check: checkShardedOldSchemaMultiCloud(clusterName, 2, "M10", false, &configServerManagementModeFixedToDedicated),
},
{
- Config: configShardedOldSchemaMultiCloud(orgID, projectName, clusterName, 2, "M20", &configServerManagementModeAtlasManaged),
+ Config: configShardedOldSchemaMultiCloud(projectID, clusterName, 2, "M20", &configServerManagementModeAtlasManaged),
Check: checkShardedOldSchemaMultiCloud(clusterName, 2, "M20", false, &configServerManagementModeAtlasManaged),
},
},
}
}
-func configShardedOldSchemaMultiCloud(orgID, projectName, name string, numShards int, analyticsSize string, configServerManagementMode *string) string {
+func configShardedOldSchemaMultiCloud(projectID, name string, numShards int, analyticsSize string, configServerManagementMode *string) string {
var rootConfig string
if configServerManagementMode != nil {
// valid values: FIXED_TO_DEDICATED or ATLAS_MANAGED (default)
@@ -129,26 +132,21 @@ func configShardedOldSchemaMultiCloud(orgID, projectName, name string, numShards
`, *configServerManagementMode)
}
return fmt.Sprintf(`
- resource "mongodbatlas_project" "cluster_project" {
- org_id = %[1]q
- name = %[2]q
- }
-
resource "mongodbatlas_advanced_cluster" "test" {
- project_id = mongodbatlas_project.cluster_project.id
- name = %[3]q
+ project_id = %[1]q
+ name = %[2]q
cluster_type = "SHARDED"
- %[6]s
+ %[5]s
replication_specs = [{
- num_shards = %[4]d
+ num_shards = %[3]d
region_configs = [{
electable_specs = {
instance_size = "M10"
node_count = 3
}
analytics_specs = {
- instance_size = %[5]q
+ instance_size = %[4]q
node_count = 1
}
provider_name = "AWS"
@@ -165,7 +163,7 @@ func configShardedOldSchemaMultiCloud(orgID, projectName, name string, numShards
},]
},]
}
- `, orgID, projectName, name, numShards, analyticsSize, rootConfig)
+ `, projectID, name, numShards, analyticsSize, rootConfig)
}
func checkShardedOldSchemaMultiCloud(name string, numShards int, analyticsSize string, verifyExternalID bool, configServerManagementMode *string) resource.TestCheckFunc {
@@ -198,19 +196,24 @@ func checkShardedOldSchemaMultiCloud(name string, numShards int, analyticsSize s
additionalChecks...)
}
-func BasicTenantTestCase(t *testing.T, projectID, clusterName, clusterNameUpdated string) *resource.TestCase {
+func basicTenantTestCase(t *testing.T) *resource.TestCase {
t.Helper()
+ var (
+ projectID = acc.ProjectIDExecution(t)
+ clusterName = acc.RandomClusterName()
+ clusterNameUpdated = acc.RandomClusterName()
+ )
return &resource.TestCase{
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
CheckDestroy: acc.CheckDestroyCluster,
PreCheck: acc.PreCheckBasicSleep(t, nil, projectID, clusterName),
Steps: []resource.TestStep{
{
- Config: configTenant(t, true, projectID, clusterName),
+ Config: configTenant(projectID, clusterName),
Check: checkTenant(projectID, clusterName),
},
{
- Config: configTenant(t, true, projectID, clusterNameUpdated),
+ Config: configTenant(projectID, clusterNameUpdated),
Check: checkTenant(projectID, clusterNameUpdated),
},
acc.TestStepImportCluster(resourceName),
@@ -218,9 +221,8 @@ func BasicTenantTestCase(t *testing.T, projectID, clusterName, clusterNameUpdate
}
}
-func configTenant(t *testing.T, isAcc bool, projectID, name string) string {
- t.Helper()
- return acc.ConvertAdvancedClusterToSchemaV2(t, isAcc, fmt.Sprintf(`
+func configTenant(projectID, name string) string {
+ return fmt.Sprintf(`
resource "mongodbatlas_advanced_cluster" "test" {
project_id = %[1]q
name = %[2]q
@@ -238,7 +240,7 @@ func configTenant(t *testing.T, isAcc bool, projectID, name string) string {
}]
}]
}
- `, projectID, name))
+ `, projectID, name)
}
func checkTenant(projectID, name string) resource.TestCheckFunc {
@@ -255,28 +257,31 @@ func checkTenant(projectID, name string) resource.TestCheckFunc {
return resource.ComposeAggregateTestCheckFunc(checks...)
}
-func TenantUpgrade(t *testing.T, projectID, clusterName string) *resource.TestCase {
+func tenantUpgrade(t *testing.T) *resource.TestCase {
t.Helper()
+ var (
+ projectID = acc.ProjectIDExecution(t)
+ clusterName = acc.RandomClusterName()
+ )
return &resource.TestCase{
PreCheck: acc.PreCheckBasicSleep(t, nil, projectID, clusterName),
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
- Config: configTenant(t, true, projectID, clusterName),
+ Config: acc.ConvertAdvancedClusterToSchemaV2(t, true, configTenant(projectID, clusterName)),
Check: checkTenant(projectID, clusterName),
},
{
- Config: configTenantUpgraded(t, true, projectID, clusterName),
+ Config: acc.ConvertAdvancedClusterToSchemaV2(t, true, configTenantUpgraded(projectID, clusterName)),
Check: checksTenantUpgraded(projectID, clusterName),
},
},
}
}
-func configTenantUpgraded(t *testing.T, isAcc bool, projectID, name string) string {
- t.Helper()
- return acc.ConvertAdvancedClusterToSchemaV2(t, isAcc, fmt.Sprintf(`
+func configTenantUpgraded(projectID, name string) string {
+ return fmt.Sprintf(`
resource "mongodbatlas_advanced_cluster" "test" {
project_id = %[1]q
name = %[2]q
@@ -294,7 +299,7 @@ func configTenantUpgraded(t *testing.T, isAcc bool, projectID, name string) stri
}
}
}
- `, projectID, name))
+ `, projectID, name)
}
func enableChecksLatestTpf(checkMap map[string]string) map[string]string {
@@ -320,3 +325,153 @@ func checksTenantUpgraded(projectID, name string) resource.TestCheckFunc {
checks = acc.AddAttrChecks(resourceName, checks, checkMap)
return resource.ComposeAggregateTestCheckFunc(originalChecks, resource.ComposeAggregateTestCheckFunc(checks...))
}
+
+func replicasetAdvConfigUpdate(t *testing.T) *resource.TestCase {
+ t.Helper()
+ var (
+ projectID = acc.ProjectIDExecution(t)
+ clusterName = acc.RandomClusterName()
+ fullUpdate = `
+ backup_enabled = true
+ bi_connector_config = {
+ enabled = true
+ }
+ # config_server_management_mode = "ATLAS_MANAGED" UNSTABLE: After applying this test step, the non-refresh plan was not empty
+ labels {
+ key = "env"
+ value = "test"
+ }
+ tags {
+ key = "env"
+ value = "test"
+ }
+ mongo_db_major_version = "8.0"
+ pit_enabled = true
+ redact_client_log_data = true
+ replica_set_scaling_strategy = "NODE_TYPE"
+ # retain_backups_enabled = true # only set on delete
+ root_cert_type = "ISRGROOTX1"
+ # termination_protection_enabled = true # must be reset to false to enable delete
+ version_release_system = "CONTINUOUS"
+
+ advanced_configuration = {
+ change_stream_options_pre_and_post_images_expire_after_seconds = 100
+ default_read_concern = "available"
+ default_write_concern = "majority"
+ javascript_enabled = true
+ minimum_enabled_tls_protocol = "TLS1_0"
+ no_table_scan = true
+ sample_refresh_interval_bi_connector = 310
+ sample_size_bi_connector = 110
+ transaction_lifetime_limit_seconds = 300
+ }
+`
+ // # oplog_min_retention_hours = 5.5
+ // # oplog_size_mb = 1000
+ // # fail_index_key_too_long = true # only valid for MongoDB version 4.4 and earlier
+ )
+ return &resource.TestCase{
+ ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
+ Steps: []resource.TestStep{
+ {
+ Config: configBasic(projectID, clusterName, ""),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(resourceName, "state_name", "IDLE"),
+ resource.TestCheckResourceAttr(resourceName, "timeouts.create", "2000s"),
+ resource.TestCheckResourceAttrSet(resourceName, "replication_specs.0.container_id.AWS:US_EAST_1"),
+ ),
+ },
+ {
+ Config: configBasic(projectID, clusterName, fullUpdate),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(resourceName, "mongo_db_major_version", "8.0"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.change_stream_options_pre_and_post_images_expire_after_seconds", "100"),
+ ),
+ },
+ acc.TestStepImportCluster(resourceName),
+ },
+ }
+}
+
+func shardedBasic(t *testing.T) *resource.TestCase {
+ t.Helper()
+ var (
+ projectID = acc.ProjectIDExecution(t)
+ clusterName = acc.RandomClusterName()
+ )
+ return &resource.TestCase{
+ ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
+ Steps: []resource.TestStep{
+ {
+ Config: configSharded(projectID, clusterName, false),
+ Check: resource.TestCheckResourceAttr(resourceName, "project_id", projectID),
+ },
+ {
+ Config: configSharded(projectID, clusterName, true),
+ Check: resource.TestCheckResourceAttr(resourceName, "name", clusterName),
+ },
+ acc.TestStepImportCluster(resourceName),
+ },
+ }
+}
+
+func configSharded(projectID, clusterName string, withUpdate bool) string {
+ var autoScaling, analyticsSpecs string
+ if withUpdate {
+ autoScaling = `
+ auto_scaling = {
+ disk_gb_enabled = true
+ }`
+ analyticsSpecs = `
+ analytics_specs = {
+ instance_size = "M30"
+ node_count = 1
+ ebs_volume_type = "PROVISIONED"
+ disk_iops = 2000
+ }`
+ }
+ // SDK v2 Implementation receives many warnings, one of them: `.replication_specs[1].region_configs[0].analytics_specs[0].disk_iops: was cty.NumberIntVal(2000), but now cty.NumberIntVal(1000)`
+ // Therefore, in TPF we are forced to set the value that will be returned by the API (1000)
+ // The rule is: For any replication spec, the `(analytics|electable|read_only)_spec.disk_iops` must be the same across all region_configs
+ // The API raises no errors, but the response reflects this rule
+ analyticsSpecsForSpec2 := strings.ReplaceAll(analyticsSpecs, "2000", "1000")
+ return fmt.Sprintf(`
+ resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = %[1]q
+ name = %[2]q
+ cluster_type = "SHARDED"
+
+ replication_specs = [
+ { # shard 1
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M30"
+ disk_iops = 2000
+ node_count = 3
+ ebs_volume_type = "PROVISIONED"
+ }
+ %[3]s
+ %[4]s
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }]
+ },
+ { # shard 2
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M30"
+ ebs_volume_type = "PROVISIONED"
+ disk_iops = 1000
+ node_count = 3
+ }
+ %[3]s
+ %[5]s
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }]
+ }]
+ }
+ `, projectID, clusterName, autoScaling, analyticsSpecs, analyticsSpecsForSpec2)
+}
diff --git a/internal/service/advancedclustertpf/resource_unit_test.go b/internal/service/advancedclustertpf/resource_unit_test.go
deleted file mode 100644
index f1fcd2cad0..0000000000
--- a/internal/service/advancedclustertpf/resource_unit_test.go
+++ /dev/null
@@ -1,270 +0,0 @@
-package advancedclustertpf_test
-
-import (
- "fmt"
- "strings"
- "testing"
- "time"
-
- "github.com/hashicorp/terraform-plugin-testing/helper/resource"
-
- "github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedclustertpf"
- "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc"
- "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/tc"
- "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/unit"
-)
-
-const (
- processResponseOnly = "processResponseOnly"
- projectID = "111111111111111111111111"
- clusterName = "test"
-)
-
-func TestMockAdvancedCluster_replicaset(t *testing.T) {
- var (
- oneNewVariable = "backup_enabled = false"
- fullUpdate = `
- backup_enabled = true
- bi_connector_config = {
- enabled = true
- }
- # config_server_management_mode = "ATLAS_MANAGED" UNSTABLE: After applying this test step, the non-refresh plan was not empty
- labels = [{
- key = "env"
- value = "test"
- }]
- tags = [{
- key = "env"
- value = "test"
- }]
- mongo_db_major_version = "8.0"
- paused = true
- pit_enabled = true
- redact_client_log_data = true
- replica_set_scaling_strategy = "NODE_TYPE"
- # retain_backups_enabled = true # only set on delete
- root_cert_type = "ISRGROOTX1"
- # termination_protection_enabled = true # must be reset to false to enable delete
- version_release_system = "CONTINUOUS"
- `
- // # oplog_min_retention_hours = 5.5
- // # oplog_size_mb = 1000
- // # fail_index_key_too_long = true # only valid for MongoDB version 4.4 and earlier
- advClusterConfig = `
- advanced_configuration = {
- change_stream_options_pre_and_post_images_expire_after_seconds = 100
- default_read_concern = "available"
- default_write_concern = "majority"
- javascript_enabled = true
- minimum_enabled_tls_protocol = "TLS1_0"
- no_table_scan = true
- sample_refresh_interval_bi_connector = 310
- sample_size_bi_connector = 110
- transaction_lifetime_limit_seconds = 300
- }
- `
- fullUpdateResumed = strings.Replace(fullUpdate, "paused = true", "paused = false", 1)
- vars = map[string]string{
- "groupId": projectID,
- "clusterName": clusterName,
- }
- )
- shortenRetries()
- testCase := resource.TestCase{
- ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
- Steps: []resource.TestStep{
- {
- Config: configBasic(projectID, clusterName, ""),
- Check: resource.ComposeAggregateTestCheckFunc(
- resource.TestCheckResourceAttr(resourceName, "state_name", "IDLE"),
- resource.TestCheckResourceAttr(resourceName, "timeouts.create", "20s"),
- resource.TestCheckResourceAttr(resourceName, "replication_specs.0.container_id.AWS:US_EAST_1", "67345bd9905b8c30c54fd220"),
- ),
- },
- {
- Config: configBasic(projectID, clusterName, oneNewVariable),
- Check: resource.ComposeAggregateTestCheckFunc(
- resource.TestCheckResourceAttr(resourceName, "backup_enabled", "false"),
- resource.TestCheckResourceAttr(resourceName, "state_name", "IDLE"),
- ),
- },
- {
- Config: configBasic(projectID, clusterName, fullUpdate),
- Check: resource.ComposeAggregateTestCheckFunc(
- resource.TestCheckResourceAttr(resourceName, "state_name", "IDLE"),
- resource.TestCheckResourceAttr(resourceName, "mongo_db_major_version", "8.0"),
- resource.TestCheckResourceAttr(resourceName, "backup_enabled", "true"),
- resource.TestCheckResourceAttr(resourceName, "paused", "true"),
- ),
- },
- {
- Config: configBasic(projectID, clusterName, fullUpdateResumed),
- Check: resource.ComposeAggregateTestCheckFunc(
- resource.TestCheckResourceAttr(resourceName, "state_name", "IDLE"),
- resource.TestCheckResourceAttr(resourceName, "backup_enabled", "true"),
- resource.TestCheckResourceAttr(resourceName, "paused", "false"),
- ),
- },
- {
- Config: configBasic(projectID, clusterName, fullUpdateResumed+advClusterConfig),
- Check: resource.ComposeAggregateTestCheckFunc(
- resource.TestCheckResourceAttr(resourceName, "mongo_db_major_version", "8.0"),
- resource.TestCheckResourceAttr(resourceName, "advanced_configuration.change_stream_options_pre_and_post_images_expire_after_seconds", "100"),
- ),
- },
- acc.TestStepImportCluster(resourceName),
- },
- }
- unit.MockTestCaseAndRun(t, vars, &unit.MockHTTPDataConfig{AllowMissingRequests: true, AllowReReadGet: true}, &testCase)
-}
-
-func shortenRetries() {
- advancedclustertpf.RetryMinTimeout = 100 * time.Millisecond
- advancedclustertpf.RetryDelay = 100 * time.Millisecond
- advancedclustertpf.RetryPollInterval = 100 * time.Millisecond
-}
-
-func TestMockAdvancedCluster_configSharded(t *testing.T) {
- var (
- clusterName = "sharded-multi-replication"
- vars = map[string]string{
- "groupId": projectID,
- "clusterName": clusterName,
- }
- )
- shortenRetries()
- testCase := resource.TestCase{
- ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
- Steps: []resource.TestStep{
- {
- Config: configSharded(projectID, clusterName, false),
- Check: resource.TestCheckResourceAttr(resourceName, "project_id", projectID),
- },
- {
- Config: configSharded(projectID, clusterName, true),
- Check: resource.TestCheckResourceAttr(resourceName, "name", clusterName),
- },
- acc.TestStepImportCluster(resourceName),
- },
- }
- unit.MockTestCaseAndRun(t, vars, &unit.MockHTTPDataConfig{AllowMissingRequests: true, AllowReReadGet: true}, &testCase)
-}
-
-func configSharded(projectID, clusterName string, withUpdate bool) string {
- var autoScaling, analyticsSpecs string
- if withUpdate {
- autoScaling = `
- auto_scaling = {
- disk_gb_enabled = true
- }`
- analyticsSpecs = `
- analytics_specs = {
- instance_size = "M30"
- node_count = 1
- ebs_volume_type = "PROVISIONED"
- disk_iops = 2000
- }`
- }
- // SDK v2 Implementation receives many warnings, one of them: `.replication_specs[1].region_configs[0].analytics_specs[0].disk_iops: was cty.NumberIntVal(2000), but now cty.NumberIntVal(1000)`
- // Therefore, in TPF we are forced to set the value that will be returned by the API (1000)
- // The rule is: For any replication spec, the `(analytics|electable|read_only)_spec.disk_iops` must be the same across all region_configs
- // The API raises no errors, but the response reflects this rule
- analyticsSpecsForSpec2 := strings.ReplaceAll(analyticsSpecs, "2000", "1000")
- return fmt.Sprintf(`
- resource "mongodbatlas_advanced_cluster" "test" {
- project_id = %[1]q
- name = %[2]q
- cluster_type = "SHARDED"
-
- replication_specs = [
- { # shard 1
- region_configs = [{
- electable_specs = {
- instance_size = "M30"
- disk_iops = 2000
- node_count = 3
- ebs_volume_type = "PROVISIONED"
- }
- %[3]s
- %[4]s
- provider_name = "AWS"
- priority = 7
- region_name = "EU_WEST_1"
- }]
- },
- { # shard 2
- region_configs = [{
- electable_specs = {
- instance_size = "M30"
- ebs_volume_type = "PROVISIONED"
- disk_iops = 1000
- node_count = 3
- }
- %[3]s
- %[5]s
- provider_name = "AWS"
- priority = 7
- region_name = "EU_WEST_1"
- }]
- }]
- }
- `, projectID, clusterName, autoScaling, analyticsSpecs, analyticsSpecsForSpec2)
-}
-
-func TestMockClusterAdvancedCluster_basicTenant(t *testing.T) {
- var (
- clusterName = "test-acc-tf-c-8049930413007488732"
- clusterNameUpdated = "test-acc-tf-c-91771214182147246"
- vars = map[string]string{
- "groupId": projectID,
- "clusterName": clusterName,
- "clusterName2": clusterNameUpdated,
- }
- )
- shortenRetries()
- testCase := tc.BasicTenantTestCase(t, projectID, clusterName, clusterNameUpdated)
- unit.MockTestCaseAndRun(t, vars, &unit.MockHTTPDataConfig{AllowMissingRequests: true, AllowReReadGet: true}, testCase)
-}
-
-func TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel(t *testing.T) {
- var (
- clusterName = "6746cee8aef48d1cb265882d"
- projectName = "test-acc-tf-p-4311574251574843475"
- orgID = "65def6ce0f722a1507105aa5"
- vars = map[string]string{
- "groupId": projectID,
- "clusterName": clusterName,
- }
- )
- shortenRetries()
- testCase := tc.SymmetricShardedOldSchemaDiskSizeGBAtElectableLevel(t, orgID, projectName, clusterName)
- unit.MockTestCaseAndRun(t, vars, &unit.MockHTTPDataConfig{AllowMissingRequests: true, AllowReReadGet: true}, testCase)
-}
-
-func TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema(t *testing.T) {
- var (
- clusterName = "test-acc-tf-c-6025103075771235151"
- projectName = "test-acc-tf-p-7889034782442569766"
- orgID = "65def6ce0f722a1507105aa5"
- vars = map[string]string{
- "groupId": projectID,
- "clusterName": clusterName,
- }
- )
- shortenRetries()
- testCase := tc.SymmetricShardedOldSchema(t, orgID, projectName, clusterName)
- unit.MockTestCaseAndRun(t, vars, &unit.MockHTTPDataConfig{AllowMissingRequests: true, AllowReReadGet: true}, testCase)
-}
-
-func TestMockClusterAdvancedCluster_tenantUpgrade(t *testing.T) {
- var (
- clusterName = "test-acc-tf-c-878317177498266511"
- vars = map[string]string{
- "groupId": projectID,
- "clusterName": clusterName,
- }
- )
- shortenRetries()
- testCase := tc.TenantUpgrade(t, projectID, clusterName)
- unit.MockTestCaseAndRun(t, vars, &unit.MockHTTPDataConfig{AllowMissingRequests: true, AllowReReadGet: true}, testCase)
-}
diff --git a/internal/service/advancedclustertpf/resource_schema.go b/internal/service/advancedclustertpf/schema.go
similarity index 90%
rename from internal/service/advancedclustertpf/resource_schema.go
rename to internal/service/advancedclustertpf/schema.go
index d8d8890ea6..8f2bd65ee9 100644
--- a/internal/service/advancedclustertpf/resource_schema.go
+++ b/internal/service/advancedclustertpf/schema.go
@@ -8,17 +8,18 @@ import (
"github.com/hashicorp/terraform-plugin-framework-validators/int64validator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/attr"
+ dsschema "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/int64default"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
- "github.com/hashicorp/terraform-plugin-framework/resource/schema/setdefault"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/schemafunc"
)
-func ResourceSchema(ctx context.Context) schema.Schema {
+func resourceSchema(ctx context.Context) schema.Schema {
return schema.Schema{
Version: 1,
Attributes: map[string]schema.Attribute{
@@ -153,24 +154,6 @@ func ResourceSchema(ctx context.Context) schema.Schema {
Computed: true,
MarkdownDescription: "Unique 24-hexadecimal digit string that identifies the cluster.",
},
- "labels": schema.SetNestedAttribute{
- Computed: true,
- Optional: true,
- Default: setdefault.StaticValue(types.SetValueMust(LabelsObjType, nil)),
- MarkdownDescription: "Collection of key-value pairs between 1 to 255 characters in length that tag and categorize the cluster. The MongoDB Cloud console doesn't display your labels.\n\nCluster labels are deprecated and will be removed in a future release. We strongly recommend that you use [resource tags](https://dochub.mongodb.org/core/add-cluster-tag-atlas) instead.",
- NestedObject: schema.NestedAttributeObject{
- Attributes: map[string]schema.Attribute{
- "key": schema.StringAttribute{
- Required: true,
- MarkdownDescription: "Key applied to tag and categorize this component.",
- },
- "value": schema.StringAttribute{
- Required: true,
- MarkdownDescription: "Value set to the Key applied to tag and categorize this component.",
- },
- },
- },
- },
"mongo_db_major_version": schema.StringAttribute{
Computed: true,
Optional: true,
@@ -216,7 +199,7 @@ func ResourceSchema(ctx context.Context) schema.Schema {
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
- DeprecationMessage: DeprecationMsgOldSchema,
+ DeprecationMessage: deprecationMsgOldSchema("id"),
Computed: true,
MarkdownDescription: "Unique 24-hexadecimal digit string that identifies the replication object for a shard in a Cluster. If you include existing shard replication configurations in the request, you must specify this parameter. If you add a new shard to an existing Cluster, you may specify this parameter. The request deletes any existing shards in the Cluster that you exclude from the request. This corresponds to Shard ID displayed in the UI.",
},
@@ -230,7 +213,7 @@ func ResourceSchema(ctx context.Context) schema.Schema {
MarkdownDescription: "external_id", // TODO: add description
},
"num_shards": schema.Int64Attribute{
- DeprecationMessage: DeprecationMsgOldSchema,
+ DeprecationMessage: deprecationMsgOldSchema("num_shards"),
Default: int64default.StaticInt64(1),
Computed: true,
Optional: true,
@@ -239,6 +222,9 @@ func ResourceSchema(ctx context.Context) schema.Schema {
"region_configs": schema.ListNestedAttribute{
Required: true,
MarkdownDescription: "Hardware specifications for nodes set for a given region. Each **regionConfigs** object describes the region's priority in elections and the number and type of MongoDB nodes that MongoDB Cloud deploys to the region. Each **regionConfigs** object must have either an **analyticsSpecs** object, **electableSpecs** object, or **readOnlySpecs** object. Tenant clusters only require **electableSpecs. Dedicated** clusters can specify any of these specifications, but must have at least one **electableSpecs** object within a **replicationSpec**.\n\n**Example:**\n\nIf you set `\"replicationSpecs[n].regionConfigs[m].analyticsSpecs.instanceSize\" : \"M30\"`, set `\"replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize\" : `\"M30\"` if you have electable nodes and `\"replicationSpecs[n].regionConfigs[m].readOnlySpecs.instanceSize\" : `\"M30\"` if you have read-only nodes.",
+ Validators: []validator.List{
+ RegionSpecPriorityOrderDecreasingValidator{},
+ },
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"analytics_auto_scaling": AutoScalingSchema(),
@@ -286,24 +272,6 @@ func ResourceSchema(ctx context.Context) schema.Schema {
Computed: true,
MarkdownDescription: "Human-readable label that indicates the current operating condition of this cluster.",
},
- "tags": schema.SetNestedAttribute{
- Computed: true,
- Optional: true,
- Default: setdefault.StaticValue(types.SetValueMust(TagsObjType, nil)),
- MarkdownDescription: "List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster.",
- NestedObject: schema.NestedAttributeObject{
- Attributes: map[string]schema.Attribute{
- "key": schema.StringAttribute{
- Required: true,
- MarkdownDescription: "Constant that defines the set of the tag. For example, `environment` in the `environment : production` tag.",
- },
- "value": schema.StringAttribute{
- Required: true,
- MarkdownDescription: "Variable that belongs to the set of the tag. For example, `production` in the `environment : production` tag.",
- },
- },
- },
- },
"termination_protection_enabled": schema.BoolAttribute{
Computed: true,
Optional: true,
@@ -319,7 +287,7 @@ func ResourceSchema(ctx context.Context) schema.Schema {
MarkdownDescription: "Flag that indicates whether to retain backup snapshots for the deleted dedicated cluster.",
},
"disk_size_gb": schema.Float64Attribute{
- DeprecationMessage: DeprecationMsgOldSchema,
+ DeprecationMessage: deprecationMsgOldSchema("disk_size_gb"),
Computed: true,
Optional: true,
MarkdownDescription: "Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity.\n\n This value must be equal for all shards and node types.\n\n This value is not configurable on M0/M2/M5 clusters.\n\n MongoDB Cloud requires this parameter if you set **replicationSpecs**.\n\n If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. \n\n Storage charge calculations depend on whether you choose the default value or a custom value.\n\n The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier.",
@@ -345,6 +313,72 @@ func ResourceSchema(ctx context.Context) schema.Schema {
Delete: true,
}),
},
+ Blocks: map[string]schema.Block{
+ "labels": schema.SetNestedBlock{
+ MarkdownDescription: "Collection of key-value pairs between 1 to 255 characters in length that tag and categorize the cluster. The MongoDB Cloud console doesn't display your labels.\n\nCluster labels are deprecated and will be removed in a future release. We strongly recommend that you use [resource tags](https://dochub.mongodb.org/core/add-cluster-tag-atlas) instead.",
+ NestedObject: schema.NestedBlockObject{
+ Attributes: map[string]schema.Attribute{
+ "key": schema.StringAttribute{
+ Required: true,
+ MarkdownDescription: "Key applied to tag and categorize this component.",
+ },
+ "value": schema.StringAttribute{
+ Required: true,
+ MarkdownDescription: "Value set to the Key applied to tag and categorize this component.",
+ },
+ },
+ },
+ },
+ "tags": schema.SetNestedBlock{
+ MarkdownDescription: "List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster.",
+ NestedObject: schema.NestedBlockObject{
+ Attributes: map[string]schema.Attribute{
+ "key": schema.StringAttribute{
+ Required: true,
+ MarkdownDescription: "Constant that defines the set of the tag. For example, `environment` in the `environment : production` tag.",
+ },
+ "value": schema.StringAttribute{
+ Required: true,
+ MarkdownDescription: "Variable that belongs to the set of the tag. For example, `production` in the `environment : production` tag.",
+ },
+ },
+ },
+ },
+ },
+ }
+}
+
+func dataSourceSchema(ctx context.Context) dsschema.Schema {
+ return conversion.DataSourceSchemaFromResource(resourceSchema(ctx), &conversion.DataSourceSchemaRequest{
+ RequiredFields: []string{"project_id", "name"},
+ OverridenFields: dataSourceOverridenFields(),
+ })
+}
+
+func pluralDataSourceSchema(ctx context.Context) dsschema.Schema {
+ return conversion.PluralDataSourceSchemaFromResource(resourceSchema(ctx), &conversion.PluralDataSourceSchemaRequest{
+ RequiredFields: []string{"project_id"},
+ OverridenRootFields: map[string]dsschema.Attribute{
+ "use_replication_spec_per_shard": dsschema.BoolAttribute{ // TODO: added as in current resource
+ Optional: true,
+ MarkdownDescription: "use_replication_spec_per_shard", // TODO: add documentation
+ },
+ "include_deleted_with_retained_backups": dsschema.BoolAttribute{ // TODO: not in current resource, decide if keep
+ Optional: true,
+ MarkdownDescription: "Flag that indicates whether to return Clusters with retain backups.",
+ },
+ },
+ OverridenFields: dataSourceOverridenFields(),
+ })
+}
+
+func dataSourceOverridenFields() map[string]dsschema.Attribute {
+ return map[string]dsschema.Attribute{
+ "use_replication_spec_per_shard": dsschema.BoolAttribute{ // TODO: added as in current resource
+ Optional: true,
+ MarkdownDescription: "use_replication_spec_per_shard", // TODO: add documentation
+ },
+ "accept_data_risks_and_force_replica_set_reconfig": nil,
}
}
@@ -482,18 +516,16 @@ func AdvancedConfigurationSchema(ctx context.Context) schema.SingleNestedAttribu
MarkdownDescription: "Lifetime, in seconds, of multi-document transactions. Atlas considers the transactions that exceed this limit as expired and so aborts them through a periodic cleanup process.",
},
"default_read_concern": schema.StringAttribute{
- DeprecationMessage: DeprecationMsgOldSchema,
+ DeprecationMessage: deprecationMsgOldSchema("default_read_concern"),
+
Computed: true,
Optional: true,
MarkdownDescription: "default_read_concern", // TODO: add description
},
"fail_index_key_too_long": schema.BoolAttribute{
- DeprecationMessage: DeprecationMsgOldSchema,
- Computed: true,
- Optional: true,
- PlanModifiers: []planmodifier.Bool{
- PlanMustUseMongoDBVersion(4.4, EqualOrLower),
- },
+ DeprecationMessage: deprecationMsgOldSchema("fail_index_key_too_long"),
+ Computed: true,
+ Optional: true,
MarkdownDescription: "fail_index_key_too_long", // TODO: add description
},
},
@@ -534,6 +566,47 @@ type TFModel struct {
PitEnabled types.Bool `tfsdk:"pit_enabled"`
}
+// TFModelDS differs from TFModel: removes timeouts, accept_data_risks_and_force_replica_set_reconfig; adds use_replication_spec_per_shard.
+type TFModelDS struct {
+ DiskSizeGB types.Float64 `tfsdk:"disk_size_gb"`
+ Labels types.Set `tfsdk:"labels"`
+ ReplicationSpecs types.List `tfsdk:"replication_specs"`
+ Tags types.Set `tfsdk:"tags"`
+ ReplicaSetScalingStrategy types.String `tfsdk:"replica_set_scaling_strategy"`
+ Name types.String `tfsdk:"name"`
+ AdvancedConfiguration types.Object `tfsdk:"advanced_configuration"`
+ BiConnectorConfig types.Object `tfsdk:"bi_connector_config"`
+ RootCertType types.String `tfsdk:"root_cert_type"`
+ ClusterType types.String `tfsdk:"cluster_type"`
+ MongoDBMajorVersion types.String `tfsdk:"mongo_db_major_version"`
+ ConfigServerType types.String `tfsdk:"config_server_type"`
+ VersionReleaseSystem types.String `tfsdk:"version_release_system"`
+ ConnectionStrings types.Object `tfsdk:"connection_strings"`
+ StateName types.String `tfsdk:"state_name"`
+ MongoDBVersion types.String `tfsdk:"mongo_db_version"`
+ CreateDate types.String `tfsdk:"create_date"`
+ EncryptionAtRestProvider types.String `tfsdk:"encryption_at_rest_provider"`
+ ProjectID types.String `tfsdk:"project_id"`
+ ClusterID types.String `tfsdk:"cluster_id"`
+ ConfigServerManagementMode types.String `tfsdk:"config_server_management_mode"`
+ PinnedFCV types.Object `tfsdk:"pinned_fcv"`
+ UseReplicationSpecPerShard types.Bool `tfsdk:"use_replication_spec_per_shard"`
+ RedactClientLogData types.Bool `tfsdk:"redact_client_log_data"`
+ GlobalClusterSelfManagedSharding types.Bool `tfsdk:"global_cluster_self_managed_sharding"`
+ BackupEnabled types.Bool `tfsdk:"backup_enabled"`
+ RetainBackupsEnabled types.Bool `tfsdk:"retain_backups_enabled"`
+ Paused types.Bool `tfsdk:"paused"`
+ TerminationProtectionEnabled types.Bool `tfsdk:"termination_protection_enabled"`
+ PitEnabled types.Bool `tfsdk:"pit_enabled"`
+}
+
+type TFModelPluralDS struct {
+ ProjectID types.String `tfsdk:"project_id"`
+ Results []*TFModelDS `tfsdk:"results"`
+ UseReplicationSpecPerShard types.Bool `tfsdk:"use_replication_spec_per_shard"` // TODO: added as in current resource
+ IncludeDeletedWithRetainedBackups types.Bool `tfsdk:"include_deleted_with_retained_backups"` // TODO: not in current resource, decide if keep
+}
+
type TFBiConnectorModel struct {
ReadPreference types.String `tfsdk:"read_preference"`
Enabled types.Bool `tfsdk:"enabled"`
diff --git a/internal/service/advancedclustertpf/resource_schema_test.go b/internal/service/advancedclustertpf/schema_test.go
similarity index 79%
rename from internal/service/advancedclustertpf/resource_schema_test.go
rename to internal/service/advancedclustertpf/schema_test.go
index 01f7cdf8fd..4b11d52eaf 100644
--- a/internal/service/advancedclustertpf/resource_schema_test.go
+++ b/internal/service/advancedclustertpf/schema_test.go
@@ -10,9 +10,17 @@ import (
)
func TestAdvancedCluster_ValidationErrors(t *testing.T) {
+ const (
+ projectID = "111111111111111111111111"
+ clusterName = "test"
+ )
resource.ParallelTest(t, resource.TestCase{
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
Steps: []resource.TestStep{
+ {
+ Config: acc.ConvertAdvancedClusterToSchemaV2(t, true, invalidRegionConfigsPriorities),
+ ExpectError: regexp.MustCompile("priority values in region_configs must be in descending order"),
+ },
{
Config: configBasic(projectID, clusterName, "mongo_db_major_version = \"8a\""),
ExpectError: regexp.MustCompile("Invalid Attribute Value Match"),
@@ -26,6 +34,10 @@ func TestAdvancedCluster_ValidationErrors(t *testing.T) {
}
func TestAdvancedCluster_PlanModifierErrors(t *testing.T) {
+ const (
+ projectID = "111111111111111111111111"
+ clusterName = "test"
+ )
resource.ParallelTest(t, resource.TestCase{
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
Steps: []resource.TestStep{
@@ -81,7 +93,7 @@ func configBasic(projectID, clusterName, extra string) string {
return fmt.Sprintf(`
resource "mongodbatlas_advanced_cluster" "test" {
timeouts = {
- create = "20s"
+ create = "2000s"
}
project_id = %[1]q
name = %[2]q
@@ -107,3 +119,33 @@ func configBasic(projectID, clusterName, extra string) string {
}
`, projectID, clusterName, extra)
}
+
+var invalidRegionConfigsPriorities = `
+resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = "111111111111111111111111"
+ name = "test-acc-tf-c-2670522663699021050"
+ cluster_type = "REPLICASET"
+ backup_enabled = false
+
+ replication_specs {
+ region_configs {
+ provider_name = "AWS"
+ priority = 6
+ region_name = "US_WEST_2"
+ electable_specs {
+ node_count = 1
+ instance_size = "M10"
+ }
+ }
+ region_configs {
+ provider_name = "AWS"
+ priority = 7
+ region_name = "US_EAST_1"
+ electable_specs {
+ node_count = 2
+ instance_size = "M10"
+ }
+ }
+ }
+}
+`
diff --git a/internal/service/advancedclustertpf/state_transition.go b/internal/service/advancedclustertpf/state_transition.go
index 5bf2cc0526..f295398bb3 100644
--- a/internal/service/advancedclustertpf/state_transition.go
+++ b/internal/service/advancedclustertpf/state_transition.go
@@ -40,7 +40,7 @@ func AwaitChanges(ctx context.Context, api admin.ClustersApi, t *timeouts.Value,
targetState = retrystrategy.RetryStrategyDeletedState
extraPending = append(extraPending, retrystrategy.RetryStrategyIdleState)
default:
- diags.AddError("errorAwaitingChanges", "unknown change reason "+changeReason)
+ diags.AddError(errorUnknownChangeReason, "unknown change reason "+changeReason)
}
if diags.HasError() {
return nil
@@ -48,10 +48,10 @@ func AwaitChanges(ctx context.Context, api admin.ClustersApi, t *timeouts.Value,
stateConf := CreateStateChangeConfig(ctx, api, projectID, clusterName, targetState, timeoutDuration, extraPending...)
clusterAny, err := stateConf.WaitForStateContext(ctx)
if err != nil {
- if admin.IsErrorCode(err, ErrorCodeClusterNotFound) && changeReason == "delete" {
+ if admin.IsErrorCode(err, ErrorCodeClusterNotFound) && changeReason == changeReasonDelete {
return nil
}
- diags.AddError("errorAwaitingCluster", fmt.Sprintf(errorCreate, err))
+ diags.AddError(errorAwaitState, fmt.Sprintf("change reason: %s, desired state: %s, error: %s", changeReason, targetState, err))
return nil
}
if targetState == retrystrategy.RetryStrategyDeletedState {
@@ -59,7 +59,7 @@ func AwaitChanges(ctx context.Context, api admin.ClustersApi, t *timeouts.Value,
}
cluster, ok := clusterAny.(*admin.ClusterDescription20240805)
if !ok {
- diags.AddError("errorAwaitingCluster", fmt.Sprintf(errorCreate, "unexpected type from WaitForStateContext"))
+ diags.AddError(errorAwaitStateResultType, fmt.Sprintf("unexpected type: %T", clusterAny))
return nil
}
return cluster
diff --git a/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant.yaml b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant.yaml
new file mode 100644
index 0000000000..91f8695dc6
--- /dev/null
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant.yaml
@@ -0,0 +1,254 @@
+variables:
+ clusterName: test-acc-tf-c-8007704607206035161
+ clusterName2: test-acc-tf-c-5804300588348578183
+ groupId: 664619d870c247237f4b86a6
+steps:
+ - config: |-
+ resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = "664619d870c247237f4b86a6"
+ name = "test-acc-tf-c-8007704607206035161"
+ cluster_type = "REPLICASET"
+
+ replication_specs = [{
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M5"
+ }
+ provider_name = "TENANT"
+ backing_provider_name = "AWS"
+ region_name = "US_EAST_1"
+ priority = 7
+ }]
+ }]
+ }
+ diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-14T08:02:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3babc353525f4cba8d0f\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3babc353525f4cba8d08\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3babc353525f4cba8d06\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-14T08:02:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3babc353525f4cba8d0f\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3babc353525f4cba8d08\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3babc353525f4cba8d06\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 2
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-vl5rrda-shard-00-00.agmk4pq.mongodb-dev.net:27017,ac-vl5rrda-shard-00-01.agmk4pq.mongodb-dev.net:27017,ac-vl5rrda-shard-00-02.agmk4pq.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-nkw6vo-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-800770460.agmk4pq.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3babc353525f4cba8d0f\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3babc353525f4cba8d08\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3babc353525f4cba8d06\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 3
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-vl5rrda-shard-00-00.agmk4pq.mongodb-dev.net:27017,ac-vl5rrda-shard-00-01.agmk4pq.mongodb-dev.net:27017,ac-vl5rrda-shard-00-02.agmk4pq.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-nkw6vo-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-800770460.agmk4pq.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:51Z\",\n \"diskSizeGB\": 5,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3babc353525f4cba8d0f\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3babc353525f4cba8d07\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3babc353525f4cba8d06\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 4
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 5
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - config: |-
+ resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = "664619d870c247237f4b86a6"
+ name = "test-acc-tf-c-5804300588348578183"
+ cluster_type = "REPLICASET"
+
+ replication_specs = [{
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M5"
+ }
+ provider_name = "TENANT"
+ backing_provider_name = "AWS"
+ region_name = "US_EAST_1"
+ priority = 7
+ }]
+ }]
+ }
+ diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 14
+ status: 202
+ text: "{}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName2}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 16
+ status: 201
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-14T08:04:03Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bf3a47ce54700c99fa1\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bf3a47ce54700c99f9c\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bf3a47ce54700c99f9a\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 10
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-vl5rrda-shard-00-00.agmk4pq.mongodb-dev.net:27017,ac-vl5rrda-shard-00-01.agmk4pq.mongodb-dev.net:27017,ac-vl5rrda-shard-00-02.agmk4pq.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-nkw6vo-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-800770460.agmk4pq.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3babc353525f4cba8d0f\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3babc353525f4cba8d08\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3babc353525f4cba8d06\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 15
+ status: 404
+ text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 11
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-vl5rrda-shard-00-00.agmk4pq.mongodb-dev.net:27017,ac-vl5rrda-shard-00-01.agmk4pq.mongodb-dev.net:27017,ac-vl5rrda-shard-00-02.agmk4pq.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-nkw6vo-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-800770460.agmk4pq.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:51Z\",\n \"diskSizeGB\": 5,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3babc353525f4cba8d0f\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3babc353525f4cba8d07\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3babc353525f4cba8d06\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 12
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 13
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 14
+ status: 202
+ text: "{}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName2}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 16
+ status: 201
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-14T08:04:03Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bf3a47ce54700c99fa1\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bf3a47ce54700c99f9c\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bf3a47ce54700c99f9a\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 17
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ftakg4l-shard-00-00.rnmedl5.mongodb-dev.net:27017,ac-ftakg4l-shard-00-01.rnmedl5.mongodb-dev.net:27017,ac-ftakg4l-shard-00-02.rnmedl5.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-eoqg8j-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-580430058.rnmedl5.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:04:03Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bf3a47ce54700c99fa1\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bf3a47ce54700c99f9c\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bf3a47ce54700c99f9a\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 18
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ftakg4l-shard-00-00.rnmedl5.mongodb-dev.net:27017,ac-ftakg4l-shard-00-01.rnmedl5.mongodb-dev.net:27017,ac-ftakg4l-shard-00-02.rnmedl5.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-eoqg8j-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-580430058.rnmedl5.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:04:03Z\",\n \"diskSizeGB\": 5,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bf3a47ce54700c99fa1\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bf3a47ce54700c99f9b\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bf3a47ce54700c99f9a\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 19
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 20
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 29
+ status: 202
+ text: "{}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 25
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ftakg4l-shard-00-00.rnmedl5.mongodb-dev.net:27017,ac-ftakg4l-shard-00-01.rnmedl5.mongodb-dev.net:27017,ac-ftakg4l-shard-00-02.rnmedl5.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-eoqg8j-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-580430058.rnmedl5.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:04:03Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bf3a47ce54700c99fa1\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bf3a47ce54700c99f9c\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bf3a47ce54700c99f9a\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 30
+ status: 404
+ duplicate_responses: 1
+ text: "{\n \"detail\": \"No cluster named {clusterName2} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName2}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 26
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ftakg4l-shard-00-00.rnmedl5.mongodb-dev.net:27017,ac-ftakg4l-shard-00-01.rnmedl5.mongodb-dev.net:27017,ac-ftakg4l-shard-00-02.rnmedl5.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-eoqg8j-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-580430058.rnmedl5.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:04:03Z\",\n \"diskSizeGB\": 5,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bf3a47ce54700c99fa1\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bf3a47ce54700c99f9b\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bf3a47ce54700c99f9a\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 27
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 28
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 29
+ status: 202
+ text: "{}"
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/02_02_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
similarity index 89%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/02_02_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
index aae97823e8..0700368579 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/02_02_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
@@ -1,7 +1,7 @@
{
"clusterType": "REPLICASET",
"labels": [],
- "name": "test-acc-tf-c-91771214182147246",
+ "name": "{clusterName}",
"replicationSpecs": [
{
"regionConfigs": [
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/02_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/02_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/02_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/02_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/02_02_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/02_02_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
similarity index 78%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/02_02_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/02_02_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
index 678c9b1fe4..4fa3bcde20 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/02_02_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/02_02_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
@@ -1,15 +1,14 @@
{
"clusterType": "REPLICASET",
"labels": [],
- "name": "test-acc-tf-c-91771214182147246",
+ "name": "{clusterName2}",
"replicationSpecs": [
{
"regionConfigs": [
{
"backingProviderName": "AWS",
"electableSpecs": {
- "instanceSize": "M5",
- "nodeCount": 0
+ "instanceSize": "M5"
},
"priority": 7,
"providerName": "TENANT",
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName2}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName2}_2023-02-01.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName2}_2023-02-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_basicTenant/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName2}_2023-02-01.json
diff --git a/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate.yaml b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate.yaml
new file mode 100644
index 0000000000..f8b157a51d
--- /dev/null
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate.yaml
@@ -0,0 +1,340 @@
+variables:
+ clusterName: test-acc-tf-c-1268086615384167156
+ groupId: 664619d870c247237f4b86a6
+steps:
+ - config: |-
+ resource "mongodbatlas_advanced_cluster" "test" {
+ timeouts = {
+ create = "2000s"
+ }
+ project_id = "664619d870c247237f4b86a6"
+ name = "test-acc-tf-c-1268086615384167156"
+ cluster_type = "REPLICASET"
+ replication_specs = [{
+ region_configs = [{
+ priority = 7
+ provider_name = "AWS"
+ region_name = "US_EAST_1"
+ auto_scaling = {
+ compute_scale_down_enabled = false # necessary to have similar SDKv2 request
+ compute_enabled = false # necessary to have similar SDKv2 request
+ disk_gb_enabled = true
+ }
+ electable_specs = {
+ node_count = 3
+ instance_size = "M10"
+ disk_size_gb = 10
+ }
+ }]
+ }]
+
+ }
+ diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 10,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 10,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 2
+ status: 200
+ duplicate_responses: 16
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 19
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 20
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskSizeGB\": 10,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d17\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 21
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0be02d6b0330e14dc\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"675bf94c216ed3746c09fc88\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": null\n }\n ],\n \"totalCount\": 2\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 22
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 23
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - config: |-
+ resource "mongodbatlas_advanced_cluster" "test" {
+ timeouts = {
+ create = "2000s"
+ }
+ project_id = "664619d870c247237f4b86a6"
+ name = "test-acc-tf-c-1268086615384167156"
+ cluster_type = "REPLICASET"
+ replication_specs = [{
+ region_configs = [{
+ priority = 7
+ provider_name = "AWS"
+ region_name = "US_EAST_1"
+ auto_scaling = {
+ compute_scale_down_enabled = false # necessary to have similar SDKv2 request
+ compute_enabled = false # necessary to have similar SDKv2 request
+ disk_gb_enabled = true
+ }
+ electable_specs = {
+ node_count = 3
+ instance_size = "M10"
+ disk_size_gb = 10
+ }
+ }]
+ }]
+
+ backup_enabled = true
+ bi_connector_config = {
+ enabled = true
+ }
+ # config_server_management_mode = "ATLAS_MANAGED" UNSTABLE: After applying this test step, the non-refresh plan was not empty
+ labels = [{
+ key = "env"
+ value = "test"
+ }]
+ tags = [{
+ key = "env"
+ value = "test"
+ }]
+ mongo_db_major_version = "8.0"
+ pit_enabled = true
+ redact_client_log_data = true
+ replica_set_scaling_strategy = "NODE_TYPE"
+ # retain_backups_enabled = true # only set on delete
+ root_cert_type = "ISRGROOTX1"
+ # termination_protection_enabled = true # must be reset to false to enable delete
+ version_release_system = "CONTINUOUS"
+
+ advanced_configuration = {
+ change_stream_options_pre_and_post_images_expire_after_seconds = 100
+ default_read_concern = "available"
+ default_write_concern = "majority"
+ javascript_enabled = true
+ minimum_enabled_tls_protocol = "TLS1_0"
+ no_table_scan = true
+ sample_refresh_interval_bi_connector = 310
+ sample_size_bi_connector = 110
+ transaction_lifetime_limit_seconds = 300
+ }
+
+ }
+ diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2024-10-23'
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ responses:
+ - response_index: 34
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: PATCH
+ version: '2024-08-05'
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"defaultWriteConcern\": \"majority\",\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ responses:
+ - response_index: 41
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: PATCH
+ version: '2023-01-01'
+ text: "{\n \"defaultReadConcern\": \"available\"\n}"
+ responses:
+ - response_index: 42
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 29
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 35
+ status: 200
+ duplicate_responses: 4
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - response_index: 40
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - response_index: 43
+ status: 200
+ duplicate_responses: 3
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - response_index: 47
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 30
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskSizeGB\": 10,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d17\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 48
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskSizeGB\": 10,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d17\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 31
+ status: 200
+ duplicate_responses: 2
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0be02d6b0330e14dc\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"675bf94c216ed3746c09fc88\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": null\n }\n ],\n \"totalCount\": 2\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 32
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - response_index: 53
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 33
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - response_index: 54
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2024-10-23'
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ responses:
+ - response_index: 34
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: PATCH
+ version: '2024-08-05'
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"defaultWriteConcern\": \"majority\",\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ responses:
+ - response_index: 41
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: PATCH
+ version: '2023-01-01'
+ text: "{\n \"defaultReadConcern\": \"available\"\n}"
+ responses:
+ - response_index: 42
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ - diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 60
+ status: 202
+ text: "{}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 55
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - response_index: 61
+ status: 200
+ duplicate_responses: 5
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d18\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"DELETING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - response_index: 67
+ status: 404
+ text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 56
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://test-acc-tf-c-126808661-shard-00-00.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-01.jciib.mongodb-dev.net:27017,test-acc-tf-c-126808661-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-zwz5wz-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-126808661.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-14T08:02:52Z\",\n \"diskSizeGB\": 10,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675d3bacc353525f4cba8d20\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"675d3bacc353525f4cba8d17\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675d3bacc353525f4cba8d16\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"test\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 57
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0be02d6b0330e14dc\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"675bf94c216ed3746c09fc88\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": null\n }\n ],\n \"totalCount\": 2\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 58
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 59
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": 300\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 60
+ status: 202
+ text: "{}"
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
similarity index 95%
rename from internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
index 2620d81aca..9c445eafcf 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
@@ -1,7 +1,7 @@
{
"clusterType": "REPLICASET",
"labels": [],
- "name": "test",
+ "name": "{clusterName}",
"replicationSpecs": [
{
"regionConfigs": [
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/03_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
similarity index 91%
rename from internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/03_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
index 2149b7dd55..f3b9f55a0a 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/03_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
@@ -10,7 +10,6 @@
"value": "test"
}
],
- "mongoDBMajorVersion": "8.0",
"pitEnabled": true,
"redactClientLogData": true,
"replicaSetScalingStrategy": "NODE_TYPE",
diff --git a/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_processArgs_2024-08-05.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_processArgs_2024-08-05.json
new file mode 100644
index 0000000000..602856e979
--- /dev/null
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_processArgs_2024-08-05.json
@@ -0,0 +1,9 @@
+{
+ "changeStreamOptionsPreAndPostImagesExpireAfterSeconds": 100,
+ "defaultWriteConcern": "majority",
+ "minimumEnabledTlsProtocol": "TLS1_0",
+ "noTableScan": true,
+ "sampleRefreshIntervalBIConnector": 310,
+ "sampleSizeBIConnector": 110,
+ "transactionLifetimeLimitSeconds": 300
+}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_03_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_processArgs_2023-01-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_03_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_processArgs_2023-01-01.json
new file mode 100644
index 0000000000..74c44cf2ce
--- /dev/null
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_03_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_processArgs_2023-01-01.json
@@ -0,0 +1,3 @@
+{
+ "defaultReadConcern": "available"
+}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_04_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/02_04_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/06_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/06_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_replicasetAdvConfigUpdate/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
diff --git a/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic.yaml b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic.yaml
new file mode 100644
index 0000000000..c79a455de7
--- /dev/null
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic.yaml
@@ -0,0 +1,303 @@
+variables:
+ clusterName: test-acc-tf-c-5896643684689749998
+ groupId: 664619d870c247237f4b86a6
+steps:
+ - config: |-
+ resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = "664619d870c247237f4b86a6"
+ name = "test-acc-tf-c-5896643684689749998"
+ cluster_type = "SHARDED"
+
+ replication_specs = [
+ { # shard 1
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M30"
+ disk_iops = 2000
+ node_count = 3
+ ebs_volume_type = "PROVISIONED"
+ }
+
+
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }]
+ },
+ { # shard 2
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M30"
+ ebs_volume_type = "PROVISIONED"
+ disk_iops = 1000
+ node_count = 3
+ }
+
+
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }]
+ }]
+ }
+ diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"SHARDED\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"SHARDED\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 2
+ status: 200
+ duplicate_responses: 12
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 15
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 16
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskSizeGB\": 40,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5c\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 17
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-056e765ca927b9785\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"675bf94c216ed3746c09fc88\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-0cb8137a17095e4f7\"\n }\n ],\n \"totalCount\": 2\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 18
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 19
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - config: |-
+ resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = "664619d870c247237f4b86a6"
+ name = "test-acc-tf-c-5896643684689749998"
+ cluster_type = "SHARDED"
+
+ replication_specs = [
+ { # shard 1
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M30"
+ disk_iops = 2000
+ node_count = 3
+ ebs_volume_type = "PROVISIONED"
+ }
+
+ auto_scaling = {
+ disk_gb_enabled = true
+ }
+
+ analytics_specs = {
+ instance_size = "M30"
+ node_count = 1
+ ebs_volume_type = "PROVISIONED"
+ disk_iops = 2000
+ }
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }]
+ },
+ { # shard 2
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M30"
+ ebs_volume_type = "PROVISIONED"
+ disk_iops = 1000
+ node_count = 3
+ }
+
+ auto_scaling = {
+ disk_gb_enabled = true
+ }
+
+ analytics_specs = {
+ instance_size = "M30"
+ node_count = 1
+ ebs_volume_type = "PROVISIONED"
+ disk_iops = 1000
+ }
+ provider_name = "AWS"
+ priority = 7
+ region_name = "EU_WEST_1"
+ }]
+ }]
+ }
+ diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2024-08-05'
+ text: "{\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {},\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {},\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
+ responses:
+ - response_index: 30
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 25
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 31
+ status: 200
+ duplicate_responses: 44
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 76
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-03.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-03.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 26
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskSizeGB\": 40,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5c\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 77
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-03.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-03.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskSizeGB\": 40,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5c\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 27
+ status: 200
+ duplicate_responses: 2
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-056e765ca927b9785\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"675bf94c216ed3746c09fc88\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-0cb8137a17095e4f7\"\n }\n ],\n \"totalCount\": 2\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 28
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 29
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2024-08-05'
+ text: "{\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
+ responses:
+ - response_index: 30
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 89
+ status: 202
+ text: "{}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 84
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-03.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-03.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 90
+ status: 200
+ duplicate_responses: 4
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-03.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-03.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5d\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"675bf94c216ed3746c09fc5f\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"DELETING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 95
+ status: 404
+ text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 85
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"EMBEDDED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-589664368-config-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-config-00-03.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-00.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-01.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-02.jciib.mongodb-dev.net:27016,test-acc-tf-c-589664368-shard-00-03.jciib.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-589664368.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:24Z\",\n \"diskSizeGB\": 40,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94c216ed3746c09fc8d\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94c216ed3746c09fc5c\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"675bf94c216ed3746c09fc5b\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 86
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-056e765ca927b9785\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"675bf94c216ed3746c09fc88\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-0cb8137a17095e4f7\"\n }\n ],\n \"totalCount\": 2\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 87
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 88
+ status: 200
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 89
+ status: 202
+ text: "{}"
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
similarity index 95%
rename from internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
index 9ea2b82c24..6d1e8b6208 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
@@ -1,7 +1,7 @@
{
"clusterType": "SHARDED",
"labels": [],
- "name": "sharded-multi-replication",
+ "name": "{clusterName}",
"replicationSpecs": [
{
"regionConfigs": [
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-08-05.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-08-05.json
similarity index 79%
rename from internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-08-05.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-08-05.json
index 6148eee5d3..e118f07e1f 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-08-05.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-08-05.json
@@ -1,7 +1,6 @@
{
"replicationSpecs": [
{
- "id": "673cd6d2fb19da739ae2d4a8",
"regionConfigs": [
{
"analyticsSpecs": {
@@ -11,17 +10,13 @@
"nodeCount": 1
},
"autoScaling": {
- "compute": {
- "enabled": false,
- "scaleDownEnabled": false
- },
+ "compute": {},
"diskGB": {
"enabled": true
}
},
"electableSpecs": {
"diskIOPS": 2000,
- "diskSizeGB": 40,
"ebsVolumeType": "PROVISIONED",
"instanceSize": "M30",
"nodeCount": 3
@@ -34,7 +29,6 @@
"zoneName": "ZoneName managed by Terraform"
},
{
- "id": "673cd6d2fb19da739ae2d4aa",
"regionConfigs": [
{
"analyticsSpecs": {
@@ -44,17 +38,13 @@
"nodeCount": 1
},
"autoScaling": {
- "compute": {
- "enabled": false,
- "scaleDownEnabled": false
- },
+ "compute": {},
"diskGB": {
"enabled": true
}
},
"electableSpecs": {
"diskIOPS": 1000,
- "diskSizeGB": 40,
"ebsVolumeType": "PROVISIONED",
"instanceSize": "M30",
"nodeCount": 3
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_03_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_03_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_shardedBasic/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
diff --git a/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema.yaml b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema.yaml
new file mode 100644
index 0000000000..4717e8e110
--- /dev/null
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema.yaml
@@ -0,0 +1,350 @@
+variables:
+ clusterName: test-acc-tf-c-5441500136625649671
+ groupId: 67587ca8240d1b0223213aaf
+steps:
+ - diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-08-05'
+ text: "{\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"labels\": [],\n \"mongoDBMajorVersion\": \"8.0\",\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 10
+ status: 201
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e1\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587cae27216120d54106e3\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups
+ method: POST
+ version: '2023-01-01'
+ text: "{\n \"clusterCount\": 0,\n \"created\": \"0001-01-01T00:00:00Z\",\n \"name\": \"test-acc-tf-p-7648043272615094485\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": [],\n \"withDefaultAlertsSettings\": true\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"clusterCount\": 0,\n \"created\": \"2024-12-10T17:38:49Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-7648043272615094485\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
+ - path: /api/atlas/v2/groups/{groupId}/settings
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 2
+ status: 200
+ duplicate_responses: 2
+ text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
+ - path: /api/atlas/v2/groups/{groupId}/settings
+ method: PATCH
+ version: '2023-01-01'
+ text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
+ responses:
+ - response_index: 3
+ status: 200
+ text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
+ - path: /api/atlas/v2/groups/{groupId}
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 4
+ status: 200
+ text: "{\n \"clusterCount\": 0,\n \"created\": \"2024-12-10T17:38:49Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-7648043272615094485\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
+ - response_index: 43
+ status: 200
+ text: "{\n \"clusterCount\": 1,\n \"created\": \"2024-12-10T17:38:49Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-7648043272615094485\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
+ - path: /api/atlas/v2/groups/{groupId}/teams
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 5
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/teams?includeCount=true\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
+ - path: /api/atlas/v2/groups/{groupId}/limits
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 6
+ status: 200
+ text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
+ - response_index: 45
+ status: 200
+ text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 10,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
+ - path: /api/atlas/v2/groups/{groupId}/ipAddresses
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 8
+ status: 200
+ text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": []\n }\n}"
+ - response_index: 47
+ status: 200
+ text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": [\n {\n \"clusterName\": \"{clusterName}\",\n \"inbound\": [\n \"52.213.148.59\",\n \"63.35.152.113\",\n \"52.209.113.218\",\n \"108.128.182.2\",\n \"20.186.58.189\",\n \"172.210.224.116\",\n \"52.49.34.25\",\n \"54.217.234.231\",\n \"54.216.203.84\",\n \"52.51.233.113\",\n \"20.186.59.130\",\n \"172.210.224.229\",\n \"34.255.253.74\",\n \"34.242.66.135\",\n \"20.186.59.168\"\n ],\n \"outbound\": [\n \"52.213.148.59\",\n \"63.35.152.113\",\n \"52.209.113.218\",\n \"108.128.182.2\",\n \"20.186.58.189\",\n \"172.210.224.116\",\n \"52.49.34.25\",\n \"54.217.234.231\",\n \"54.216.203.84\",\n \"52.51.233.113\",\n \"20.186.59.130\",\n \"172.210.224.229\",\n \"34.255.253.74\",\n \"34.242.66.135\",\n \"20.186.59.168\"\n ]\n }\n ]\n }\n}"
+ - path: /api/atlas/v2/groups/{groupId}/managedSlowMs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 9
+ status: 200
+ duplicate_responses: 1
+ text: "true"
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-08-05'
+ text: "{\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"labels\": [],\n \"mongoDBMajorVersion\": \"8.0\",\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 10
+ status: 201
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e1\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587cae27216120d54106e3\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 11
+ status: 200
+ duplicate_responses: 25
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e1\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587cae27216120d54106e3\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 37
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e1\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587cae27216120d54106e3\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 38
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskSizeGB\": 8,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e0\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 39
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"67587cae27216120d54106f5\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-07b3948936164aa5e\"\n }\n ],\n \"totalCount\": 1\n}"
+ - response_index: 40
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AZURE\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"azureSubscriptionId\": \"591236d43d098d433845860f\",\n \"id\": \"67587cae27216120d54106f6\",\n \"providerName\": \"AZURE\",\n \"provisioned\": true,\n \"region\": \"US_EAST_2\",\n \"vnetName\": \"vnet_67587cae27216120d54106f6_a9tig9ed\"\n }\n ],\n \"totalCount\": 1\n}"
+ - response_index: 51
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"67587cae27216120d54106f5\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-07b3948936164aa5e\"\n }\n ],\n \"totalCount\": 1\n}"
+ - response_index: 52
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AZURE\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"azureSubscriptionId\": \"591236d43d098d433845860f\",\n \"id\": \"67587cae27216120d54106f6\",\n \"providerName\": \"AZURE\",\n \"provisioned\": true,\n \"region\": \"US_EAST_2\",\n \"vnetName\": \"vnet_67587cae27216120d54106f6_a9tig9ed\"\n }\n ],\n \"totalCount\": 1\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 41
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 42
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2023-02-01'
+ text: "{\n \"replicationSpecs\": [\n {\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
+ responses:
+ - response_index: 67
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskSizeGB\": 8,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e0\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2024-10-23'
+ text: "{\n \"configServerManagementMode\": \"ATLAS_MANAGED\"\n}"
+ responses:
+ - response_index: 68
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e1\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587cae27216120d54106e3\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 101
+ status: 202
+ text: "{}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 55
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"clusterCount\": 1,\n \"created\": \"2024-12-10T17:38:49Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-7648043272615094485\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
+ - path: /api/atlas/v2/groups/{groupId}/teams
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 56
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/teams?includeCount=true\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
+ - path: /api/atlas/v2/groups/{groupId}/limits
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 57
+ status: 200
+ duplicate_responses: 1
+ text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 10,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
+ - path: /api/atlas/v2/groups/{groupId}/settings
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 58
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
+ - path: /api/atlas/v2/groups/{groupId}/ipAddresses
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 59
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": [\n {\n \"clusterName\": \"{clusterName}\",\n \"inbound\": [\n \"52.213.148.59\",\n \"63.35.152.113\",\n \"52.209.113.218\",\n \"108.128.182.2\",\n \"20.186.58.189\",\n \"172.210.224.116\",\n \"52.49.34.25\",\n \"54.217.234.231\",\n \"54.216.203.84\",\n \"52.51.233.113\",\n \"20.186.59.130\",\n \"172.210.224.229\",\n \"34.255.253.74\",\n \"34.242.66.135\",\n \"20.186.59.168\"\n ],\n \"outbound\": [\n \"52.213.148.59\",\n \"63.35.152.113\",\n \"52.209.113.218\",\n \"108.128.182.2\",\n \"20.186.58.189\",\n \"172.210.224.116\",\n \"52.49.34.25\",\n \"54.217.234.231\",\n \"54.216.203.84\",\n \"52.51.233.113\",\n \"20.186.59.130\",\n \"172.210.224.229\",\n \"34.255.253.74\",\n \"34.242.66.135\",\n \"20.186.59.168\"\n ]\n }\n ]\n }\n}"
+ - path: /api/atlas/v2/groups/{groupId}/managedSlowMs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 60
+ status: 200
+ duplicate_responses: 1
+ text: "true"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 61
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e1\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587cae27216120d54106e3\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 69
+ status: 200
+ duplicate_responses: 15
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e1\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587cae27216120d54106e3\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 85
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e1\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587cae27216120d54106e3\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 102
+ status: 404
+ text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
+ - response_index: 105
+ status: 404
+ text: "{\n \"detail\": \"No group with ID {groupId} exists.\",\n \"error\": 404,\n \"errorCode\": \"GROUP_NOT_FOUND\",\n \"parameters\": [\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 62
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskSizeGB\": 8,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e0\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 86
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskSizeGB\": 8,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e0\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 63
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"67587cae27216120d54106f5\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-07b3948936164aa5e\"\n }\n ],\n \"totalCount\": 1\n}"
+ - response_index: 64
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AZURE\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"azureSubscriptionId\": \"591236d43d098d433845860f\",\n \"id\": \"67587cae27216120d54106f6\",\n \"providerName\": \"AZURE\",\n \"provisioned\": true,\n \"region\": \"US_EAST_2\",\n \"vnetName\": \"vnet_67587cae27216120d54106f6_a9tig9ed\"\n }\n ],\n \"totalCount\": 1\n}"
+ - response_index: 87
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"67587cae27216120d54106f5\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-07b3948936164aa5e\"\n }\n ],\n \"totalCount\": 1\n}"
+ - response_index: 88
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AZURE\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"azureSubscriptionId\": \"591236d43d098d433845860f\",\n \"id\": \"67587cae27216120d54106f6\",\n \"providerName\": \"AZURE\",\n \"provisioned\": true,\n \"region\": \"US_EAST_2\",\n \"vnetName\": \"vnet_67587cae27216120d54106f6_a9tig9ed\"\n }\n ],\n \"totalCount\": 1\n}"
+ - response_index: 97
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"67587cae27216120d54106f5\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-07b3948936164aa5e\"\n }\n ],\n \"totalCount\": 1\n}"
+ - response_index: 98
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AZURE\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"azureSubscriptionId\": \"591236d43d098d433845860f\",\n \"id\": \"67587cae27216120d54106f6\",\n \"providerName\": \"AZURE\",\n \"provisioned\": true,\n \"region\": \"US_EAST_2\",\n \"vnetName\": \"vnet_67587cae27216120d54106f6_a9tig9ed\"\n }\n ],\n \"totalCount\": 1\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 65
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 66
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2023-02-01'
+ text: "{\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e0\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
+ responses:
+ - response_index: 67
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskSizeGB\": 8,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e0\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2024-10-23'
+ text: "{\n \"configServerManagementMode\": \"ATLAS_MANAGED\"\n}"
+ responses:
+ - response_index: 68
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-544150013-shard-00-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-00-05.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-00.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-01.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-02.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-03.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-04.i49qe.mongodb-dev.net:27016,test-acc-tf-c-544150013-shard-01-05.i49qe.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-544150013.i49qe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:54Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587cae27216120d54106f7\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587cae27216120d54106e1\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587cae27216120d54106e3\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"67587cae27216120d54106df\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 101
+ status: 202
+ text: "{}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 103
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true\\u0026includeDeletedWithRetainedBackups=false\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
+ - path: /api/atlas/v2/groups/{groupId}
+ method: DELETE
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 104
+ status: 202
+ text: "{}"
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json
similarity index 96%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json
index b7a0b7706f..27a1e0e343 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json
@@ -3,7 +3,7 @@
"configServerManagementMode": "FIXED_TO_DEDICATED",
"labels": [],
"mongoDBMajorVersion": "8.0",
- "name": "test-acc-tf-c-6025103075771235151",
+ "name": "{clusterName}",
"replicationSpecs": [
{
"regionConfigs": [
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
similarity index 83%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
index 3cf5db54d3..f56c9f1a33 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
@@ -1,17 +1,14 @@
{
"replicationSpecs": [
{
- "id": "6746cefbaef48d1cb2658ba6",
"numShards": 2,
"regionConfigs": [
{
"analyticsSpecs": {
- "diskIOPS": 3000,
"instanceSize": "M20",
"nodeCount": 1
},
"electableSpecs": {
- "diskIOPS": 3000,
"instanceSize": "M10",
"nodeCount": 3
},
@@ -21,7 +18,6 @@
},
{
"electableSpecs": {
- "diskIOPS": 3500,
"instanceSize": "M10",
"nodeCount": 2
},
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/02_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/02_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_02_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/02_03_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_02_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchema/02_03_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
diff --git a/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel.yaml b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel.yaml
new file mode 100644
index 0000000000..ce40260f8f
--- /dev/null
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel.yaml
@@ -0,0 +1,316 @@
+variables:
+ clusterName: test-acc-tf-c-2282852019288180857
+ groupId: 67587c94240d1b0223213a32
+steps:
+ - diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-08-05'
+ text: "{\n \"backupEnabled\": false,\n \"clusterType\": \"SHARDED\",\n \"labels\": [],\n \"mongoDBMajorVersion\": \"7.0\",\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 10
+ status: 201
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a96\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587c99240d1b0223213a98\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups
+ method: POST
+ version: '2023-01-01'
+ text: "{\n \"clusterCount\": 0,\n \"created\": \"0001-01-01T00:00:00Z\",\n \"name\": \"test-acc-tf-p-4471385080839781831\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": [],\n \"withDefaultAlertsSettings\": true\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"clusterCount\": 0,\n \"created\": \"2024-12-10T17:38:29Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-4471385080839781831\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
+ - path: /api/atlas/v2/groups/{groupId}/settings
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 2
+ status: 200
+ duplicate_responses: 2
+ text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
+ - path: /api/atlas/v2/groups/{groupId}/settings
+ method: PATCH
+ version: '2023-01-01'
+ text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
+ responses:
+ - response_index: 3
+ status: 200
+ text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
+ - path: /api/atlas/v2/groups/{groupId}
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 4
+ status: 200
+ text: "{\n \"clusterCount\": 0,\n \"created\": \"2024-12-10T17:38:29Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-4471385080839781831\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
+ - response_index: 39
+ status: 200
+ text: "{\n \"clusterCount\": 1,\n \"created\": \"2024-12-10T17:38:29Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-4471385080839781831\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
+ - path: /api/atlas/v2/groups/{groupId}/teams
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 5
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/teams?includeCount=true\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
+ - path: /api/atlas/v2/groups/{groupId}/limits
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 6
+ status: 200
+ text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
+ - response_index: 41
+ status: 200
+ text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
+ - path: /api/atlas/v2/groups/{groupId}/ipAddresses
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 8
+ status: 200
+ text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": []\n }\n}"
+ - response_index: 43
+ status: 200
+ text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": [\n {\n \"clusterName\": \"{clusterName}\",\n \"inbound\": [\n \"52.6.222.25\",\n \"35.174.188.9\",\n \"44.219.33.242\",\n \"35.172.15.68\",\n \"34.233.185.182\",\n \"34.197.45.207\",\n \"44.205.70.240\",\n \"18.205.167.89\",\n \"34.206.136.93\"\n ],\n \"outbound\": [\n \"52.6.222.25\",\n \"35.174.188.9\",\n \"44.219.33.242\",\n \"35.172.15.68\",\n \"34.233.185.182\",\n \"34.197.45.207\",\n \"44.205.70.240\",\n \"18.205.167.89\",\n \"34.206.136.93\"\n ]\n }\n ]\n }\n}"
+ - path: /api/atlas/v2/groups/{groupId}/managedSlowMs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 9
+ status: 200
+ duplicate_responses: 1
+ text: "true"
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-08-05'
+ text: "{\n \"backupEnabled\": false,\n \"clusterType\": \"SHARDED\",\n \"labels\": [],\n \"mongoDBMajorVersion\": \"7.0\",\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 10
+ status: 201
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a96\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587c99240d1b0223213a98\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 11
+ status: 200
+ duplicate_responses: 22
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a96\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587c99240d1b0223213a98\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 34
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a96\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587c99240d1b0223213a98\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 35
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskSizeGB\": 50,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a95\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 36
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"67587c99240d1b0223213aaa\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0ace974e0bb8ac767\"\n }\n ],\n \"totalCount\": 1\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 37
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 38
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2023-02-01'
+ text: "{\n \"diskSizeGB\": 55,\n \"replicationSpecs\": [\n {\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
+ responses:
+ - response_index: 61
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskSizeGB\": 55,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a95\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 82
+ status: 202
+ text: "{}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 50
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"clusterCount\": 1,\n \"created\": \"2024-12-10T17:38:29Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-4471385080839781831\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
+ - path: /api/atlas/v2/groups/{groupId}/teams
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 51
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/teams?includeCount=true\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
+ - path: /api/atlas/v2/groups/{groupId}/limits
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 52
+ status: 200
+ duplicate_responses: 1
+ text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
+ - path: /api/atlas/v2/groups/{groupId}/settings
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 53
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
+ - path: /api/atlas/v2/groups/{groupId}/ipAddresses
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 54
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": [\n {\n \"clusterName\": \"{clusterName}\",\n \"inbound\": [\n \"52.6.222.25\",\n \"35.174.188.9\",\n \"44.219.33.242\",\n \"35.172.15.68\",\n \"34.233.185.182\",\n \"34.197.45.207\",\n \"44.205.70.240\",\n \"18.205.167.89\",\n \"34.206.136.93\"\n ],\n \"outbound\": [\n \"52.6.222.25\",\n \"35.174.188.9\",\n \"44.219.33.242\",\n \"35.172.15.68\",\n \"34.233.185.182\",\n \"34.197.45.207\",\n \"44.205.70.240\",\n \"18.205.167.89\",\n \"34.206.136.93\"\n ]\n }\n ]\n }\n}"
+ - path: /api/atlas/v2/groups/{groupId}/managedSlowMs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 55
+ status: 200
+ duplicate_responses: 1
+ text: "true"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 56
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a96\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587c99240d1b0223213a98\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 62
+ status: 200
+ duplicate_responses: 5
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a96\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587c99240d1b0223213a98\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 68
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a96\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587c99240d1b0223213a98\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 83
+ status: 200
+ duplicate_responses: 4
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a96\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"67587c99240d1b0223213a98\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"DELETING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 88
+ status: 404
+ text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
+ - response_index: 91
+ status: 404
+ text: "{\n \"detail\": \"No group with ID {groupId} exists.\",\n \"error\": 404,\n \"errorCode\": \"GROUP_NOT_FOUND\",\n \"parameters\": [\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 57
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskSizeGB\": 50,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a95\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 69
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskSizeGB\": 55,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a95\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 58
+ status: 200
+ duplicate_responses: 2
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"67587c99240d1b0223213aaa\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0ace974e0bb8ac767\"\n }\n ],\n \"totalCount\": 1\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 59
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 60
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: PATCH
+ version: '2023-02-01'
+ text: "{\n \"diskSizeGB\": 55,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a95\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
+ responses:
+ - response_index: 61
+ status: 200
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-228285201-shard-00-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-00-02.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-00.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-01.vxwqk.mongodb-dev.net:27016,test-acc-tf-c-228285201-shard-01-02.vxwqk.mongodb-dev.net:27016/?ssl=true\\u0026authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-228285201.vxwqk.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-10T17:38:34Z\",\n \"diskSizeGB\": 55,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"67587c9a240d1b0223213aab\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"67587c99240d1b0223213a95\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"67587c99240d1b0223213a94\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 82
+ status: 202
+ text: "{}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 89
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true\\u0026includeDeletedWithRetainedBackups=false\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
+ - path: /api/atlas/v2/groups/{groupId}
+ method: DELETE
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 90
+ status: 202
+ text: "{}"
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json
similarity index 96%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json
index 8a4993c06c..426c48c469 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json
@@ -3,7 +3,7 @@
"clusterType": "SHARDED",
"labels": [],
"mongoDBMajorVersion": "7.0",
- "name": "6746cee8aef48d1cb265882d",
+ "name": "{clusterName}",
"replicationSpecs": [
{
"regionConfigs": [
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_02_PATCH__api_atlas_v2_groups_{groupId}_settings_2023-01-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_02_PATCH__api_atlas_v2_groups_{groupId}_settings_2023-01-01.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_02_PATCH__api_atlas_v2_groups_{groupId}_settings_2023-01-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_02_PATCH__api_atlas_v2_groups_{groupId}_settings_2023-01-01.json
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_03_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_03_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_03_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_03_POST__api_atlas_v2_groups_{groupId}_clusters_2024-08-05.json
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
similarity index 82%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
index 2f268bd6b7..c0b5b8a6af 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
@@ -2,17 +2,14 @@
"diskSizeGB": 55,
"replicationSpecs": [
{
- "id": "6746ceeeaef48d1cb26589ea",
"numShards": 2,
"regionConfigs": [
{
"analyticsSpecs": {
- "diskIOPS": 3000,
"instanceSize": "M10",
"nodeCount": 0
},
"electableSpecs": {
- "diskIOPS": 3000,
"instanceSize": "M10",
"nodeCount": 3
},
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/02_02_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_02_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
similarity index 100%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/02_02_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_02_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
diff --git a/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade.yaml b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade.yaml
new file mode 100644
index 0000000000..92c7ff99f5
--- /dev/null
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade.yaml
@@ -0,0 +1,202 @@
+variables:
+ clusterName: test-acc-tf-c-6727593058295022052
+ groupId: 664619d870c247237f4b86a6
+steps:
+ - config: |-
+ resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = "664619d870c247237f4b86a6"
+ name = "test-acc-tf-c-6727593058295022052"
+ cluster_type = "REPLICASET"
+
+ replication_specs = [{
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M5"
+ }
+ provider_name = "TENANT"
+ backing_provider_name = "AWS"
+ region_name = "US_EAST_1"
+ priority = 7
+ }]
+ }]
+ }
+ diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca1\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf94f216ed3746c09fc9f\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-10-23'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca1\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf94f216ed3746c09fc9f\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 2
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca1\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf94f216ed3746c09fc9f\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 3
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskSizeGB\": 5,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca0\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf94f216ed3746c09fc9f\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 4
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 5
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - config: |-
+ resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = "664619d870c247237f4b86a6"
+ name = "test-acc-tf-c-6727593058295022052"
+ cluster_type = "REPLICASET"
+
+ replication_specs = [{
+ region_configs = [{
+ electable_specs = {
+ instance_size = "M10"
+ node_count = 3
+ }
+ priority = 7
+ provider_name = "AWS"
+ region_name = "US_EAST_1"
+ }]
+ }]
+ }
+ diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/tenantUpgrade
+ method: POST
+ version: '2023-01-01'
+ text: "{\n \"name\": \"{clusterName}\",\n \"providerSettings\": {\n \"instanceSizeName\": \"M10\",\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n}"
+ responses:
+ - response_index: 14
+ status: 200
+ text: "{\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGBEnabled\": false\n },\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskSizeGB\": 5,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"mongoURI\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017\",\n \"mongoURIUpdated\": \"2024-12-13T09:07:43Z\",\n \"mongoURIWithOptions\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"name\": \"{clusterName}\",\n \"numShards\": 1,\n \"paused\": false,\n \"pitEnabled\": false,\n \"providerBackupEnabled\": false,\n \"providerSettings\": {\n \"autoScaling\": {\n \"compute\": {\n \"maxInstanceSize\": null,\n \"minInstanceSize\": null\n }\n },\n \"backingProviderName\": \"AWS\",\n \"effectiveInstanceSizeName\": \"M5\",\n \"instanceSizeName\": \"M5\",\n \"nextBackupDate\": \"2024-12-14T09:07:27Z\",\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\",\n \"tenantBackupEnabled\": true\n },\n \"replicationFactor\": 3,\n \"replicationSpec\": {\n \"US_EAST_1\": {\n \"analyticsNodes\": 0,\n \"electableNodes\": 3,\n \"priority\": 7,\n \"readOnlyNodes\": 0\n }\n },\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca0\",\n \"numShards\": 1,\n \"regionsConfig\": {\n \"US_EAST_1\": {\n \"analyticsNodes\": 0,\n \"electableNodes\": 3,\n \"priority\": 7,\n \"readOnlyNodes\": 0\n }\n },\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"srvAddress\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 90
+ status: 202
+ text: "{}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 10
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca1\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf94f216ed3746c09fc9f\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 15
+ status: 200
+ duplicate_responses: 8
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca1\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf94f216ed3746c09fc9f\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 24
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca1\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf94f216ed3746c09fc9f\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 25
+ status: 200
+ duplicate_responses: 36
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-13T09:08:07Z\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf977216ed3746c09fcf3\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf977216ed3746c09fcf2\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf977216ed3746c09fcf1\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 62
+ status: 200
+ duplicate_responses: 19
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:08:07Z\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf977216ed3746c09fcf3\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf977216ed3746c09fcf2\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf977216ed3746c09fcf1\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 82
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:08:07Z\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf977216ed3746c09fcf3\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf977216ed3746c09fcf2\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf977216ed3746c09fcf1\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 91
+ status: 200
+ duplicate_responses: 2
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:08:07Z\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf977216ed3746c09fcf3\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf977216ed3746c09fcf2\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf977216ed3746c09fcf1\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"DELETING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 94
+ status: 404
+ duplicate_responses: 1
+ text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: GET
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 11
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskSizeGB\": 5,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca0\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf94f216ed3746c09fc9f\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 83
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:08:07Z\",\n \"diskSizeGB\": 10,\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf977216ed3746c09fcf3\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"675bf977216ed3746c09fce9\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"675bf977216ed3746c09fcf1\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 12
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 13
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/tenantUpgrade
+ method: POST
+ version: '2023-01-01'
+ text: "{\n \"name\": \"{clusterName}\",\n \"providerSettings\": {\n \"instanceSizeName\": \"M10\",\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n}"
+ responses:
+ - response_index: 14
+ status: 200
+ text: "{\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGBEnabled\": false\n },\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-13T09:07:27Z\",\n \"diskSizeGB\": 5,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"675bf94f216ed3746c09fca6\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.4\",\n \"mongoURI\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017\",\n \"mongoURIUpdated\": \"2024-12-13T09:07:43Z\",\n \"mongoURIWithOptions\": \"mongodb://ac-um2obry-shard-00-00.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-01.dsp6h7u.mongodb-dev.net:27017,ac-um2obry-shard-00-02.dsp6h7u.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-9aswzw-shard-0\",\n \"name\": \"{clusterName}\",\n \"numShards\": 1,\n \"paused\": false,\n \"pitEnabled\": false,\n \"providerBackupEnabled\": false,\n \"providerSettings\": {\n \"autoScaling\": {\n \"compute\": {\n \"maxInstanceSize\": null,\n \"minInstanceSize\": null\n }\n },\n \"backingProviderName\": \"AWS\",\n \"effectiveInstanceSizeName\": \"M5\",\n \"instanceSizeName\": \"M5\",\n \"nextBackupDate\": \"2024-12-14T09:07:27Z\",\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\",\n \"tenantBackupEnabled\": true\n },\n \"replicationFactor\": 3,\n \"replicationSpec\": {\n \"US_EAST_1\": {\n \"analyticsNodes\": 0,\n \"electableNodes\": 3,\n \"priority\": 7,\n \"readOnlyNodes\": 0\n }\n },\n \"replicationSpecs\": [\n {\n \"id\": \"675bf94f216ed3746c09fca0\",\n \"numShards\": 1,\n \"regionsConfig\": {\n \"US_EAST_1\": {\n \"analyticsNodes\": 0,\n \"electableNodes\": 3,\n \"priority\": 7,\n \"readOnlyNodes\": 0\n }\n },\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"srvAddress\": \"mongodb+srv://test-acc-tf-c-672759305.dsp6h7u.mongodb-dev.net\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - path: /api/atlas/v2/groups/{groupId}/containers
+ method: GET
+ version: '2023-01-01'
+ text: ""
+ responses:
+ - response_index: 84
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-056e765ca927b9785\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"675bf94c216ed3746c09fc88\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-0cb8137a17095e4f7\"\n }\n ],\n \"totalCount\": 2\n}"
+ - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
+ method: DELETE
+ version: '2023-02-01'
+ text: ""
+ responses:
+ - response_index: 90
+ status: 202
+ text: "{}"
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
similarity index 88%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
index 71905d7b89..0700368579 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
@@ -1,7 +1,7 @@
{
"clusterType": "REPLICASET",
"labels": [],
- "name": "test-acc-tf-c-878317177498266511",
+ "name": "{clusterName}",
"replicationSpecs": [
{
"regionConfigs": [
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/02_01_POST__api_atlas_v2_groups_{groupId}_clusters_tenantUpgrade_2023-01-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade/02_01_POST__api_atlas_v2_groups_{groupId}_clusters_tenantUpgrade_2023-01-01.json
similarity index 71%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/02_01_POST__api_atlas_v2_groups_{groupId}_clusters_tenantUpgrade_2023-01-01.json
rename to internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade/02_01_POST__api_atlas_v2_groups_{groupId}_clusters_tenantUpgrade_2023-01-01.json
index a3ce19b271..acbb57bd94 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/02_01_POST__api_atlas_v2_groups_{groupId}_clusters_tenantUpgrade_2023-01-01.json
+++ b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade/02_01_POST__api_atlas_v2_groups_{groupId}_clusters_tenantUpgrade_2023-01-01.json
@@ -1,5 +1,5 @@
{
- "name": "test-acc-tf-c-878317177498266511",
+ "name": "{clusterName}",
"providerSettings": {
"instanceSizeName": "M10",
"providerName": "AWS",
diff --git a/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade/02_02_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json b/internal/service/advancedclustertpf/testdata/TestAccMockableAdvancedCluster_tenantUpgrade/02_02_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded.yaml b/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded.yaml
deleted file mode 100644
index a3c5b28e53..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded.yaml
+++ /dev/null
@@ -1,216 +0,0 @@
-step_count: 3
-steps:
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"SHARDED\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"SHARDED\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 1
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 6
- - response_index: 8
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 10
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskSizeGB\": 40.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a7\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 11
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0375d5f3c074577a0\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-096b0b372bff6116c\"\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 3
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 13
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 14
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 1
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-08-05'
- text: "{\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
- responses:
- - response_index: 27
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 21
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 28
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 19
- - response_index: 48
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-03.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-03.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 22
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskSizeGB\": 40.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a7\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 50
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-03.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-03.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskSizeGB\": 40.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a7\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 23
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0375d5f3c074577a0\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-096b0b372bff6116c\"\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 1
- - response_index: 51
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": null\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-096b0b372bff6116c\"\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 3
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 25
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 26
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-08-05'
- text: "{\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
- responses:
- - response_index: 27
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 68
- status: 202
- text: '{}'
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 61
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-03.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-03.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 1
- - response_index: 69
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-03.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-03.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a8\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"673cd6d2fb19da739ae2d4aa\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 1000,\n \"diskSizeGB\": 40.0,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"DELETING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 6
- - response_index: 76
- status: 404
- text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 63
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://sharded-multi-replicati-shard-00-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-00-03.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-00.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-01.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-02.jciib.mongodb-dev.net:27016,sharded-multi-replicati-shard-01-03.jciib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://sharded-multi-replicati.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-19T18:20:02Z\",\n \"diskSizeGB\": 40.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673cd6d2fb19da739ae2d4bc\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673cd6d2fb19da739ae2d4a7\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 2000,\n \"ebsVolumeType\": \"PROVISIONED\",\n \"instanceSize\": \"M30\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n }\n ],\n \"zoneId\": \"673cd6d2fb19da739ae2d4a6\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 64
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": null\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-096b0b372bff6116c\"\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 66
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 67
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 68
- status: 202
- text: '{}'
-variables:
- groupId: 664619d870c247237f4b86a6
- clusterName: sharded-multi-replication
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-08-05_manual.json b/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-08-05_manual.json
deleted file mode 100644
index 7506fd4ef6..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_configSharded/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-08-05_manual.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "replicationSpecs": [
- {
- "id": "673cd6d2fb19da739ae2d4a8",
- "regionConfigs": [
- {
- "analyticsSpecs": {
- "diskIOPS": 2000,
- "ebsVolumeType": "PROVISIONED",
- "instanceSize": "M30",
- "nodeCount": 1
- },
- "autoScaling": {
- "compute": {
- "enabled": false,
- "scaleDownEnabled": false
- },
- "diskGB": {
- "enabled": true
- }
- },
- "electableSpecs": {
- "diskIOPS": 2000,
- "diskSizeGB": 40,
- "ebsVolumeType": "PROVISIONED",
- "instanceSize": "M30",
- "nodeCount": 3
- },
- "priority": 7,
- "providerName": "AWS",
- "regionName": "EU_WEST_1"
- }
- ],
- "zoneId": "673cd6d2fb19da739ae2d4a6",
- "zoneName": "ZoneName managed by Terraform"
- },
- {
- "id": "673cd6d2fb19da739ae2d4aa",
- "regionConfigs": [
- {
- "analyticsSpecs": {
- "diskIOPS": 1000,
- "ebsVolumeType": "PROVISIONED",
- "instanceSize": "M30",
- "nodeCount": 1
- },
- "autoScaling": {
- "compute": {
- "enabled": false,
- "scaleDownEnabled": false
- },
- "diskGB": {
- "enabled": true
- }
- },
- "electableSpecs": {
- "diskIOPS": 1000,
- "diskSizeGB": 40,
- "ebsVolumeType": "PROVISIONED",
- "instanceSize": "M30",
- "nodeCount": 3
- },
- "priority": 7,
- "providerName": "AWS",
- "regionName": "EU_WEST_1"
- }
- ],
- "zoneId": "673cd6d2fb19da739ae2d4a6",
- "zoneName": "ZoneName managed by Terraform"
- }
- ]
-}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset.yaml b/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset.yaml
deleted file mode 100644
index 089310b5d0..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset.yaml
+++ /dev/null
@@ -1,431 +0,0 @@
-step_count: 6
-steps:
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 10,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 10,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 1
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 12
- - response_index: 14
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 16
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskSizeGB\": 10.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc6\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 17
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-04f360947fe6956c1\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": null\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 18
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 19
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
-- diff_requests: []
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 25
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 26
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskSizeGB\": 10.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc6\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 27
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-04f360947fe6956c1\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": null\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 28
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 29
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-10-23'
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- responses:
- - response_index: 40
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-10-23'
- text: "{\n \"paused\": true\n}"
- responses:
- - response_index: 47
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": true,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 35
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 41
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 4
- - response_index: 46
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- - response_index: 48
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": true,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"REPAIRING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 3
- - response_index: 52
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": true,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 36
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskSizeGB\": 10.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc6\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 54
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskSizeGB\": 10.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": true,\n \"pitEnabled\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc6\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 37
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-04f360947fe6956c1\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": null\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 38
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- - response_index: 56
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 39
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- - response_index: 57
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-10-23'
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- responses:
- - response_index: 40
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-10-23'
- text: "{\n \"paused\": true\n}"
- responses:
- - response_index: 47
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": true,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-10-23'
- text: "{\n \"paused\": false\n}"
- responses:
- - response_index: 68
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 63
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": true,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- - response_index: 69
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"REPAIRING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 8
- - response_index: 78
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 64
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskSizeGB\": 10.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": true,\n \"pitEnabled\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc6\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- - response_index: 80
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskSizeGB\": 10.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc6\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 65
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-04f360947fe6956c1\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": null\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 66
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 67
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-10-23'
- text: "{\n \"paused\": false\n}"
- responses:
- - response_index: 68
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: PATCH
- version: '2024-08-05'
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"javascriptEnabled\": true\n}"
- responses:
- - response_index: 94
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: PATCH
- version: '2024-08-05'
- text: "{\n \"javascriptEnabled\": true\n}"
- responses:
- - response_index: 94
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 89
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 90
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskSizeGB\": 10.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc6\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 91
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-04f360947fe6956c1\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": null\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 92
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
- - response_index: 95
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 93
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": false,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
- - response_index: 96
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- duplicate_responses: 1
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 105
- status: 202
- text: '{}'
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 99
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 1
- - response_index: 106
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"redactClientLogData\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"DELETING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- duplicate_responses: 6
- - response_index: 113
- status: 404
- text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 101
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": true,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://{clusterName}-shard-00-00.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-01.jciib.mongodb-dev.net:27017,{clusterName}-shard-00-02.jciib.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-h20vfw-shard-0\",\n \"standardSrv\": \"mongodb+srv://{clusterName}.jciib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-20T10:41:51Z\",\n \"diskSizeGB\": 10.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673dbcef6b13675d681b3fcf\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": true,\n \"replicaSetScalingStrategy\": \"NODE_TYPE\",\n \"replicationSpecs\": [\n {\n \"id\": \"673dbcef6b13675d681b3fc6\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673dbcef6b13675d681b3fc5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [\n {\n \"key\": \"env\",\n \"value\": \"{clusterName}\"\n }\n ],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"CONTINUOUS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 102
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.240.0/21\",\n \"id\": \"67345bd9905b8c30c54fd220\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-04f360947fe6956c1\"\n },\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"673cb9d90e17de7b126a6751\",\n \"providerName\": \"AWS\",\n \"provisioned\": false,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": null\n }\n ],\n \"totalCount\": 2\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 103
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": \"available\",\n \"defaultWriteConcern\": \"majority\",\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 104
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": 100,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": \"majority\",\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_0\",\n \"noTableScan\": true,\n \"oplogMinRetentionHours\": 0.0,\n \"oplogSizeMB\": 1000,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": 310,\n \"sampleSizeBIConnector\": 110,\n \"transactionLifetimeLimitSeconds\": 300\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 105
- status: 202
- text: '{}'
-variables:
- groupId: 664619d870c247237f4b86a6
- clusterName: test
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/03_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/03_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
deleted file mode 100644
index 54e0e21edd..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/03_02_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "paused": true
-}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/04_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/04_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
deleted file mode 100644
index 78c40e9687..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/04_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "paused": false
-}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/05_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_processArgs_2024-08-05.json b/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/05_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_processArgs_2024-08-05.json
deleted file mode 100644
index ea39aa862e..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockAdvancedCluster_replicaset/05_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_processArgs_2024-08-05.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "changeStreamOptionsPreAndPostImagesExpireAfterSeconds": 100,
- "javascriptEnabled": true
-}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema.yaml b/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema.yaml
deleted file mode 100644
index cd38497596..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema.yaml
+++ /dev/null
@@ -1,371 +0,0 @@
-step_count: 2
-steps:
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"labels\": [],\n \"mongoDBMajorVersion\": \"8.0\",\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 9
- status: 201
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups
- method: POST
- version: '2023-01-01'
- text: "{\n \"clusterCount\": 0,\n \"created\": \"0001-01-01T00:00:00Z\",\n \"name\": \"test-acc-tf-p-7889034782442569766\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": [],\n \"withDefaultAlertsSettings\": true\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"clusterCount\": 0,\n \"created\": \"2024-11-27T07:49:10Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-7889034782442569766\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
- - path: /api/atlas/v2/groups/{groupId}/settings
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 1
- status: 200
- text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/settings
- method: PATCH
- version: '2023-01-01'
- text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
- responses:
- - response_index: 2
- status: 200
- text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
- - path: /api/atlas/v2/groups/{groupId}
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 3
- status: 200
- text: "{\n \"clusterCount\": 0,\n \"created\": \"2024-11-27T07:49:10Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-7889034782442569766\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
- - response_index: 56
- status: 200
- text: "{\n \"clusterCount\": 1,\n \"created\": \"2024-11-27T07:49:10Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-7889034782442569766\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
- - path: /api/atlas/v2/groups/{groupId}/teams
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 4
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/teams?includeCount=true&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/limits
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 5
- status: 200
- text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
- - response_index: 58
- status: 200
- text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 10,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
- - path: /api/atlas/v2/groups/{groupId}/ipAddresses
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 7
- status: 200
- text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": []\n }\n}"
- - response_index: 60
- status: 200
- text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": [\n {\n \"clusterName\": \"{clusterName}\",\n \"inbound\": [\n \"34.246.188.184\",\n \"52.209.244.62\",\n \"99.80.110.196\",\n \"52.31.136.123\",\n \"48.211.168.65\",\n \"20.14.220.66\",\n \"52.50.165.92\",\n \"54.75.58.195\",\n \"54.75.145.38\",\n \"54.72.45.73\",\n \"48.211.168.194\",\n \"20.14.220.107\",\n \"63.33.141.215\",\n \"52.208.19.70\",\n \"48.211.169.27\"\n ],\n \"outbound\": [\n \"34.246.188.184\",\n \"52.209.244.62\",\n \"99.80.110.196\",\n \"52.31.136.123\",\n \"48.211.168.65\",\n \"20.14.220.66\",\n \"52.50.165.92\",\n \"54.75.58.195\",\n \"54.75.145.38\",\n \"54.72.45.73\",\n \"48.211.168.194\",\n \"20.14.220.107\",\n \"63.33.141.215\",\n \"52.208.19.70\",\n \"48.211.169.27\"\n ]\n }\n ]\n }\n}"
- - path: /api/atlas/v2/groups/{groupId}/managedSlowMs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 8
- status: 200
- text: 'true'
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"labels\": [],\n \"mongoDBMajorVersion\": \"8.0\",\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 9
- status: 201
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 10
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 13
- - response_index: 24
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 8
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 25
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskSizeGB\": 8.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba6\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 4
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 27
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"6746cefbaef48d1cb2658bbc\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-0dd32328690ba0813\"\n }\n ],\n \"totalCount\": 1\n}"
- duplicate_responses: 7
- - response_index: 28
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AZURE&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"azureSubscriptionId\": \"591236d43d098d433845860f\",\n \"id\": \"6746cefbaef48d1cb2658bbb\",\n \"providerName\": \"AZURE\",\n \"provisioned\": true,\n \"region\": \"US_EAST_2\",\n \"vnetName\": \"vnet_6746cefbaef48d1cb2658bbb_ykngkrlx\"\n }\n ],\n \"totalCount\": 1\n}"
- duplicate_responses: 7
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 29
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 6
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 30
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 7
- - response_index: 34
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 32
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskSizeGB\": 8.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba6\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n }\n ],\n \"totalCount\": 1\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 33
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2023-02-01'
- text: "{\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba6\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
- responses:
- - response_index: 92
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskSizeGB\": 8.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba6\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-10-23'
- text: "{\n \"configServerManagementMode\": \"ATLAS_MANAGED\"\n}"
- responses:
- - response_index: 93
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 174
- status: 202
- text: '{}'
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 80
- status: 200
- text: "{\n \"clusterCount\": 1,\n \"created\": \"2024-11-27T07:49:10Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-7889034782442569766\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/teams
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 81
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/teams?includeCount=true&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/limits
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 82
- status: 200
- text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 10,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/settings
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 83
- status: 200
- text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/ipAddresses
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 84
- status: 200
- text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": [\n {\n \"clusterName\": \"{clusterName}\",\n \"inbound\": [\n \"34.246.188.184\",\n \"52.209.244.62\",\n \"99.80.110.196\",\n \"52.31.136.123\",\n \"48.211.168.65\",\n \"20.14.220.66\",\n \"52.50.165.92\",\n \"54.75.58.195\",\n \"54.75.145.38\",\n \"54.72.45.73\",\n \"48.211.168.194\",\n \"20.14.220.107\",\n \"63.33.141.215\",\n \"52.208.19.70\",\n \"48.211.169.27\"\n ],\n \"outbound\": [\n \"34.246.188.184\",\n \"52.209.244.62\",\n \"99.80.110.196\",\n \"52.31.136.123\",\n \"48.211.168.65\",\n \"20.14.220.66\",\n \"52.50.165.92\",\n \"54.75.58.195\",\n \"54.75.145.38\",\n \"54.72.45.73\",\n \"48.211.168.194\",\n \"20.14.220.107\",\n \"63.33.141.215\",\n \"52.208.19.70\",\n \"48.211.169.27\"\n ]\n }\n ]\n }\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/managedSlowMs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 85
- status: 200
- text: 'true'
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 86
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskSizeGB\": 8.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba6\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 119
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskSizeGB\": 8.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba6\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 4
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 87
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 94
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 23
- - response_index: 118
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 9
- - response_index: 175
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"DELETING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 9
- - response_index: 185
- status: 404
- text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 88
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AZURE&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"6746cefbaef48d1cb2658bbc\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-0dd32328690ba0813\"\n }, {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"azureSubscriptionId\": \"591236d43d098d433845860f\",\n \"id\": \"6746cefbaef48d1cb2658bbb\",\n \"providerName\": \"AZURE\",\n \"provisioned\": true,\n \"region\": \"US_EAST_2\",\n \"vnetName\": \"vnet_6746cefbaef48d1cb2658bbb_ykngkrlx\"\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 8
- - response_index: 89
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AZURE&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"6746cefbaef48d1cb2658bbc\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-0dd32328690ba0813\"\n }, {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"azureSubscriptionId\": \"591236d43d098d433845860f\",\n \"id\": \"6746cefbaef48d1cb2658bbb\",\n \"providerName\": \"AZURE\",\n \"provisioned\": true,\n \"region\": \"US_EAST_2\",\n \"vnetName\": \"vnet_6746cefbaef48d1cb2658bbb_ykngkrlx\"\n }\n ],\n \"totalCount\": 2\n}"
- duplicate_responses: 8
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 90
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 8
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 91
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 8
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2023-02-01'
- text: "{\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba6\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
- responses:
- - response_index: 92
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"FIXED_TO_DEDICATED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskSizeGB\": 8.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba6\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2024-10-23'
- text: "{\n \"configServerManagementMode\": \"ATLAS_MANAGED\"\n}"
- responses:
- - response_index: 93
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba7\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746cefbaef48d1cb2658ba9\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 8.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskSizeGB\": 8.0,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 125
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-602510307-shard-00-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-00-05.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-00.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-01.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-02.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-03.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-04.d2nwr.mongodb-dev.net:27016,test-acc-tf-c-602510307-shard-01-05.d2nwr.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-602510307.d2nwr.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:15Z\",\n \"diskSizeGB\": 8.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746cefbaef48d1cb2658bbd\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cefbaef48d1cb2658ba6\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M20\",\n \"nodeCount\": 1\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"EU_WEST_1\"\n },\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M20\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 2\n },\n \"priority\": 6,\n \"providerName\": \"AZURE\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3500,\n \"diskThroughput\": 125,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_2\"\n }\n ],\n \"zoneId\": \"6746cefbaef48d1cb2658ba5\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n }\n ],\n \"totalCount\": 1\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 174
- status: 202
- text: '{}'
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 186
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
- - response_index: 188
- status: 404
- text: "{\n \"detail\": \"No group with ID {groupId} exists.\",\n \"error\": 404,\n \"errorCode\": \"GROUP_NOT_FOUND\",\n \"parameters\": [\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}
- method: DELETE
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 187
- status: 202
- text: '{}'
-variables:
- groupId: 6746cef5aef48d1cb2658a7f
- clusterName: test-acc-tf-c-6025103075771235151
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01_manual.json b/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01_manual.json
deleted file mode 100644
index 356cf5676b..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchema/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01_manual.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "replicationSpecs": [
- {
- "id": "6746cefbaef48d1cb2658ba6",
- "numShards": 2,
- "regionConfigs": [
- {
- "analyticsSpecs": {
- "diskIOPS": 3000,
- "ebsVolumeType": "STANDARD",
- "instanceSize": "M20",
- "nodeCount": 1
- },
- "autoScaling": {
- "compute": {
- "enabled": false,
- "scaleDownEnabled": false
- },
- "diskGB": {
- "enabled": false
- }
- },
- "electableSpecs": {
- "diskIOPS": 3000,
- "ebsVolumeType": "STANDARD",
- "instanceSize": "M10",
- "nodeCount": 3
- },
- "priority": 7,
- "providerName": "AWS",
- "regionName": "EU_WEST_1"
- },
- {
- "autoScaling": {
- "compute": {
- "enabled": false,
- "scaleDownEnabled": false
- },
- "diskGB": {
- "enabled": false
- }
- },
- "electableSpecs": {
- "diskIOPS": 3500,
- "instanceSize": "M10",
- "nodeCount": 2
- },
- "priority": 6,
- "providerName": "AZURE",
- "regionName": "US_EAST_2"
- }
- ],
- "zoneName": "ZoneName managed by Terraform"
- }
- ]
-}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel.yaml b/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel.yaml
deleted file mode 100644
index 52c3812567..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel.yaml
+++ /dev/null
@@ -1,318 +0,0 @@
-step_count: 2
-steps:
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"SHARDED\",\n \"labels\": [],\n \"mongoDBMajorVersion\": \"7.0\",\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 9
- status: 201
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589eb\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746ceeeaef48d1cb26589ed\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups
- method: POST
- version: '2023-01-01'
- text: "{\n \"clusterCount\": 0,\n \"created\": \"0001-01-01T00:00:00Z\",\n \"name\": \"test-acc-tf-p-4311574251574843475\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": [],\n \"withDefaultAlertsSettings\": true\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"clusterCount\": 0,\n \"created\": \"2024-11-27T07:48:58Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-4311574251574843475\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
- - path: /api/atlas/v2/groups/{groupId}/settings
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 1
- status: 200
- text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/settings
- method: PATCH
- version: '2023-01-01'
- text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
- responses:
- - response_index: 2
- status: 200
- text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
- - path: /api/atlas/v2/groups/{groupId}
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 3
- status: 200
- text: "{\n \"clusterCount\": 0,\n \"created\": \"2024-11-27T07:48:58Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-4311574251574843475\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
- - response_index: 40
- status: 200
- text: "{\n \"clusterCount\": 1,\n \"created\": \"2024-11-27T07:48:58Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-4311574251574843475\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
- - path: /api/atlas/v2/groups/{groupId}/teams
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 4
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/teams?includeCount=true&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/limits
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 5
- status: 200
- text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
- - response_index: 42
- status: 200
- text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
- - path: /api/atlas/v2/groups/{groupId}/ipAddresses
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 7
- status: 200
- text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": []\n }\n}"
- - response_index: 44
- status: 200
- text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": [\n {\n \"clusterName\": \"{clusterName}\",\n \"inbound\": [\n \"3.231.192.60\",\n \"54.174.182.121\",\n \"54.162.241.21\",\n \"35.168.217.111\",\n \"34.206.28.101\",\n \"54.175.35.15\",\n \"54.144.51.160\",\n \"98.84.253.100\",\n \"54.221.230.85\"\n ],\n \"outbound\": [\n \"3.231.192.60\",\n \"54.174.182.121\",\n \"54.162.241.21\",\n \"35.168.217.111\",\n \"34.206.28.101\",\n \"54.175.35.15\",\n \"54.144.51.160\",\n \"98.84.253.100\",\n \"54.221.230.85\"\n ]\n }\n ]\n }\n}"
- - path: /api/atlas/v2/groups/{groupId}/managedSlowMs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 8
- status: 200
- text: 'true'
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"SHARDED\",\n \"labels\": [],\n \"mongoDBMajorVersion\": \"7.0\",\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskSizeGB\": 50,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 9
- status: 201
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589eb\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746ceeeaef48d1cb26589ed\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 10
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": []\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589eb\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746ceeeaef48d1cb26589ed\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 12
- - response_index: 23
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589eb\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746ceeeaef48d1cb26589ed\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 6
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 24
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskSizeGB\": 50.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589ea\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 4
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 26
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"6746ceeeaef48d1cb2658a15\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0740d97a9534f73e5\"\n }\n ],\n \"totalCount\": 1\n}"
- duplicate_responses: 4
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 27
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 4
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 28
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 4
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2023-02-01'
- text: "{\n \"diskSizeGB\": 55,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589ea\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
- responses:
- - response_index: 67
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskSizeGB\": 55.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589ea\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 108
- status: 202
- text: '{}'
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 56
- status: 200
- text: "{\n \"clusterCount\": 1,\n \"created\": \"2024-11-27T07:48:58Z\",\n \"id\": \"{groupId}\",\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers\",\n \"rel\": \"https://cloud.mongodb.com/containers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters\",\n \"rel\": \"https://cloud.mongodb.com/clusters\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers\",\n \"rel\": \"https://cloud.mongodb.com/databaseUsers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/peers\",\n \"rel\": \"https://cloud.mongodb.com/peers\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/processes\",\n \"rel\": \"https://cloud.mongodb.com/processes\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/whitelist\",\n \"rel\": \"https://cloud.mongodb.com/whitelist\"\n }\n ],\n \"name\": \"test-acc-tf-p-4311574251574843475\",\n \"orgId\": \"65def6ce0f722a1507105aa5\",\n \"tags\": []\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/teams
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 57
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/teams?includeCount=true&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/limits
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 58
- status: 200
- text: "[\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 900,\n \"name\": \"atlas.project.security.databaseAccess.users\",\n \"value\": 100\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 25,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.clusters\",\n \"value\": 25\n },\n {\n \"currentUsage\": 1,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.serverlessMTMs\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 1400,\n \"name\": \"atlas.project.security.databaseAccess.customRoles\",\n \"value\": 100\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 200,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.entries\",\n \"value\": 200\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 40,\n \"maximumLimit\": 220,\n \"name\": \"atlas.project.security.networkAccess.crossRegionEntries\",\n \"value\": 40\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 50,\n \"maximumLimit\": 90,\n \"name\": \"atlas.project.deployment.nodesPerPrivateLinkRegion\",\n \"value\": 50\n },\n {\n \"defaultLimit\": 50,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsPerRegionGroup\",\n \"value\": 6\n },\n {\n \"defaultLimit\": 27,\n \"maximumLimit\": 27,\n \"name\": \"atlas.project.deployment.privateServiceConnectionsSubnetMask\",\n \"value\": 27\n },\n {\n \"currentUsage\": 0,\n \"defaultLimit\": 100,\n \"maximumLimit\": 100,\n \"name\": \"atlas.project.deployment.salesSoldM0s\",\n \"value\": 100\n }\n]"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/settings
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 59
- status: 200
- text: "{\n \"isCollectDatabaseSpecificsStatisticsEnabled\": true,\n \"isDataExplorerEnabled\": true,\n \"isExtendedStorageSizesEnabled\": false,\n \"isPerformanceAdvisorEnabled\": true,\n \"isRealtimePerformancePanelEnabled\": true,\n \"isSchemaAdvisorEnabled\": true\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/ipAddresses
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 60
- status: 200
- text: "{\n \"groupId\": \"{groupId}\",\n \"services\": {\n \"clusters\": [\n {\n \"clusterName\": \"{clusterName}\",\n \"inbound\": [\n \"3.231.192.60\",\n \"54.174.182.121\",\n \"54.162.241.21\",\n \"35.168.217.111\",\n \"34.206.28.101\",\n \"54.175.35.15\",\n \"54.144.51.160\",\n \"98.84.253.100\",\n \"54.221.230.85\"\n ],\n \"outbound\": [\n \"3.231.192.60\",\n \"54.174.182.121\",\n \"54.162.241.21\",\n \"35.168.217.111\",\n \"34.206.28.101\",\n \"54.175.35.15\",\n \"54.144.51.160\",\n \"98.84.253.100\",\n \"54.221.230.85\"\n ]\n }\n ]\n }\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/managedSlowMs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 61
- status: 200
- text: 'true'
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 62
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskSizeGB\": 50.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589ea\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 76
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskSizeGB\": 55.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589ea\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 4
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 63
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589eb\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746ceeeaef48d1cb26589ed\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 50.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 68
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589eb\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746ceeeaef48d1cb26589ed\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 6
- - response_index: 75
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589eb\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746ceeeaef48d1cb26589ed\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 6
- - response_index: 109
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"7.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589eb\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n },\n {\n \"id\": \"6746ceeeaef48d1cb26589ed\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 55.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"DELETING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 6
- - response_index: 116
- status: 404
- text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 64
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"6746ceeeaef48d1cb2658a15\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0740d97a9534f73e5\"\n }\n ],\n \"totalCount\": 1\n}"
- duplicate_responses: 5
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 65
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 5
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 66
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": null,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 5
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: PATCH
- version: '2023-02-01'
- text: "{\n \"diskSizeGB\": 55,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589ea\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
- responses:
- - response_index: 67
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"SHARDED\",\n \"configServerManagementMode\": \"ATLAS_MANAGED\",\n \"configServerType\": \"DEDICATED\",\n \"connectionStrings\": {\n \"awsPrivateLinkSrv\": {},\n \"privateEndpoint\": [],\n \"standard\": \"mongodb://test-acc-tf-c-461133128-shard-00-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-00-02.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-00.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-01.7r2ib.mongodb-dev.net:27016,test-acc-tf-c-461133128-shard-01-02.7r2ib.mongodb-dev.net:27016/?ssl=true&authSource=admin\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-461133128.7r2ib.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:02Z\",\n \"diskSizeGB\": 55.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"6746ceeeaef48d1cb2658a1a\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"7.0\",\n \"mongoDBVersion\": \"7.0.15\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746ceeeaef48d1cb26589ea\",\n \"numShards\": 2,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": false\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746ceeeaef48d1cb26589e9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 108
- status: 202
- text: '{}'
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 117
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
- - response_index: 119
- status: 404
- text: "{\n \"detail\": \"No group with ID {groupId} exists.\",\n \"error\": 404,\n \"errorCode\": \"GROUP_NOT_FOUND\",\n \"parameters\": [\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}
- method: DELETE
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 118
- status: 202
- text: '{}'
-variables:
- groupId: 6746cee8aef48d1cb265882d
- clusterName: test-acc-tf-c-4611331288451668238
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
deleted file mode 100644
index 0a396b72b3..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "clusterType": "SHARDED",
- "labels": [],
- "mongoDBMajorVersion": "7.0",
- "name": "6746cee8aef48d1cb265882d",
- "replicationSpecs": [
- {
- "regionConfigs": [
- {
- "analyticsSpecs": {
- "diskSizeGB": 50,
- "instanceSize": "M10",
- "nodeCount": 0
- },
- "electableSpecs": {
- "diskSizeGB": 50,
- "instanceSize": "M10",
- "nodeCount": 3
- },
- "priority": 7,
- "providerName": "AWS",
- "regionName": "US_EAST_1"
- }
- ],
- "zoneName": "ZoneName managed by Terraform"
- },
- {
- "regionConfigs": [
- {
- "analyticsSpecs": {
- "diskSizeGB": 50,
- "instanceSize": "M10",
- "nodeCount": 0
- },
- "electableSpecs": {
- "diskSizeGB": 50,
- "instanceSize": "M10",
- "nodeCount": 3
- },
- "priority": 7,
- "providerName": "AWS",
- "regionName": "US_EAST_1"
- }
- ],
- "zoneName": "ZoneName managed by Terraform"
- }
- ],
- "tags": []
-}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01_manual.json b/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01_manual.json
deleted file mode 100644
index a3f212eb22..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedClusterConfig_symmetricShardedOldSchemaDiskSizeGBAtElectableLevel/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01_manual.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "diskSizeGB": 55,
- "replicationSpecs": [
- {
- "id": "6746ceeeaef48d1cb26589ea",
- "numShards": 2,
- "regionConfigs": [
- {
- "analyticsSpecs": {
- "instanceSize": "M10",
- "nodeCount": 0
- },
- "autoScaling": {
- "compute": {
- "enabled": false,
- "scaleDownEnabled": false
- },
- "diskGB": {
- "enabled": false
- }
- },
- "electableSpecs": {
- "diskIOPS": 3000,
- "ebsVolumeType": "STANDARD",
- "instanceSize": "M10",
- "nodeCount": 3
- },
- "priority": 7,
- "providerName": "AWS",
- "regionName": "US_EAST_1"
- }
- ],
- "zoneName": "ZoneName managed by Terraform"
- }
- ]
-}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant.yaml b/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant.yaml
deleted file mode 100644
index 2f2d65840b..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant.yaml
+++ /dev/null
@@ -1,286 +0,0 @@
-step_count: 3
-steps:
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\",\n \"nodeCount\": 0\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e424\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\",\n \"nodeCount\": 0\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e424\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 1
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-uuhgbda-shard-00-00.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-01.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-02.jadffef.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-o3cq7y-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-917712141.jadffef.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e424\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 8
- - response_index: 34
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 3
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-uuhgbda-shard-00-00.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-01.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-02.jadffef.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-o3cq7y-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-917712141.jadffef.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e423\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 3
- - response_index: 16
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-uuhgbda-shard-00-00.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-01.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-02.jadffef.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-o3cq7y-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-917712141.jadffef.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e423\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n }\n ],\n \"totalCount\": 1\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 4
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 7
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 5
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 6
- - response_index: 33
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-uuhgbda-shard-00-00.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-01.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-02.jadffef.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-o3cq7y-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-917712141.jadffef.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e424\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 6
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-uuhgbda-shard-00-00.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-01.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-02.jadffef.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-o3cq7y-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-917712141.jadffef.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e423\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n }\n ],\n \"totalCount\": 1\n}"
- duplicate_responses: 1
- - response_index: 15
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-uuhgbda-shard-00-00.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-01.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-02.jadffef.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-o3cq7y-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-917712141.jadffef.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e423\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 39
- status: 202
- text: '{}'
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName2}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\",\n \"nodeCount\": 0\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 41
- status: 201
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b3\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 35
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-uuhgbda-shard-00-00.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-01.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-02.jadffef.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-o3cq7y-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-917712141.jadffef.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e424\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 40
- status: 404
- text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 36
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-uuhgbda-shard-00-00.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-01.jadffef.mongodb-dev.net:27017,ac-uuhgbda-shard-00-02.jadffef.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-o3cq7y-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-917712141.jadffef.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T07:56:25Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee7a92d375c3a36e8e429\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee7a92d375c3a36e8e423\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee7a92d375c3a36e8e422\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 37
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 38
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 39
- status: 202
- text: '{}'
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName2}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\",\n \"nodeCount\": 0\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 41
- status: 201
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b3\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 42
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-guyvosp-shard-00-00.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-01.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-02.qnrmzgh.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12rjya-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-804993041.qnrmzgh.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b3\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 8
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 44
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-guyvosp-shard-00-00.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-01.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-02.qnrmzgh.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12rjya-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-804993041.qnrmzgh.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b2\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 3
- - response_index: 69
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-guyvosp-shard-00-00.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-01.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-02.qnrmzgh.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12rjya-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-804993041.qnrmzgh.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b2\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n }\n ],\n \"totalCount\": 1\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 45
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 6
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 46
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 7
- - response_index: 49
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-guyvosp-shard-00-00.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-01.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-02.qnrmzgh.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12rjya-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-804993041.qnrmzgh.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b3\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 47
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-guyvosp-shard-00-00.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-01.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-02.qnrmzgh.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12rjya-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-804993041.qnrmzgh.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b2\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n }\n ],\n \"totalCount\": 1\n}"
- duplicate_responses: 1
- - response_index: 68
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-guyvosp-shard-00-00.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-01.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-02.qnrmzgh.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12rjya-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-804993041.qnrmzgh.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b2\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 50
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 89
- status: 202
- text: '{}'
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 76
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-guyvosp-shard-00-00.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-01.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-02.qnrmzgh.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12rjya-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-804993041.qnrmzgh.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b3\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 3
- - response_index: 90
- status: 404
- text: "{\n \"detail\": \"No cluster named {clusterName2} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName2}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 78
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-guyvosp-shard-00-00.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-01.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-02.qnrmzgh.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12rjya-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-804993041.qnrmzgh.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b2\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 79
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 80
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 81
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-guyvosp-shard-00-00.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-01.qnrmzgh.mongodb-dev.net:27017,ac-guyvosp-shard-00-02.qnrmzgh.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12rjya-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-804993041.qnrmzgh.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-21T08:00:44Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"673ee8ac2d375c3a36e8e4b9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName2}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName2}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"673ee8ac2d375c3a36e8e4b2\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"673ee8ac2d375c3a36e8e4b1\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n }\n ],\n \"totalCount\": 1\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName2}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 89
- status: 202
- text: '{}'
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 91
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/?pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [],\n \"totalCount\": 0\n}"
- duplicate_responses: 1
-variables:
- groupId: 664619d870c247237f4b86a6
- clusterName: test-acc-tf-c-91771214182147246
- clusterName2: test-acc-tf-c-8049930413007488732
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json b/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
deleted file mode 100644
index dbc668f294..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "clusterType": "REPLICASET",
- "labels": [],
- "name": "test-acc-tf-c-8049930413007488732",
- "replicationSpecs": [
- {
- "regionConfigs": [
- {
- "backingProviderName": "AWS",
- "electableSpecs": {
- "instanceSize": "M5",
- "nodeCount": 0
- },
- "priority": 7,
- "providerName": "TENANT",
- "regionName": "US_EAST_1"
- }
- ],
- "zoneName": "ZoneName managed by Terraform"
- }
- ],
- "tags": []
-}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json b/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json
deleted file mode 100644
index ca09d36805..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_basicTenant/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23_manual.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "clusterType": "REPLICASET",
- "labels": [],
- "name": "test-acc-tf-c-8049930413007488732",
- "replicationSpecs": [
- {
- "regionConfigs": [
- {
- "backingProviderName": "AWS",
- "electableSpecs": {
- "instanceSize": "M5"
- },
- "priority": 7,
- "providerName": "TENANT",
- "regionName": "US_EAST_1"
- }
- ],
- "zoneName": "ZoneName managed by Terraform"
- }
- ],
- "tags": []
-}
\ No newline at end of file
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade.yaml b/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade.yaml
deleted file mode 100644
index 39fd92c8c8..0000000000
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade.yaml
+++ /dev/null
@@ -1,186 +0,0 @@
-step_count: 2
-steps:
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\",\n \"nodeCount\": 0\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b42\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f37c288864967c85f6b40\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: POST
- version: '2024-10-23'
- text: "{\n \"clusterType\": \"REPLICASET\",\n \"labels\": [],\n \"name\": \"{clusterName}\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\",\n \"nodeCount\": 0\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"tags\": []\n}"
- responses:
- - response_index: 0
- status: 201
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b42\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f37c288864967c85f6b40\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 1
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b42\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f37c288864967c85f6b40\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 8
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 3
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b41\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f37c288864967c85f6b40\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 4
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 4
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 6
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 5
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 7
- - response_index: 8
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b42\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f37c288864967c85f6b40\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 6
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b41\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f37c288864967c85f6b40\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n }\n ],\n \"totalCount\": 1\n}"
- duplicate_responses: 2
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 9
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
-- diff_requests:
- - path: /api/atlas/v2/groups/{groupId}/clusters/tenantUpgrade
- method: POST
- version: '2023-01-01'
- text: "{\n \"name\": \"{clusterName}\",\n \"providerSettings\": {\n \"instanceSizeName\": \"M10\",\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n}"
- responses:
- - response_index: 39
- status: 200
- text: "{\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGBEnabled\": false\n },\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"mongoURI\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017\",\n \"mongoURIUpdated\": \"2024-12-03T16:54:43Z\",\n \"mongoURIWithOptions\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"name\": \"{clusterName}\",\n \"numShards\": 1,\n \"paused\": false,\n \"pitEnabled\": false,\n \"providerBackupEnabled\": false,\n \"providerSettings\": {\n \"autoScaling\": {\n \"compute\": {\n \"maxInstanceSize\": null,\n \"minInstanceSize\": null\n }\n },\n \"backingProviderName\": \"AWS\",\n \"effectiveInstanceSizeName\": \"M5\",\n \"instanceSizeName\": \"M5\",\n \"nextBackupDate\": \"2024-12-04T16:54:26Z\",\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\",\n \"tenantBackupEnabled\": true\n },\n \"replicationFactor\": 3,\n \"replicationSpec\": {\n \"US_EAST_1\": {\n \"analyticsNodes\": 0,\n \"electableNodes\": 3,\n \"priority\": 7,\n \"readOnlyNodes\": 0\n }\n },\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b41\",\n \"numShards\": 1,\n \"regionsConfig\": {\n \"US_EAST_1\": {\n \"analyticsNodes\": 0,\n \"electableNodes\": 3,\n \"priority\": 7,\n \"readOnlyNodes\": 0\n }\n },\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"srvAddress\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 76
- status: 202
- text: '{}'
- request_responses:
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 35
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b42\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5.0,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f37c288864967c85f6b40\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 40
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-12-03T16:57:44Z\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f388843ca6e2ab9803e84\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f388843ca6e2ab9803e83\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f388843ca6e2ab9803e82\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 26
- - response_index: 67
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:57:44Z\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f388843ca6e2ab9803e84\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f388843ca6e2ab9803e83\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f388843ca6e2ab9803e82\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 1
- - response_index: 69
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:57:44Z\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f388843ca6e2ab9803e84\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f388843ca6e2ab9803e83\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f388843ca6e2ab9803e82\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 2
- - response_index: 77
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:57:44Z\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f388843ca6e2ab9803e84\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f388843ca6e2ab9803e83\",\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"diskSizeGB\": 10.0,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f388843ca6e2ab9803e82\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"DELETING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- duplicate_responses: 6
- - response_index: 84
- status: 404
- text: "{\n \"detail\": \"No cluster named {clusterName} exists in group {groupId}.\",\n \"error\": 404,\n \"errorCode\": \"CLUSTER_NOT_FOUND\",\n \"parameters\": [\n \"{clusterName}\",\n \"{groupId}\"\n ],\n \"reason\": \"Not Found\"\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: GET
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 36
- status: 200
- text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b41\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f37c288864967c85f6b40\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - response_index: 71
- status: 200
- text: "{\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:57:44Z\",\n \"diskSizeGB\": 10.0,\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f388843ca6e2ab9803e84\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"674f388843ca6e2ab9803e79\",\n \"numShards\": 1,\n \"regionConfigs\": [\n {\n \"analyticsSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGB\": {\n \"enabled\": true\n }\n },\n \"electableSpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 3\n },\n \"priority\": 7,\n \"providerName\": \"AWS\",\n \"readOnlySpecs\": {\n \"diskIOPS\": 3000,\n \"ebsVolumeType\": \"STANDARD\",\n \"instanceSize\": \"M10\",\n \"nodeCount\": 0\n },\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"674f388843ca6e2ab9803e82\",\n \"zoneName\": \"Zone 1\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 37
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultReadConcern\": null,\n \"defaultWriteConcern\": null,\n \"failIndexKeyTooLong\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs
- method: GET
- version: '2024-08-05'
- text: ''
- responses:
- - response_index: 38
- status: 200
- text: "{\n \"changeStreamOptionsPreAndPostImagesExpireAfterSeconds\": null,\n \"chunkMigrationConcurrency\": null,\n \"customOpensslCipherConfigTls12\": [],\n \"defaultMaxTimeMS\": null,\n \"defaultWriteConcern\": null,\n \"javascriptEnabled\": true,\n \"minimumEnabledTlsProtocol\": \"TLS1_2\",\n \"noTableScan\": false,\n \"oplogMinRetentionHours\": null,\n \"oplogSizeMB\": null,\n \"queryStatsLogVerbosity\": 1,\n \"sampleRefreshIntervalBIConnector\": null,\n \"sampleSizeBIConnector\": null,\n \"tlsCipherConfigMode\": \"DEFAULT\",\n \"transactionLifetimeLimitSeconds\": null\n}"
- duplicate_responses: 1
- - path: /api/atlas/v2/groups/{groupId}/clusters/tenantUpgrade
- method: POST
- version: '2023-01-01'
- text: "{\n \"name\": \"{clusterName}\",\n \"providerSettings\": {\n \"instanceSizeName\": \"M10\",\n \"providerName\": \"AWS\",\n \"regionName\": \"US_EAST_1\"\n }\n}"
- responses:
- - response_index: 39
- status: 200
- text: "{\n \"autoScaling\": {\n \"compute\": {\n \"enabled\": false,\n \"scaleDownEnabled\": false\n },\n \"diskGBEnabled\": false\n },\n \"backupEnabled\": false,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\"\n },\n \"createDate\": \"2024-12-03T16:54:26Z\",\n \"diskSizeGB\": 5.0,\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId}\",\n \"id\": \"674f37c288864967c85f6b47\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"mongoURI\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017\",\n \"mongoURIUpdated\": \"2024-12-03T16:54:43Z\",\n \"mongoURIWithOptions\": \"mongodb://ac-ks9snsv-shard-00-00.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-01.jsgqjpo.mongodb-dev.net:27017,ac-ks9snsv-shard-00-02.jsgqjpo.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-bm8qep-shard-0\",\n \"name\": \"{clusterName}\",\n \"numShards\": 1,\n \"paused\": false,\n \"pitEnabled\": false,\n \"providerBackupEnabled\": false,\n \"providerSettings\": {\n \"autoScaling\": {\n \"compute\": {\n \"maxInstanceSize\": null,\n \"minInstanceSize\": null\n }\n },\n \"backingProviderName\": \"AWS\",\n \"effectiveInstanceSizeName\": \"M5\",\n \"instanceSizeName\": \"M5\",\n \"nextBackupDate\": \"2024-12-04T16:54:26Z\",\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\",\n \"tenantBackupEnabled\": true\n },\n \"replicationFactor\": 3,\n \"replicationSpec\": {\n \"US_EAST_1\": {\n \"analyticsNodes\": 0,\n \"electableNodes\": 3,\n \"priority\": 7,\n \"readOnlyNodes\": 0\n }\n },\n \"replicationSpecs\": [\n {\n \"id\": \"674f37c288864967c85f6b41\",\n \"numShards\": 1,\n \"regionsConfig\": {\n \"US_EAST_1\": {\n \"analyticsNodes\": 0,\n \"electableNodes\": 3,\n \"priority\": 7,\n \"readOnlyNodes\": 0\n }\n },\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"srvAddress\": \"mongodb+srv://test-acc-tf-c-878317177.jsgqjpo.mongodb-dev.net\",\n \"stateName\": \"UPDATING\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
- - path: /api/atlas/v2/groups/{groupId}/containers
- method: GET
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 72
- status: 200
- text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId}/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"674f388843ca6e2ab9803e89\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"US_EAST_1\",\n \"vpcId\": \"vpc-0a59ad5152645bea7\"\n }\n ],\n \"totalCount\": 1\n}"
- - path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
- method: DELETE
- version: '2023-02-01'
- text: ''
- responses:
- - response_index: 76
- status: 202
- text: '{}'
- - path: /api/atlas/v2/groups/{groupId}
- method: DELETE
- version: '2023-01-01'
- text: ''
- responses:
- - response_index: 86
- status: 202
- text: '{}'
-variables:
- groupId: 674f37b888864967c85f6ad7
- clusterName: test-acc-tf-c-878317177498266511
diff --git a/internal/service/advancedclustertpf/validate_schema.go b/internal/service/advancedclustertpf/validate_schema.go
index 71cf4abdd7..d1ce698dbd 100644
--- a/internal/service/advancedclustertpf/validate_schema.go
+++ b/internal/service/advancedclustertpf/validate_schema.go
@@ -7,6 +7,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
+ "github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
)
@@ -82,3 +83,25 @@ func performValidation(ctx context.Context, state *tfsdk.State, plan *tfsdk.Plan
diags.AddError(fmt.Sprintf("`%s` %s", validationPath, v.Description(ctx)), "")
}
}
+
+type RegionSpecPriorityOrderDecreasingValidator struct{}
+
+func (v RegionSpecPriorityOrderDecreasingValidator) Description(ctx context.Context) string {
+ return v.MarkdownDescription(ctx)
+}
+func (v RegionSpecPriorityOrderDecreasingValidator) MarkdownDescription(_ context.Context) string {
+ return "must be a list with priority in descending order"
+}
+func (v RegionSpecPriorityOrderDecreasingValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse) {
+ diags := &resp.Diagnostics
+ regionConfigs := newCloudRegionConfig20240805(ctx, req.ConfigValue, diags)
+ if diags.HasError() {
+ return
+ }
+ configs := *regionConfigs
+ for i := range len(configs) - 1 {
+ if configs[i].GetPriority() < configs[i+1].GetPriority() {
+ diags.AddError(errorRegionPriorities, fmt.Sprintf("priority value at index %d is %d and priority value at index %d is %d", i, configs[i].GetPriority(), i+1, configs[i+1].GetPriority()))
+ }
+ }
+}
diff --git a/internal/service/alertconfiguration/data_source_alert_configuration.go b/internal/service/alertconfiguration/data_source_alert_configuration.go
index 4a9e812c6c..a06ae67a2c 100644
--- a/internal/service/alertconfiguration/data_source_alert_configuration.go
+++ b/internal/service/alertconfiguration/data_source_alert_configuration.go
@@ -335,7 +335,7 @@ func outputAlertConfigurationResourceHcl(label string, alert *admin.GroupAlertsC
}
notifications := alert.GetNotifications()
- for i := 0; i < len(notifications); i++ {
+ for i := range len(notifications) {
appendBlockWithCtyValues(resource, "notification", []string{}, convertNotificationToCtyValues(¬ifications[i]))
}
diff --git a/internal/service/alertconfiguration/model_alert_configuration.go b/internal/service/alertconfiguration/model_alert_configuration.go
index 311310a0d1..5c8f3930a1 100644
--- a/internal/service/alertconfiguration/model_alert_configuration.go
+++ b/internal/service/alertconfiguration/model_alert_configuration.go
@@ -311,7 +311,7 @@ func NewTFAlertConfigurationDSModelList(alerts []admin.GroupAlertsConfig, projec
results := make([]TFAlertConfigurationDSModel, len(alerts))
- for i := 0; i < len(alerts); i++ {
+ for i := range len(alerts) {
alert := alerts[i]
label := fmt.Sprintf("%s_%d", *alert.EventTypeName, i)
resultAlertConfigModel := NewTfAlertConfigurationDSModel(&alerts[i], projectID)
diff --git a/internal/service/cloudprovideraccess/resource_cloud_provider_access_authorization.go b/internal/service/cloudprovideraccess/resource_cloud_provider_access_authorization.go
index 7f06839e49..713e2e579c 100644
--- a/internal/service/cloudprovideraccess/resource_cloud_provider_access_authorization.go
+++ b/internal/service/cloudprovideraccess/resource_cloud_provider_access_authorization.go
@@ -284,7 +284,7 @@ func authorizeRole(ctx context.Context, client *admin.APIClient, d *schema.Resou
var role *admin.CloudProviderAccessRole
var err error
- for i := 0; i < 3; i++ {
+ for range 3 {
role, _, err = client.CloudProviderAccessApi.AuthorizeCloudProviderAccessRole(ctx, projectID, roleID, req).Execute()
if err != nil && strings.Contains(err.Error(), "CANNOT_ASSUME_ROLE") { // aws takes time to update , in case of single path
log.Printf("warning issue performing authorize: %s \n", err.Error())
diff --git a/internal/service/cluster/data_source_cluster.go b/internal/service/cluster/data_source_cluster.go
index 6f92f4101d..505b671791 100644
--- a/internal/service/cluster/data_source_cluster.go
+++ b/internal/service/cluster/data_source_cluster.go
@@ -5,11 +5,13 @@ import (
"fmt"
"net/http"
+ matlas "go.mongodb.org/atlas/mongodbatlas"
+
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
- matlas "go.mongodb.org/atlas/mongodbatlas"
)
func DataSource() *schema.Resource {
@@ -342,6 +344,7 @@ func DataSource() *schema.Resource {
func dataSourceRead(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics {
conn := meta.(*config.MongoDBClient).Atlas
connV2 := meta.(*config.MongoDBClient).AtlasV2
+ connV220240530 := meta.(*config.MongoDBClient).AtlasV220240530
projectID := d.Get("project_id").(string)
clusterName := d.Get("name").(string)
@@ -484,12 +487,16 @@ func dataSourceRead(ctx context.Context, d *schema.ResourceData, meta any) diag.
/*
Get the advaced configuration options and set up to the terraform state
*/
- processArgs, _, err := conn.Clusters.GetProcessArgs(ctx, projectID, clusterName)
+ processArgs20240530, _, err := connV220240530.ClustersApi.GetClusterAdvancedConfiguration(ctx, projectID, clusterName).Execute()
+ if err != nil {
+ return diag.FromErr(fmt.Errorf(advancedcluster.ErrorAdvancedConfRead, advancedcluster.V20240530, clusterName, err))
+ }
+ processArgs, _, err := connV2.ClustersApi.GetClusterAdvancedConfiguration(ctx, projectID, clusterName).Execute()
if err != nil {
- return diag.FromErr(fmt.Errorf(advancedcluster.ErrorAdvancedConfRead, clusterName, err))
+ return diag.FromErr(fmt.Errorf(advancedcluster.ErrorAdvancedConfRead, "", clusterName, err))
}
- if err := d.Set("advanced_configuration", flattenProcessArgs(processArgs)); err != nil {
+ if err := d.Set("advanced_configuration", flattenProcessArgs(processArgs20240530, processArgs)); err != nil {
return diag.FromErr(fmt.Errorf(advancedcluster.ErrorClusterSetting, "advanced_configuration", clusterName, err))
}
diff --git a/internal/service/cluster/data_source_clusters.go b/internal/service/cluster/data_source_clusters.go
index 32b376c92c..2b82d425cf 100644
--- a/internal/service/cluster/data_source_clusters.go
+++ b/internal/service/cluster/data_source_clusters.go
@@ -6,13 +6,16 @@ import (
"log"
"net/http"
+ admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
+ "go.mongodb.org/atlas-sdk/v20241113003/admin"
+ matlas "go.mongodb.org/atlas/mongodbatlas"
+
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
- "go.mongodb.org/atlas-sdk/v20241113003/admin"
- matlas "go.mongodb.org/atlas/mongodbatlas"
)
func PluralDataSource() *schema.Resource {
@@ -349,6 +352,7 @@ func PluralDataSource() *schema.Resource {
func dataSourcePluralRead(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics {
conn := meta.(*config.MongoDBClient).Atlas
connV2 := meta.(*config.MongoDBClient).AtlasV2
+ connV220240530 := meta.(*config.MongoDBClient).AtlasV220240530
projectID := d.Get("project_id").(string)
d.SetId(id.UniqueId())
@@ -368,14 +372,14 @@ func dataSourcePluralRead(ctx context.Context, d *schema.ResourceData, meta any)
return diag.FromErr(fmt.Errorf("error reading new cluster list for project(%s): %s", projectID, err))
}
- if err := d.Set("results", flattenClusters(ctx, d, conn, clusters, latestClusterModels)); err != nil {
+ if err := d.Set("results", flattenClusters(ctx, d, conn, connV2, connV220240530, clusters, latestClusterModels)); err != nil {
return diag.FromErr(fmt.Errorf(advancedcluster.ErrorClusterSetting, "results", d.Id(), err))
}
return nil
}
-func flattenClusters(ctx context.Context, d *schema.ResourceData, conn *matlas.Client, clusters []matlas.Cluster, latestClusterModels map[string]*admin.ClusterDescription20240805) []map[string]any {
+func flattenClusters(ctx context.Context, d *schema.ResourceData, conn *matlas.Client, connV2 *admin.APIClient, connV220240530 *admin20240530.APIClient, clusters []matlas.Cluster, latestClusterModels map[string]*admin.ClusterDescription20240805) []map[string]any {
results := make([]map[string]any, 0)
for i := range clusters {
@@ -384,8 +388,14 @@ func flattenClusters(ctx context.Context, d *schema.ResourceData, conn *matlas.C
log.Printf("[WARN] Error setting `snapshot_backup_policy` for the cluster(%s): %s", clusters[i].ID, err)
}
- processArgs, _, err := conn.Clusters.GetProcessArgs(ctx, clusters[i].GroupID, clusters[i].Name)
- log.Printf("[WARN] Error setting `advanced_configuration` for the cluster(%s): %s", clusters[i].ID, err)
+ processArgs20240530, _, err := connV220240530.ClustersApi.GetClusterAdvancedConfiguration(ctx, clusters[i].GroupID, clusters[i].Name).Execute()
+ if err != nil {
+ log.Printf("[WARN] Error setting `advanced_configuration` for the cluster(%s): %s", clusters[i].ID, err)
+ }
+ processArgs, _, err := connV2.ClustersApi.GetClusterAdvancedConfiguration(ctx, clusters[i].GroupID, clusters[i].Name).Execute()
+ if err != nil {
+ log.Printf("[WARN] Error setting `advanced_configuration` for the cluster(%s): %s", clusters[i].ID, err)
+ }
var containerID string
if clusters[i].ProviderSettings != nil && clusters[i].ProviderSettings.ProviderName != "TENANT" {
@@ -398,7 +408,7 @@ func flattenClusters(ctx context.Context, d *schema.ResourceData, conn *matlas.C
containerID = getContainerID(containers, &clusters[i])
}
result := map[string]any{
- "advanced_configuration": flattenProcessArgs(processArgs),
+ "advanced_configuration": flattenProcessArgs(processArgs20240530, processArgs),
"auto_scaling_compute_enabled": clusters[i].AutoScaling.Compute.Enabled,
"auto_scaling_compute_scale_down_enabled": clusters[i].AutoScaling.Compute.ScaleDownEnabled,
"auto_scaling_disk_gb_enabled": clusters[i].AutoScaling.DiskGBEnabled,
diff --git a/internal/service/cluster/model_cluster.go b/internal/service/cluster/model_cluster.go
index 4de94ac8ab..381ad8492c 100644
--- a/internal/service/cluster/model_cluster.go
+++ b/internal/service/cluster/model_cluster.go
@@ -8,6 +8,8 @@ import (
"reflect"
"strings"
+ admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
+ "go.mongodb.org/atlas-sdk/v20241113003/admin"
matlas "go.mongodb.org/atlas/mongodbatlas"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
@@ -71,27 +73,32 @@ func flattenPolicyItems(items []matlas.PolicyItem) []map[string]any {
return policyItems
}
-func flattenProcessArgs(p *matlas.ProcessArgs) []map[string]any {
+func flattenProcessArgs(p20240530 *admin20240530.ClusterDescriptionProcessArgs, p *admin.ClusterDescriptionProcessArgs20240805) []map[string]any {
flattenedProcessArgs := []map[string]any{
{
- "default_read_concern": p.DefaultReadConcern,
+ // default_read_concern and fail_index_key_too_long have been deprecated, hence using the older SDK
+ "default_read_concern": p20240530.DefaultReadConcern,
+ "fail_index_key_too_long": cast.ToBool(p20240530.FailIndexKeyTooLong),
"default_write_concern": p.DefaultWriteConcern,
- "fail_index_key_too_long": cast.ToBool(p.FailIndexKeyTooLong),
"javascript_enabled": cast.ToBool(p.JavascriptEnabled),
- "minimum_enabled_tls_protocol": p.MinimumEnabledTLSProtocol,
+ "minimum_enabled_tls_protocol": p.MinimumEnabledTlsProtocol,
"no_table_scan": cast.ToBool(p.NoTableScan),
"oplog_size_mb": p.OplogSizeMB,
"oplog_min_retention_hours": p.OplogMinRetentionHours,
"sample_size_bi_connector": p.SampleSizeBIConnector,
"sample_refresh_interval_bi_connector": p.SampleRefreshIntervalBIConnector,
"transaction_lifetime_limit_seconds": p.TransactionLifetimeLimitSeconds,
+ "tls_cipher_config_mode": p.TlsCipherConfigMode,
+ "custom_openssl_cipher_config_tls12": p.GetCustomOpensslCipherConfigTls12(),
},
}
+
if p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds != nil {
flattenedProcessArgs[0]["change_stream_options_pre_and_post_images_expire_after_seconds"] = p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds
} else {
flattenedProcessArgs[0]["change_stream_options_pre_and_post_images_expire_after_seconds"] = -1 // default in schema, otherwise user gets drift detection
}
+
return flattenedProcessArgs
}
@@ -221,19 +228,20 @@ func expandTagSliceFromSetSchema(d *schema.ResourceData) []*matlas.Tag {
return res
}
-func expandProcessArgs(d *schema.ResourceData, p map[string]any, mongodbMajorVersion *string) *matlas.ProcessArgs {
- res := &matlas.ProcessArgs{}
+func expandProcessArgs(d *schema.ResourceData, p map[string]any, mongodbMajorVersion *string) (admin20240530.ClusterDescriptionProcessArgs, admin.ClusterDescriptionProcessArgs20240805) {
+ res20240530 := admin20240530.ClusterDescriptionProcessArgs{}
+ res := admin.ClusterDescriptionProcessArgs20240805{}
+ // default_read_concern and fail_index_key_too_long have been deprecated, hence using the older SDK
if _, ok := d.GetOkExists("advanced_configuration.0.default_read_concern"); ok {
- res.DefaultReadConcern = cast.ToString(p["default_read_concern"])
+ res20240530.DefaultReadConcern = conversion.StringPtr(cast.ToString(p["default_read_concern"]))
}
-
- if _, ok := d.GetOkExists("advanced_configuration.0.default_write_concern"); ok {
- res.DefaultWriteConcern = cast.ToString(p["default_write_concern"])
+ if _, ok := d.GetOkExists("advanced_configuration.0.fail_index_key_too_long"); ok {
+ res20240530.FailIndexKeyTooLong = conversion.Pointer(cast.ToBool(p["fail_index_key_too_long"]))
}
- if _, ok := d.GetOkExists("advanced_configuration.0.fail_index_key_too_long"); ok {
- res.FailIndexKeyTooLong = conversion.Pointer(cast.ToBool(p["fail_index_key_too_long"]))
+ if _, ok := d.GetOkExists("advanced_configuration.0.default_write_concern"); ok {
+ res.DefaultWriteConcern = conversion.StringPtr(cast.ToString(p["default_write_concern"]))
}
if _, ok := d.GetOkExists("advanced_configuration.0.javascript_enabled"); ok {
@@ -241,7 +249,7 @@ func expandProcessArgs(d *schema.ResourceData, p map[string]any, mongodbMajorVer
}
if _, ok := d.GetOkExists("advanced_configuration.0.minimum_enabled_tls_protocol"); ok {
- res.MinimumEnabledTLSProtocol = cast.ToString(p["minimum_enabled_tls_protocol"])
+ res.MinimumEnabledTlsProtocol = conversion.StringPtr(cast.ToString(p["minimum_enabled_tls_protocol"]))
}
if _, ok := d.GetOkExists("advanced_configuration.0.no_table_scan"); ok {
@@ -249,16 +257,16 @@ func expandProcessArgs(d *schema.ResourceData, p map[string]any, mongodbMajorVer
}
if _, ok := d.GetOkExists("advanced_configuration.0.sample_size_bi_connector"); ok {
- res.SampleSizeBIConnector = conversion.Pointer(cast.ToInt64(p["sample_size_bi_connector"]))
+ res.SampleSizeBIConnector = conversion.Pointer(cast.ToInt(p["sample_size_bi_connector"]))
}
if _, ok := d.GetOkExists("advanced_configuration.0.sample_refresh_interval_bi_connector"); ok {
- res.SampleRefreshIntervalBIConnector = conversion.Pointer(cast.ToInt64(p["sample_refresh_interval_bi_connector"]))
+ res.SampleRefreshIntervalBIConnector = conversion.Pointer(cast.ToInt(p["sample_refresh_interval_bi_connector"]))
}
if _, ok := d.GetOkExists("advanced_configuration.0.oplog_size_mb"); ok {
if sizeMB := cast.ToInt64(p["oplog_size_mb"]); sizeMB != 0 {
- res.OplogSizeMB = conversion.Pointer(cast.ToInt64(p["oplog_size_mb"]))
+ res.OplogSizeMB = conversion.Pointer(cast.ToInt(p["oplog_size_mb"]))
} else {
log.Printf(advancedcluster.ErrorClusterSetting, `oplog_size_mb`, "", cast.ToString(sizeMB))
}
@@ -281,10 +289,19 @@ func expandProcessArgs(d *schema.ResourceData, p map[string]any, mongodbMajorVer
}
if _, ok := d.GetOkExists("advanced_configuration.0.change_stream_options_pre_and_post_images_expire_after_seconds"); ok && advancedcluster.IsChangeStreamOptionsMinRequiredMajorVersion(mongodbMajorVersion) {
- res.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds = conversion.Pointer(cast.ToInt64(p["change_stream_options_pre_and_post_images_expire_after_seconds"]))
+ res.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds = conversion.Pointer(cast.ToInt(p["change_stream_options_pre_and_post_images_expire_after_seconds"]))
}
- return res
+ if _, ok := d.GetOkExists("advanced_configuration.0.tls_cipher_config_mode"); ok {
+ res.TlsCipherConfigMode = conversion.StringPtr(cast.ToString(p["tls_cipher_config_mode"]))
+ }
+
+ if _, ok := d.GetOkExists("advanced_configuration.0.custom_openssl_cipher_config_tls12"); ok {
+ tmp := conversion.ExpandStringListFromSetSchema(d.Get("advanced_configuration.0.custom_openssl_cipher_config_tls12").(*schema.Set))
+ res.CustomOpensslCipherConfigTls12 = &tmp
+ }
+
+ return res20240530, res
}
func expandLabelSliceFromSetSchema(d *schema.ResourceData) []matlas.Label {
diff --git a/internal/service/cluster/resource_cluster.go b/internal/service/cluster/resource_cluster.go
index d6b527b20a..5384b6d95f 100644
--- a/internal/service/cluster/resource_cluster.go
+++ b/internal/service/cluster/resource_cluster.go
@@ -11,6 +11,7 @@ import (
"regexp"
"time"
+ admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
"go.mongodb.org/atlas-sdk/v20241113003/admin"
matlas "go.mongodb.org/atlas/mongodbatlas"
@@ -31,7 +32,7 @@ const (
errorClusterRead = "error reading MongoDB Cluster (%s): %s"
errorClusterDelete = "error deleting MongoDB Cluster (%s): %s"
errorClusterUpdate = "error updating MongoDB Cluster (%s): %s"
- errorAdvancedConfUpdate = "error updating Advanced Configuration Option form MongoDB Cluster (%s): %s"
+ errorAdvancedConfUpdate = "error updating Advanced Configuration Option %s for MongoDB Cluster (%s): %s"
ErrorSnapshotBackupPolicyRead = "error getting a Cloud Provider Snapshot Backup Policy for the cluster(%s): %s"
)
@@ -391,6 +392,7 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
var (
conn = meta.(*config.MongoDBClient).Atlas
connV2 = meta.(*config.MongoDBClient).AtlasV2
+ connV220240530 = meta.(*config.MongoDBClient).AtlasV220240530
connV220240805 = meta.(*config.MongoDBClient).AtlasV220240805
projectID = d.Get("project_id").(string)
clusterName = d.Get("name").(string)
@@ -572,12 +574,16 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
*/
ac, ok := d.GetOk("advanced_configuration")
if aclist, ok1 := ac.([]any); ok1 && len(aclist) > 0 {
- advancedConfReq := expandProcessArgs(d, aclist[0].(map[string]any), &clusterRequest.MongoDBMajorVersion)
+ params20240530, params := expandProcessArgs(d, aclist[0].(map[string]any), &clusterRequest.MongoDBMajorVersion)
if ok {
- _, _, err := conn.Clusters.UpdateProcessArgs(ctx, projectID, cluster.Name, advancedConfReq)
+ _, _, err = connV220240530.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, cluster.Name, ¶ms20240530).Execute()
if err != nil {
- return diag.FromErr(fmt.Errorf(errorAdvancedConfUpdate, cluster.Name, err))
+ return diag.FromErr(fmt.Errorf(errorAdvancedConfUpdate, advancedcluster.V20240530, cluster.Name, err))
+ }
+ _, _, err = connV2.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, cluster.Name, ¶ms).Execute()
+ if err != nil {
+ return diag.FromErr(fmt.Errorf(errorAdvancedConfUpdate, "", cluster.Name, err))
}
}
}
@@ -622,6 +628,7 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
func resourceRead(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics {
conn := meta.(*config.MongoDBClient).Atlas
connV2 := meta.(*config.MongoDBClient).AtlasV2
+ connV220240530 := meta.(*config.MongoDBClient).AtlasV220240530
ids := conversion.DecodeStateID(d.Id())
projectID := ids["project_id"]
clusterName := ids["cluster_name"]
@@ -779,12 +786,16 @@ func resourceRead(ctx context.Context, d *schema.ResourceData, meta any) diag.Di
/*
Get the advaced configuration options and set up to the terraform state
*/
- processArgs, _, err := conn.Clusters.GetProcessArgs(ctx, projectID, clusterName)
+ processArgs20240530, _, err := connV220240530.ClustersApi.GetClusterAdvancedConfiguration(ctx, projectID, clusterName).Execute()
+ if err != nil {
+ return diag.FromErr(fmt.Errorf(advancedcluster.ErrorAdvancedConfRead, advancedcluster.V20240530, clusterName, err))
+ }
+ processArgs, _, err := connV2.ClustersApi.GetClusterAdvancedConfiguration(ctx, projectID, clusterName).Execute()
if err != nil {
- return diag.FromErr(fmt.Errorf(advancedcluster.ErrorAdvancedConfRead, clusterName, err))
+ return diag.FromErr(fmt.Errorf(advancedcluster.ErrorAdvancedConfRead, "", clusterName, err))
}
- if err := d.Set("advanced_configuration", flattenProcessArgs(processArgs)); err != nil {
+ if err := d.Set("advanced_configuration", flattenProcessArgs(processArgs20240530, processArgs)); err != nil {
return diag.FromErr(fmt.Errorf(advancedcluster.ErrorClusterSetting, "advanced_configuration", clusterName, err))
}
@@ -824,6 +835,7 @@ func resourceUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.
conn = meta.(*config.MongoDBClient).Atlas
connV2 = meta.(*config.MongoDBClient).AtlasV2
connV220240805 = meta.(*config.MongoDBClient).AtlasV220240805
+ connV220240530 = meta.(*config.MongoDBClient).AtlasV220240530
ids = conversion.DecodeStateID(d.Id())
projectID = ids["project_id"]
clusterName = ids["cluster_name"]
@@ -982,11 +994,17 @@ func resourceUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.
ac := d.Get("advanced_configuration")
if aclist, ok1 := ac.([]any); ok1 && len(aclist) > 0 {
- advancedConfReq := expandProcessArgs(d, aclist[0].(map[string]any), &mongoDBMajorVersion)
- if !reflect.DeepEqual(advancedConfReq, matlas.ProcessArgs{}) {
- _, _, err := conn.Clusters.UpdateProcessArgs(ctx, projectID, clusterName, advancedConfReq)
+ params20240530, params := expandProcessArgs(d, aclist[0].(map[string]any), &mongoDBMajorVersion)
+ if !reflect.DeepEqual(params20240530, admin20240530.ClusterDescriptionProcessArgs{}) {
+ _, _, err := connV220240530.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, clusterName, ¶ms20240530).Execute()
+ if err != nil {
+ return diag.FromErr(fmt.Errorf(errorAdvancedConfUpdate, advancedcluster.V20240530, clusterName, err))
+ }
+ }
+ if !reflect.DeepEqual(params, admin.ClusterDescriptionProcessArgs20240805{}) {
+ _, _, err = connV2.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, clusterName, ¶ms).Execute()
if err != nil {
- return diag.FromErr(fmt.Errorf(errorAdvancedConfUpdate, clusterName, err))
+ return diag.FromErr(fmt.Errorf(errorAdvancedConfUpdate, "", clusterName, err))
}
}
}
diff --git a/internal/service/cluster/resource_cluster_migration_test.go b/internal/service/cluster/resource_cluster_migration_test.go
index 94e0108858..34b5d06070 100644
--- a/internal/service/cluster/resource_cluster_migration_test.go
+++ b/internal/service/cluster/resource_cluster_migration_test.go
@@ -11,6 +11,11 @@ func TestMigCluster_basicAWS_simple(t *testing.T) {
}
func TestMigCluster_partial_advancedConf(t *testing.T) {
- mig.SkipIfVersionBelow(t, "1.19.0") // version where change_stream_options_pre_and_post_images_expire_after_seconds was introduced
+ mig.SkipIfVersionBelow(t, "1.24.0") // version where tls_cipher_config_mode was introduced
mig.CreateAndRunTest(t, partialAdvancedConfTestCase(t))
}
+
+func TestMigDefaultWriteReadAdvancedConf_advancedConf(t *testing.T) {
+ mig.SkipIfVersionBelow(t, "1.24.0") // version where tls_cipher_config_mode was introduced
+ mig.CreateAndRunTest(t, basicDefaultWriteReadAdvancedConfTestCase(t))
+}
diff --git a/internal/service/cluster/resource_cluster_test.go b/internal/service/cluster/resource_cluster_test.go
index 4aade4c540..78c51fe6c0 100644
--- a/internal/service/cluster/resource_cluster_test.go
+++ b/internal/service/cluster/resource_cluster_test.go
@@ -4,14 +4,19 @@ import (
"fmt"
"os"
"regexp"
+ "strings"
"testing"
"time"
+ admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
+ "go.mongodb.org/atlas-sdk/v20241113003/admin"
+ matlas "go.mongodb.org/atlas/mongodbatlas"
+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
+
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
clustersvc "github.com/mongodb/terraform-provider-mongodbatlas/internal/service/cluster"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc"
- matlas "go.mongodb.org/atlas/mongodbatlas"
)
const (
@@ -97,16 +102,21 @@ func partialAdvancedConfTestCase(tb testing.TB) *resource.TestCase {
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
- Config: configAdvancedConf(projectID, clusterName, "false", &matlas.ProcessArgs{
- FailIndexKeyTooLong: conversion.Pointer(false),
- JavascriptEnabled: conversion.Pointer(true),
- MinimumEnabledTLSProtocol: "TLS1_1",
- NoTableScan: conversion.Pointer(false),
- OplogSizeMB: conversion.Pointer[int64](1000),
- SampleRefreshIntervalBIConnector: conversion.Pointer[int64](310),
- SampleSizeBIConnector: conversion.Pointer[int64](110),
- TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300),
- }),
+ Config: configAdvancedConf(projectID, clusterName, "false", &admin20240530.ClusterDescriptionProcessArgs{
+ FailIndexKeyTooLong: conversion.Pointer(false),
+ DefaultReadConcern: conversion.StringPtr("available"),
+ },
+ &admin.ClusterDescriptionProcessArgs20240805{
+ JavascriptEnabled: conversion.Pointer(true),
+ MinimumEnabledTlsProtocol: conversion.StringPtr("TLS1_1"),
+ NoTableScan: conversion.Pointer(false),
+ OplogSizeMB: conversion.Pointer(1000),
+ SampleRefreshIntervalBIConnector: conversion.Pointer(310),
+ SampleSizeBIConnector: conversion.Pointer(110),
+ TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300),
+ TlsCipherConfigMode: conversion.StringPtr("CUSTOM"),
+ CustomOpensslCipherConfigTls12: &[]string{"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"},
+ }),
Check: resource.ComposeAggregateTestCheckFunc(
acc.CheckExistsCluster(resourceName),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.fail_index_key_too_long", "false"),
@@ -117,6 +127,9 @@ func partialAdvancedConfTestCase(tb testing.TB) *resource.TestCase {
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_refresh_interval_bi_connector", "310"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_size_bi_connector", "110"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.transaction_lifetime_limit_seconds", "300"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.tls_cipher_config_mode", "CUSTOM"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.custom_openssl_cipher_config_tls12.#", "2"),
+
resource.TestCheckResourceAttr(dataSourceName, "name", clusterName),
resource.TestCheckResourceAttr(dataSourceName, "disk_size_gb", "10"),
resource.TestCheckResourceAttrSet(dataSourceName, "mongo_uri"),
@@ -126,11 +139,15 @@ func partialAdvancedConfTestCase(tb testing.TB) *resource.TestCase {
resource.TestCheckResourceAttr(dataSourceName, "advanced_configuration.0.sample_size_bi_connector", "110"),
resource.TestCheckResourceAttr(dataSourceName, "advanced_configuration.0.no_table_scan", "false"),
resource.TestCheckResourceAttr(dataSourceName, "advanced_configuration.0.oplog_size_mb", "1000"),
+ resource.TestCheckResourceAttr(dataSourceName, "advanced_configuration.0.tls_cipher_config_mode", "CUSTOM"),
+ resource.TestCheckResourceAttr(dataSourceName, "advanced_configuration.0.custom_openssl_cipher_config_tls12.#", "2"),
),
},
{
- Config: configAdvancedConfPartial(projectID, clusterName, "false", &matlas.ProcessArgs{
- MinimumEnabledTLSProtocol: "TLS1_2",
+ Config: configAdvancedConfPartial(projectID, clusterName, "false", &admin.ClusterDescriptionProcessArgs20240805{
+ MinimumEnabledTlsProtocol: conversion.StringPtr("TLS1_2"),
+ TlsCipherConfigMode: conversion.StringPtr("DEFAULT"), // To unset TlsCipherConfigMode, user needs to set this to DEFAULT
+ CustomOpensslCipherConfigTls12: &[]string{},
}),
Check: resource.ComposeAggregateTestCheckFunc(
acc.CheckExistsCluster(resourceName),
@@ -141,37 +158,43 @@ func partialAdvancedConfTestCase(tb testing.TB) *resource.TestCase {
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.oplog_size_mb", "1000"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_refresh_interval_bi_connector", "310"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_size_bi_connector", "110"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.tls_cipher_config_mode", "DEFAULT"),
),
},
},
}
}
-func TestAccCluster_basic_DefaultWriteRead_AdvancedConf(t *testing.T) {
+func basicDefaultWriteReadAdvancedConfTestCase(tb testing.TB) *resource.TestCase {
+ tb.Helper()
+
var (
- projectID = acc.ProjectIDExecution(t)
+ projectID = acc.ProjectIDExecution(tb)
clusterName = acc.RandomClusterName()
)
- resource.ParallelTest(t, resource.TestCase{
- PreCheck: acc.PreCheckBasicSleep(t, nil, projectID, clusterName),
+ return &resource.TestCase{
+ PreCheck: acc.PreCheckBasicSleep(tb, nil, projectID, clusterName),
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
- Config: configAdvancedConfDefaultWriteRead(projectID, clusterName, "false", &matlas.ProcessArgs{
- DefaultReadConcern: "available",
- DefaultWriteConcern: "1",
- FailIndexKeyTooLong: conversion.Pointer(false),
- JavascriptEnabled: conversion.Pointer(true),
- MinimumEnabledTLSProtocol: "TLS1_1",
- NoTableScan: conversion.Pointer(false),
- OplogSizeMB: conversion.Pointer[int64](1000),
- SampleRefreshIntervalBIConnector: conversion.Pointer[int64](310),
- SampleSizeBIConnector: conversion.Pointer[int64](110),
- TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300),
- ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: conversion.Pointer[int64](113),
- }),
+ Config: configAdvancedConfDefaultWriteRead(projectID, clusterName, "false",
+ &admin20240530.ClusterDescriptionProcessArgs{
+ FailIndexKeyTooLong: conversion.Pointer(false),
+ DefaultReadConcern: conversion.StringPtr("available"),
+ },
+ &admin.ClusterDescriptionProcessArgs20240805{
+ DefaultWriteConcern: conversion.StringPtr("1"),
+ JavascriptEnabled: conversion.Pointer(true),
+ MinimumEnabledTlsProtocol: conversion.StringPtr("TLS1_1"),
+ NoTableScan: conversion.Pointer(false),
+ OplogSizeMB: conversion.Pointer(1000),
+ SampleRefreshIntervalBIConnector: conversion.Pointer(310),
+ SampleSizeBIConnector: conversion.Pointer(110),
+ TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300),
+ ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: conversion.Pointer(113),
+ }),
Check: resource.ComposeAggregateTestCheckFunc(
acc.CheckExistsCluster(resourceName),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.default_read_concern", "available"),
@@ -183,11 +206,12 @@ func TestAccCluster_basic_DefaultWriteRead_AdvancedConf(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_refresh_interval_bi_connector", "310"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_size_bi_connector", "110"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.change_stream_options_pre_and_post_images_expire_after_seconds", "113"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.tls_cipher_config_mode", "DEFAULT"),
),
},
{
- Config: configAdvancedConfPartialDefault(projectID, clusterName, "false", &matlas.ProcessArgs{
- MinimumEnabledTLSProtocol: "TLS1_2",
+ Config: configAdvancedConfPartialDefault(projectID, clusterName, "false", &admin.ClusterDescriptionProcessArgs20240805{
+ MinimumEnabledTlsProtocol: conversion.StringPtr("TLS1_2"),
}),
Check: resource.ComposeAggregateTestCheckFunc(
acc.CheckExistsCluster(resourceName),
@@ -200,10 +224,15 @@ func TestAccCluster_basic_DefaultWriteRead_AdvancedConf(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_refresh_interval_bi_connector", "310"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_size_bi_connector", "110"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.change_stream_options_pre_and_post_images_expire_after_seconds", "-1"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.tls_cipher_config_mode", "DEFAULT"),
),
},
},
- })
+ }
+}
+
+func TestAccCluster_basic_DefaultWriteRead_AdvancedConf(t *testing.T) {
+ resource.ParallelTest(t, *basicDefaultWriteReadAdvancedConfTestCase(t))
}
func TestAccCluster_emptyAdvancedConf(t *testing.T) {
@@ -218,21 +247,23 @@ func TestAccCluster_emptyAdvancedConf(t *testing.T) {
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
- Config: configAdvancedConfPartial(projectID, clusterName, "false", &matlas.ProcessArgs{
- MinimumEnabledTLSProtocol: "TLS1_2",
+ Config: configAdvancedConfPartial(projectID, clusterName, "false", &admin.ClusterDescriptionProcessArgs20240805{
+ MinimumEnabledTlsProtocol: conversion.StringPtr("TLS1_2"),
}),
},
{
- Config: configAdvancedConf(projectID, clusterName, "false", &matlas.ProcessArgs{
- FailIndexKeyTooLong: conversion.Pointer(false),
- JavascriptEnabled: conversion.Pointer(true),
- MinimumEnabledTLSProtocol: "TLS1_1",
- NoTableScan: conversion.Pointer(false),
- OplogSizeMB: conversion.Pointer[int64](1000),
- SampleRefreshIntervalBIConnector: conversion.Pointer[int64](310),
- SampleSizeBIConnector: conversion.Pointer[int64](110),
- TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300),
- }),
+ Config: configAdvancedConf(projectID, clusterName, "false", &admin20240530.ClusterDescriptionProcessArgs{
+ FailIndexKeyTooLong: conversion.Pointer(false),
+ },
+ &admin.ClusterDescriptionProcessArgs20240805{
+ JavascriptEnabled: conversion.Pointer(true),
+ MinimumEnabledTlsProtocol: conversion.StringPtr("TLS1_1"),
+ NoTableScan: conversion.Pointer(false),
+ OplogSizeMB: conversion.Pointer(1000),
+ SampleRefreshIntervalBIConnector: conversion.Pointer(310),
+ SampleSizeBIConnector: conversion.Pointer(110),
+ TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300),
+ }),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.fail_index_key_too_long", "false"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.javascript_enabled", "true"),
@@ -260,19 +291,23 @@ func TestAccCluster_basicAdvancedConf(t *testing.T) {
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
- Config: configAdvancedConf(projectID, clusterName, "false", &matlas.ProcessArgs{
- FailIndexKeyTooLong: conversion.Pointer(false),
- JavascriptEnabled: conversion.Pointer(true),
- MinimumEnabledTLSProtocol: "TLS1_2",
- NoTableScan: conversion.Pointer(true),
- OplogSizeMB: conversion.Pointer[int64](1000),
- SampleRefreshIntervalBIConnector: conversion.Pointer[int64](310),
- SampleSizeBIConnector: conversion.Pointer[int64](110),
- TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300),
- }),
+ Config: configAdvancedConf(projectID, clusterName, "false", &admin20240530.ClusterDescriptionProcessArgs{
+ FailIndexKeyTooLong: conversion.Pointer(false),
+ DefaultReadConcern: conversion.StringPtr("available"),
+ },
+ &admin.ClusterDescriptionProcessArgs20240805{
+ JavascriptEnabled: conversion.Pointer(true),
+ MinimumEnabledTlsProtocol: conversion.StringPtr("TLS1_2"),
+ NoTableScan: conversion.Pointer(true),
+ OplogSizeMB: conversion.Pointer(1000),
+ SampleRefreshIntervalBIConnector: conversion.Pointer(310),
+ SampleSizeBIConnector: conversion.Pointer(110),
+ TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300),
+ }),
Check: resource.ComposeAggregateTestCheckFunc(
acc.CheckExistsCluster(resourceName),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.fail_index_key_too_long", "false"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.default_read_concern", "available"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.javascript_enabled", "true"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.minimum_enabled_tls_protocol", "TLS1_2"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.no_table_scan", "true"),
@@ -280,19 +315,24 @@ func TestAccCluster_basicAdvancedConf(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_size_bi_connector", "110"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_refresh_interval_bi_connector", "310"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.transaction_lifetime_limit_seconds", "300"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.tls_cipher_config_mode", "DEFAULT"),
),
},
{
- Config: configAdvancedConf(projectID, clusterName, "false", &matlas.ProcessArgs{
- FailIndexKeyTooLong: conversion.Pointer(false),
- JavascriptEnabled: conversion.Pointer(false),
- MinimumEnabledTLSProtocol: "TLS1_1",
- NoTableScan: conversion.Pointer(false),
- OplogSizeMB: conversion.Pointer[int64](990),
- SampleRefreshIntervalBIConnector: conversion.Pointer[int64](0),
- SampleSizeBIConnector: conversion.Pointer[int64](0),
- TransactionLifetimeLimitSeconds: conversion.Pointer[int64](60),
- }),
+ Config: configAdvancedConf(projectID, clusterName, "false", &admin20240530.ClusterDescriptionProcessArgs{
+ FailIndexKeyTooLong: conversion.Pointer(false),
+ },
+ &admin.ClusterDescriptionProcessArgs20240805{
+ JavascriptEnabled: conversion.Pointer(false),
+ MinimumEnabledTlsProtocol: conversion.StringPtr("TLS1_1"),
+ NoTableScan: conversion.Pointer(false),
+ OplogSizeMB: conversion.Pointer(990),
+ SampleRefreshIntervalBIConnector: conversion.Pointer(0),
+ SampleSizeBIConnector: conversion.Pointer(0),
+ TransactionLifetimeLimitSeconds: conversion.Pointer[int64](60),
+ TlsCipherConfigMode: conversion.StringPtr("CUSTOM"),
+ CustomOpensslCipherConfigTls12: &[]string{"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"},
+ }),
Check: resource.ComposeAggregateTestCheckFunc(
acc.CheckExistsCluster(resourceName),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.fail_index_key_too_long", "false"),
@@ -303,6 +343,8 @@ func TestAccCluster_basicAdvancedConf(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_size_bi_connector", "0"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_refresh_interval_bi_connector", "0"),
resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.transaction_lifetime_limit_seconds", "60"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.tls_cipher_config_mode", "CUSTOM"),
+ resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.custom_openssl_cipher_config_tls12.#", "1"),
),
},
},
@@ -1467,7 +1509,27 @@ func configAWS(projectID, name string, backupEnabled, autoDiskGBEnabled bool) st
`, projectID, name, backupEnabled, autoDiskGBEnabled)
}
-func configAdvancedConf(projectID, name, autoscalingEnabled string, p *matlas.ProcessArgs) string {
+func configAdvancedConf(projectID, name, autoscalingEnabled string,
+ p20240530 *admin20240530.ClusterDescriptionProcessArgs, p *admin.ClusterDescriptionProcessArgs20240805) string {
+ defaultReadConcernStr := ""
+ tlsCipherConfigModeStr := ""
+ customOpensslCipherConfigTLS12Str := ""
+
+ if p20240530.DefaultReadConcern != nil {
+ defaultReadConcernStr = fmt.Sprintf("default_read_concern = %[1]q", *p20240530.DefaultReadConcern)
+ }
+
+ if p.TlsCipherConfigMode != nil {
+ tlsCipherConfigModeStr = fmt.Sprintf(`tls_cipher_config_mode = %[1]q`, *p.TlsCipherConfigMode)
+ if p.CustomOpensslCipherConfigTls12 != nil && len(*p.CustomOpensslCipherConfigTls12) > 0 {
+ //nolint:gocritic // reason: simplifying string array construction
+ customOpensslCipherConfigTLS12Str = fmt.Sprintf(
+ `custom_openssl_cipher_config_tls12 = ["%s"]`,
+ strings.Join(*p.CustomOpensslCipherConfigTls12, `", "`),
+ )
+ }
+ }
+
return fmt.Sprintf(`
resource "mongodbatlas_cluster" "test" {
project_id = %[1]q
@@ -1494,13 +1556,17 @@ func configAdvancedConf(projectID, name, autoscalingEnabled string, p *matlas.Pr
advanced_configuration {
fail_index_key_too_long = %[4]t
- javascript_enabled = %[5]t
- minimum_enabled_tls_protocol = %[6]q
- no_table_scan = %[7]t
- oplog_size_mb = %[8]d
- sample_size_bi_connector = %[9]d
- sample_refresh_interval_bi_connector = %[10]d
- transaction_lifetime_limit_seconds = %[11]d
+ %[5]s
+ javascript_enabled = %[6]t
+ minimum_enabled_tls_protocol = %[7]q
+ no_table_scan = %[8]t
+ oplog_size_mb = %[9]d
+ sample_size_bi_connector = %[10]d
+ sample_refresh_interval_bi_connector = %[11]d
+ transaction_lifetime_limit_seconds = %[12]d
+ %[13]s
+ %[14]s
+
}
}
@@ -1509,11 +1575,11 @@ func configAdvancedConf(projectID, name, autoscalingEnabled string, p *matlas.Pr
name = mongodbatlas_cluster.test.name
}
`, projectID, name, autoscalingEnabled,
- *p.FailIndexKeyTooLong, *p.JavascriptEnabled, p.MinimumEnabledTLSProtocol, *p.NoTableScan,
- *p.OplogSizeMB, *p.SampleSizeBIConnector, *p.SampleRefreshIntervalBIConnector, *p.TransactionLifetimeLimitSeconds)
+ p20240530.GetFailIndexKeyTooLong(), defaultReadConcernStr, p.GetJavascriptEnabled(), p.GetMinimumEnabledTlsProtocol(), p.GetNoTableScan(),
+ p.GetOplogSizeMB(), p.GetSampleSizeBIConnector(), p.GetSampleRefreshIntervalBIConnector(), p.GetTransactionLifetimeLimitSeconds(), tlsCipherConfigModeStr, customOpensslCipherConfigTLS12Str)
}
-func configAdvancedConfDefaultWriteRead(projectID, name, autoscalingEnabled string, p *matlas.ProcessArgs) string {
+func configAdvancedConfDefaultWriteRead(projectID, name, autoscalingEnabled string, p20240530 *admin20240530.ClusterDescriptionProcessArgs, p *admin.ClusterDescriptionProcessArgs20240805) string {
return fmt.Sprintf(`
resource "mongodbatlas_cluster" "test" {
project_id = %[1]q
@@ -1550,11 +1616,24 @@ func configAdvancedConfDefaultWriteRead(projectID, name, autoscalingEnabled stri
}
}
`, projectID, name, autoscalingEnabled,
- *p.JavascriptEnabled, p.MinimumEnabledTLSProtocol, *p.NoTableScan,
- *p.OplogSizeMB, *p.SampleSizeBIConnector, *p.SampleRefreshIntervalBIConnector, p.DefaultReadConcern, p.DefaultWriteConcern, *p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds)
+ p.GetJavascriptEnabled(), p.GetMinimumEnabledTlsProtocol(), p.GetNoTableScan(),
+ p.GetOplogSizeMB(), p.GetSampleSizeBIConnector(), p.GetSampleRefreshIntervalBIConnector(), p20240530.GetDefaultReadConcern(), p.GetDefaultWriteConcern(), p.GetChangeStreamOptionsPreAndPostImagesExpireAfterSeconds())
}
-func configAdvancedConfPartial(projectID, name, autoscalingEnabled string, p *matlas.ProcessArgs) string {
+func configAdvancedConfPartial(projectID, name, autoscalingEnabled string, p *admin.ClusterDescriptionProcessArgs20240805) string {
+ tlsCipherConfigModeStr := ""
+ customOpensslCipherConfigTLS12Str := ""
+
+ if p.TlsCipherConfigMode != nil {
+ tlsCipherConfigModeStr = fmt.Sprintf(`tls_cipher_config_mode = %[1]q`, *p.TlsCipherConfigMode)
+ if p.CustomOpensslCipherConfigTls12 != nil && len(*p.CustomOpensslCipherConfigTls12) > 0 {
+ //nolint:gocritic // reason: simplifying string array construction
+ customOpensslCipherConfigTLS12Str = fmt.Sprintf(
+ `custom_openssl_cipher_config_tls12 = ["%s"]`,
+ strings.Join(*p.CustomOpensslCipherConfigTls12, `", "`),
+ )
+ }
+ }
return fmt.Sprintf(`
resource "mongodbatlas_cluster" "test" {
project_id = %[1]q
@@ -1582,12 +1661,14 @@ func configAdvancedConfPartial(projectID, name, autoscalingEnabled string, p *ma
advanced_configuration {
minimum_enabled_tls_protocol = %[4]q
+ %[5]s
+ %[6]s
}
}
- `, projectID, name, autoscalingEnabled, p.MinimumEnabledTLSProtocol)
+ `, projectID, name, autoscalingEnabled, p.GetMinimumEnabledTlsProtocol(), tlsCipherConfigModeStr, customOpensslCipherConfigTLS12Str)
}
-func configAdvancedConfPartialDefault(projectID, name, autoscalingEnabled string, p *matlas.ProcessArgs) string {
+func configAdvancedConfPartialDefault(projectID, name, autoscalingEnabled string, p *admin.ClusterDescriptionProcessArgs20240805) string {
return fmt.Sprintf(`
resource "mongodbatlas_cluster" "test" {
project_id = %[1]q
@@ -1617,7 +1698,7 @@ func configAdvancedConfPartialDefault(projectID, name, autoscalingEnabled string
minimum_enabled_tls_protocol = %[4]q
}
}
- `, projectID, name, autoscalingEnabled, p.MinimumEnabledTLSProtocol)
+ `, projectID, name, autoscalingEnabled, p.GetMinimumEnabledTlsProtocol())
}
func configAzure(orgID, projectName, name, backupEnabled, instanceSizeName string, includeDiskType bool) string {
diff --git a/internal/service/customdbrole/resource_custom_db_role_test.go b/internal/service/customdbrole/resource_custom_db_role_test.go
index 583ebac62f..019569c539 100644
--- a/internal/service/customdbrole/resource_custom_db_role_test.go
+++ b/internal/service/customdbrole/resource_custom_db_role_test.go
@@ -382,7 +382,7 @@ func TestAccConfigRSCustomDBRoles_MultipleResources(t *testing.T) {
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
)
- for i := 0; i < 5; i++ {
+ for i := range 5 {
roleName := fmt.Sprintf("test-acc-custom_role-%d", i)
projectName := acc.RandomProjectName()
t.Run(roleName, func(t *testing.T) {
diff --git a/internal/service/project/data_source_project.go b/internal/service/project/data_source_project.go
index a31cb5b444..ee3ada0b35 100644
--- a/internal/service/project/data_source_project.go
+++ b/internal/service/project/data_source_project.go
@@ -104,8 +104,7 @@ func (d *projectDS) Schema(ctx context.Context, req datasource.SchemaRequest, re
Computed: true,
},
"is_slow_operation_thresholding_enabled": schema.BoolAttribute{
- Computed: true,
- DeprecationMessage: fmt.Sprintf(constant.DeprecationParamByVersion, "1.24.0"),
+ Computed: true,
},
"region_usage_restrictions": schema.StringAttribute{
Computed: true,
diff --git a/internal/service/project/data_source_projects.go b/internal/service/project/data_source_projects.go
index 1982c07853..415131a591 100644
--- a/internal/service/project/data_source_projects.go
+++ b/internal/service/project/data_source_projects.go
@@ -98,8 +98,7 @@ func (d *ProjectsDS) Schema(ctx context.Context, req datasource.SchemaRequest, r
Computed: true,
},
"is_slow_operation_thresholding_enabled": schema.BoolAttribute{
- Computed: true,
- DeprecationMessage: fmt.Sprintf(constant.DeprecationParamByVersion, "1.24.0"),
+ Computed: true,
},
"region_usage_restrictions": schema.StringAttribute{
Computed: true,
diff --git a/internal/service/project/resource_project.go b/internal/service/project/resource_project.go
index 9e21510dbd..a13e540de7 100644
--- a/internal/service/project/resource_project.go
+++ b/internal/service/project/resource_project.go
@@ -420,12 +420,6 @@ func SetSlowOperationThresholding(ctx context.Context, performanceAdvisorAPI adm
func ReadIsSlowMsThresholdingEnabled(ctx context.Context, api admin.PerformanceAdvisorApi, projectID string, warnings *diag.Diagnostics) (bool, error) {
response, err := api.GetManagedSlowMs(ctx, projectID).Execute()
if err != nil {
- if admin.IsErrorCode(err, "USER_UNAUTHORIZED") {
- if warnings != nil {
- warnings.AddWarning("user does not have permission to read is_slow_operation_thresholding_enabled. Please read our documentation for more information.", fmt.Sprintf(ErrorProjectRead, projectID, err.Error()))
- }
- return false, nil
- }
return false, err
}
var isEnabled bool
diff --git a/internal/service/project/resource_project_schema.go b/internal/service/project/resource_project_schema.go
index 3292b3e89a..37fd35b255 100644
--- a/internal/service/project/resource_project_schema.go
+++ b/internal/service/project/resource_project_schema.go
@@ -101,9 +101,8 @@ func ResourceSchema(ctx context.Context) schema.Schema {
},
},
"is_slow_operation_thresholding_enabled": schema.BoolAttribute{
- Computed: true,
- Optional: true,
- DeprecationMessage: fmt.Sprintf(constant.DeprecationParamByVersion, "1.24.0"),
+ Computed: true,
+ Optional: true,
PlanModifiers: []planmodifier.Bool{
boolplanmodifier.UseStateForUnknown(),
},
diff --git a/internal/service/project/resource_project_test.go b/internal/service/project/resource_project_test.go
index efe49c0a6c..231eaed59c 100644
--- a/internal/service/project/resource_project_test.go
+++ b/internal/service/project/resource_project_test.go
@@ -1080,6 +1080,74 @@ func TestAccProject_withTags(t *testing.T) {
})
}
+func TestAccProject_slowOperationReadOnly(t *testing.T) {
+ var (
+ orgID = os.Getenv("MONGODB_ATLAS_ORG_ID")
+ projectName = acc.RandomProjectName()
+ config = configBasic(orgID, projectName, "", false, nil, conversion.Pointer(false))
+ providerConfigReadOnly = acc.ConfigReadOnlyProvider()
+ )
+ resource.ParallelTest(t, resource.TestCase{
+ PreCheck: func() { acc.PreCheckBasic(t); acc.PreCheckPublicKey2(t) },
+ ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
+ CheckDestroy: acc.CheckDestroyProject,
+ Steps: []resource.TestStep{
+ {
+ Config: config,
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(resourceName, "is_slow_operation_thresholding_enabled", "false"),
+ ),
+ },
+ {
+ PreConfig: func() { changeRoles(t, orgID, projectName, "GROUP_READ_ONLY") },
+ Config: providerConfigReadOnly + config,
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(resourceName, "is_slow_operation_thresholding_enabled", "false"),
+ ),
+ },
+ // Validate the API Key has a different role
+ {
+ Config: providerConfigReadOnly + configBasic(orgID, projectName, "", false, nil, conversion.Pointer(true)),
+ ExpectError: regexp.MustCompile("error in project settings update"),
+ },
+ // read back again to ensure no changes, and allow deletion to work
+ {
+ Config: config,
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(resourceName, "is_slow_operation_thresholding_enabled", "false"),
+ ),
+ },
+ },
+ })
+}
+
+func changeRoles(t *testing.T, orgID, projectName, roleName string) {
+ t.Helper()
+ ctx := context.Background()
+ respProject, _, _ := acc.ConnV2().ProjectsApi.GetProjectByName(ctx, projectName).Execute()
+ projectID := respProject.GetId()
+ if projectID == "" {
+ t.Errorf("PreConfig: error finding project %s", projectName)
+ }
+ api := acc.ConnV2().ProgrammaticAPIKeysApi
+ respList, _, _ := api.ListApiKeys(ctx, orgID).Execute()
+ publicKey := os.Getenv("MONGODB_ATLAS_PUBLIC_KEY_READ_ONLY")
+ keys := respList.GetResults()
+ for _, result := range keys {
+ if result.GetPublicKey() != publicKey {
+ continue
+ }
+ apiKeyID := result.GetId()
+ assignment := admin.UpdateAtlasProjectApiKey{Roles: &[]string{roleName}}
+ _, _, err := api.UpdateApiKeyRoles(ctx, projectID, apiKeyID, &assignment).Execute()
+ if err != nil {
+ t.Errorf("PreConfig: error updating key %s", err)
+ }
+ return
+ }
+ t.Error("PreConfig: key not found")
+}
+
func createDataFederationLimit(limitName string) admin.DataFederationLimit {
return admin.DataFederationLimit{
Name: limitName,
diff --git a/internal/service/projectipaccesslist/resource_project_ip_access_list_test.go b/internal/service/projectipaccesslist/resource_project_ip_access_list_test.go
index b75d5f6f1f..24350713d1 100644
--- a/internal/service/projectipaccesslist/resource_project_ip_access_list_test.go
+++ b/internal/service/projectipaccesslist/resource_project_ip_access_list_test.go
@@ -117,7 +117,7 @@ func TestAccProjectIPAccessList_settingMultiple(t *testing.T) {
checks = []resource.TestCheckFunc{}
)
- for i := 0; i < ipWhiteListCount; i++ {
+ for i := range ipWhiteListCount {
entry := make(map[string]string)
entryName := ""
ipAddr := ""
diff --git a/internal/service/resourcepolicy/resource_test.go b/internal/service/resourcepolicy/resource_test.go
index 112bcf5dde..fad86921aa 100644
--- a/internal/service/resourcepolicy/resource_test.go
+++ b/internal/service/resourcepolicy/resource_test.go
@@ -163,7 +163,7 @@ func checksResourcePolicy(orgID, name string, policyCount int) resource.TestChec
}
checks := []resource.TestCheckFunc{checkExists()}
checks = acc.AddAttrChecks(dataSourcePluralID, checks, pluralMap)
- for i := 0; i < policyCount; i++ {
+ for i := range policyCount {
checks = acc.AddAttrSetChecks(resourceID, checks, fmt.Sprintf("policies.%d.body", i), fmt.Sprintf("policies.%d.id", i))
checks = acc.AddAttrSetChecks(dataSourceID, checks, fmt.Sprintf("policies.%d.body", i), fmt.Sprintf("policies.%d.id", i))
checks = acc.AddAttrSetChecks(dataSourcePluralID, checks, fmt.Sprintf("results.0.policies.%d.body", i), fmt.Sprintf("results.0.policies.%d.id", i))
diff --git a/internal/service/searchindex/resource_search_index.go b/internal/service/searchindex/resource_search_index.go
index db54d1f9ef..66a20e9912 100644
--- a/internal/service/searchindex/resource_search_index.go
+++ b/internal/service/searchindex/resource_search_index.go
@@ -275,8 +275,8 @@ func resourceUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.
if d.Get("wait_for_index_build_completion").(bool) {
timeout := d.Timeout(schema.TimeoutUpdate)
stateConf := &retry.StateChangeConf{
- Pending: []string{"IN_PROGRESS", "MIGRATING"},
- Target: []string{"STEADY"},
+ Pending: []string{"PENDING", "BUILDING", "IN_PROGRESS", "MIGRATING"},
+ Target: []string{"READY", "STEADY"},
Refresh: resourceSearchIndexRefreshFunc(ctx, clusterName, projectID, indexID, connV2),
Timeout: timeout,
MinTimeout: 1 * time.Minute,
@@ -449,8 +449,8 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.
if d.Get("wait_for_index_build_completion").(bool) {
timeout := d.Timeout(schema.TimeoutCreate)
stateConf := &retry.StateChangeConf{
- Pending: []string{"IN_PROGRESS", "MIGRATING"},
- Target: []string{"STEADY"},
+ Pending: []string{"PENDING", "BUILDING", "IN_PROGRESS", "MIGRATING"},
+ Target: []string{"READY", "STEADY"},
Refresh: resourceSearchIndexRefreshFunc(ctx, clusterName, projectID, indexID, connV2),
Timeout: timeout,
MinTimeout: 1 * time.Minute,
diff --git a/internal/service/streamconnection/data_source_stream_connection_test.go b/internal/service/streamconnection/data_source_stream_connection_test.go
index de6e62e828..612f7c8779 100644
--- a/internal/service/streamconnection/data_source_stream_connection_test.go
+++ b/internal/service/streamconnection/data_source_stream_connection_test.go
@@ -20,8 +20,8 @@ func TestAccStreamDSStreamConnection_kafkaPlaintext(t *testing.T) {
CheckDestroy: CheckDestroyStreamConnection,
Steps: []resource.TestStep{
{
- Config: streamConnectionDataSourceConfig(kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", false)),
- Check: kafkaStreamConnectionAttributeChecks(dataSourceName, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", false, false),
+ Config: streamConnectionDataSourceConfig(kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", kafkaNetworkingPublic, false)),
+ Check: kafkaStreamConnectionAttributeChecks(dataSourceName, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", networkingTypePublic, false, false),
},
},
})
@@ -39,8 +39,8 @@ func TestAccStreamDSStreamConnection_kafkaSSL(t *testing.T) {
CheckDestroy: CheckDestroyStreamConnection,
Steps: []resource.TestStep{
{
- Config: streamConnectionDataSourceConfig(kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092", "earliest", true)),
- Check: kafkaStreamConnectionAttributeChecks(dataSourceName, instanceName, "user", "rawpassword", "localhost:9092", "earliest", true, false),
+ Config: streamConnectionDataSourceConfig(kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092", "earliest", kafkaNetworkingPublic, true)),
+ Check: kafkaStreamConnectionAttributeChecks(dataSourceName, instanceName, "user", "rawpassword", "localhost:9092", "earliest", networkingTypePublic, true, false),
},
},
})
diff --git a/internal/service/streamconnection/data_source_stream_connections_test.go b/internal/service/streamconnection/data_source_stream_connections_test.go
index 9603eb6b93..094743dfd6 100644
--- a/internal/service/streamconnection/data_source_stream_connections_test.go
+++ b/internal/service/streamconnection/data_source_stream_connections_test.go
@@ -21,7 +21,7 @@ func TestAccStreamDSStreamConnections_basic(t *testing.T) {
CheckDestroy: CheckDestroyStreamConnection,
Steps: []resource.TestStep{
{
- Config: streamConnectionsDataSourceConfig(kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", false)),
+ Config: streamConnectionsDataSourceConfig(kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", kafkaNetworkingPublic, false)),
Check: streamConnectionsAttributeChecks(dataSourceName, nil, nil, 1),
},
},
@@ -40,7 +40,7 @@ func TestAccStreamDSStreamConnections_withPageConfig(t *testing.T) {
CheckDestroy: CheckDestroyStreamConnection,
Steps: []resource.TestStep{
{
- Config: streamConnectionsWithPageAttrDataSourceConfig(kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", false)),
+ Config: streamConnectionsWithPageAttrDataSourceConfig(kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", kafkaNetworkingPublic, false)),
Check: streamConnectionsAttributeChecks(dataSourceName, admin.PtrInt(2), admin.PtrInt(1), 0),
},
},
diff --git a/internal/service/streamconnection/model_stream_connection.go b/internal/service/streamconnection/model_stream_connection.go
index 80fc6d5697..036bd24fc3 100644
--- a/internal/service/streamconnection/model_stream_connection.go
+++ b/internal/service/streamconnection/model_stream_connection.go
@@ -60,6 +60,18 @@ func NewStreamConnectionReq(ctx context.Context, plan *TFStreamConnectionModel)
}
}
+ if !plan.Networking.IsNull() && !plan.Networking.IsUnknown() {
+ networkingModel := &TFNetworkingModel{}
+ if diags := plan.Networking.As(ctx, networkingModel, basetypes.ObjectAsOptions{}); diags.HasError() {
+ return nil, diags
+ }
+ streamConnection.Networking = &admin.StreamsKafkaNetworking{
+ Access: &admin.StreamsKafkaNetworkingAccess{
+ Type: networkingModel.Access.Type.ValueStringPointer(),
+ },
+ }
+ }
+
return &streamConnection, nil
}
@@ -114,6 +126,19 @@ func NewTFStreamConnection(ctx context.Context, projID, instanceName string, cur
connectionModel.DBRoleToExecute = dbRoleToExecuteModel
}
+ connectionModel.Networking = types.ObjectNull(NetworkingObjectType.AttrTypes)
+ if apiResp.Networking != nil {
+ networkingModel, diags := types.ObjectValueFrom(ctx, NetworkingObjectType.AttrTypes, TFNetworkingModel{
+ Access: TFNetworkingAccessModel{
+ Type: types.StringPointerValue(apiResp.Networking.Access.Type),
+ },
+ })
+ if diags.HasError() {
+ return nil, diags
+ }
+ connectionModel.Networking = networkingModel
+ }
+
return &connectionModel, nil
}
diff --git a/internal/service/streamconnection/model_stream_connection_test.go b/internal/service/streamconnection/model_stream_connection_test.go
index f206b5d47c..09b5cffab2 100644
--- a/internal/service/streamconnection/model_stream_connection_test.go
+++ b/internal/service/streamconnection/model_stream_connection_test.go
@@ -24,6 +24,7 @@ const (
dbRole = "customRole"
dbRoleType = "CUSTOM"
sampleConnectionName = "sample_stream_solar"
+ networkingType = "PUBLIC"
)
var configMap = map[string]string{
@@ -67,6 +68,7 @@ func TestStreamConnectionSDKToTFModel(t *testing.T) {
Config: types.MapNull(types.StringType),
Security: types.ObjectNull(streamconnection.ConnectionSecurityObjectType.AttrTypes),
DBRoleToExecute: tfDBRoleToExecuteObject(t, dbRole, dbRoleType),
+ Networking: types.ObjectNull(streamconnection.NetworkingObjectType.AttrTypes),
},
},
{
@@ -98,6 +100,7 @@ func TestStreamConnectionSDKToTFModel(t *testing.T) {
Config: tfConfigMap(t, configMap),
Security: tfSecurityObject(t, DummyCACert, securityProtocol),
DBRoleToExecute: types.ObjectNull(streamconnection.DBRoleToExecuteObjectType.AttrTypes),
+ Networking: types.ObjectNull(streamconnection.NetworkingObjectType.AttrTypes),
},
},
{
@@ -118,6 +121,7 @@ func TestStreamConnectionSDKToTFModel(t *testing.T) {
Config: types.MapNull(types.StringType),
Security: types.ObjectNull(streamconnection.ConnectionSecurityObjectType.AttrTypes),
DBRoleToExecute: types.ObjectNull(streamconnection.DBRoleToExecuteObjectType.AttrTypes),
+ Networking: types.ObjectNull(streamconnection.NetworkingObjectType.AttrTypes),
},
},
{
@@ -149,6 +153,7 @@ func TestStreamConnectionSDKToTFModel(t *testing.T) {
Config: tfConfigMap(t, configMap),
Security: tfSecurityObject(t, DummyCACert, securityProtocol),
DBRoleToExecute: types.ObjectNull(streamconnection.DBRoleToExecuteObjectType.AttrTypes),
+ Networking: types.ObjectNull(streamconnection.NetworkingObjectType.AttrTypes),
},
},
{
@@ -168,6 +173,7 @@ func TestStreamConnectionSDKToTFModel(t *testing.T) {
Config: types.MapNull(types.StringType),
Security: types.ObjectNull(streamconnection.ConnectionSecurityObjectType.AttrTypes),
DBRoleToExecute: types.ObjectNull(streamconnection.DBRoleToExecuteObjectType.AttrTypes),
+ Networking: types.ObjectNull(streamconnection.NetworkingObjectType.AttrTypes),
},
},
}
@@ -212,6 +218,11 @@ func TestStreamConnectionsSDKToTFModel(t *testing.T) {
Protocol: admin.PtrString(securityProtocol),
BrokerPublicCertificate: admin.PtrString(DummyCACert),
},
+ Networking: &admin.StreamsKafkaNetworking{
+ Access: &admin.StreamsKafkaNetworkingAccess{
+ Type: admin.PtrString(networkingType),
+ },
+ },
},
{
Name: admin.PtrString(connectionName),
@@ -253,6 +264,7 @@ func TestStreamConnectionsSDKToTFModel(t *testing.T) {
Config: tfConfigMap(t, configMap),
Security: tfSecurityObject(t, DummyCACert, securityProtocol),
DBRoleToExecute: types.ObjectNull(streamconnection.DBRoleToExecuteObjectType.AttrTypes),
+ Networking: tfNetworkingObject(t, networkingType),
},
{
ID: types.StringValue(fmt.Sprintf("%s-%s-%s", instanceName, dummyProjectID, connectionName)),
@@ -265,6 +277,7 @@ func TestStreamConnectionsSDKToTFModel(t *testing.T) {
Config: types.MapNull(types.StringType),
Security: types.ObjectNull(streamconnection.ConnectionSecurityObjectType.AttrTypes),
DBRoleToExecute: tfDBRoleToExecuteObject(t, dbRole, dbRoleType),
+ Networking: types.ObjectNull(streamconnection.NetworkingObjectType.AttrTypes),
},
{
ID: types.StringValue(fmt.Sprintf("%s-%s-%s", instanceName, dummyProjectID, sampleConnectionName)),
@@ -277,6 +290,7 @@ func TestStreamConnectionsSDKToTFModel(t *testing.T) {
Config: types.MapNull(types.StringType),
Security: types.ObjectNull(streamconnection.ConnectionSecurityObjectType.AttrTypes),
DBRoleToExecute: types.ObjectNull(streamconnection.DBRoleToExecuteObjectType.AttrTypes),
+ Networking: types.ObjectNull(streamconnection.NetworkingObjectType.AttrTypes),
},
},
},
@@ -470,3 +484,16 @@ func tfDBRoleToExecuteObject(t *testing.T, role, roleType string) types.Object {
}
return auth
}
+
+func tfNetworkingObject(t *testing.T, networkingType string) types.Object {
+ t.Helper()
+ networking, diags := types.ObjectValueFrom(context.Background(), streamconnection.NetworkingObjectType.AttrTypes, streamconnection.TFNetworkingModel{
+ Access: streamconnection.TFNetworkingAccessModel{
+ Type: types.StringValue(networkingType),
+ },
+ })
+ if diags.HasError() {
+ t.Errorf("failed to create terraform data model: %s", diags.Errors()[0].Summary())
+ }
+ return networking
+}
diff --git a/internal/service/streamconnection/resource_schema.go b/internal/service/streamconnection/resource_schema.go
index be3ec15d42..c28cc4ca83 100644
--- a/internal/service/streamconnection/resource_schema.go
+++ b/internal/service/streamconnection/resource_schema.go
@@ -5,6 +5,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
@@ -16,6 +17,9 @@ func ResourceSchema(ctx context.Context) schema.Schema {
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
+ PlanModifiers: []planmodifier.String{
+ stringplanmodifier.UseStateForUnknown(),
+ },
},
"project_id": schema.StringAttribute{
Required: true,
@@ -95,6 +99,23 @@ func ResourceSchema(ctx context.Context) schema.Schema {
},
},
},
+ "networking": schema.SingleNestedAttribute{
+ Optional: true,
+ Computed: true,
+ PlanModifiers: []planmodifier.Object{
+ objectplanmodifier.UseStateForUnknown(),
+ },
+ Attributes: map[string]schema.Attribute{
+ "access": schema.SingleNestedAttribute{
+ Required: true,
+ Attributes: map[string]schema.Attribute{
+ "type": schema.StringAttribute{
+ Required: true,
+ },
+ },
+ },
+ },
+ },
},
}
}
diff --git a/internal/service/streamconnection/resource_stream_connection.go b/internal/service/streamconnection/resource_stream_connection.go
index f4f571ce23..56ac82bb2f 100644
--- a/internal/service/streamconnection/resource_stream_connection.go
+++ b/internal/service/streamconnection/resource_stream_connection.go
@@ -5,12 +5,14 @@ import (
"errors"
"net/http"
"regexp"
+ "time"
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
- "github.com/hashicorp/terraform-plugin-framework/types"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
+
+ "github.com/hashicorp/terraform-plugin-framework/types"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
)
@@ -43,6 +45,7 @@ type TFStreamConnectionModel struct {
Config types.Map `tfsdk:"config"`
Security types.Object `tfsdk:"security"`
DBRoleToExecute types.Object `tfsdk:"db_role_to_execute"`
+ Networking types.Object `tfsdk:"networking"`
}
type TFConnectionAuthenticationModel struct {
@@ -77,6 +80,22 @@ var DBRoleToExecuteObjectType = types.ObjectType{AttrTypes: map[string]attr.Type
"type": types.StringType,
}}
+type TFNetworkingAccessModel struct {
+ Type types.String `tfsdk:"type"`
+}
+
+var NetworkingAccessObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{
+ "type": types.StringType,
+}}
+
+type TFNetworkingModel struct {
+ Access TFNetworkingAccessModel `tfsdk:"access"`
+}
+
+var NetworkingObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{
+ "access": NetworkingAccessObjectType,
+}}
+
func (r *streamConnectionRS) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = ResourceSchema(ctx)
conversion.UpdateSchemaDescription(&resp.Schema)
@@ -181,7 +200,7 @@ func (r *streamConnectionRS) Delete(ctx context.Context, req resource.DeleteRequ
projectID := streamConnectionState.ProjectID.ValueString()
instanceName := streamConnectionState.InstanceName.ValueString()
connectionName := streamConnectionState.ConnectionName.ValueString()
- if _, _, err := connV2.StreamsApi.DeleteStreamConnection(ctx, projectID, instanceName, connectionName).Execute(); err != nil {
+ if err := DeleteStreamConnection(ctx, connV2.StreamsApi, projectID, instanceName, connectionName, time.Minute); err != nil {
resp.Diagnostics.AddError("error deleting resource", err.Error())
return
}
diff --git a/internal/service/streamconnection/resource_stream_connection_migration_test.go b/internal/service/streamconnection/resource_stream_connection_migration_test.go
index 77202bbd65..de1596577f 100644
--- a/internal/service/streamconnection/resource_stream_connection_migration_test.go
+++ b/internal/service/streamconnection/resource_stream_connection_migration_test.go
@@ -4,76 +4,15 @@ import (
_ "embed"
"testing"
- "github.com/hashicorp/terraform-plugin-testing/helper/resource"
- "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/mig"
)
func TestMigStreamRSStreamConnection_kafkaPlaintext(t *testing.T) {
- var (
- resourceName = "mongodbatlas_stream_connection.test"
- projectID = acc.ProjectIDExecution(t)
- instanceName = acc.RandomName()
- config = kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", false)
- )
mig.SkipIfVersionBelow(t, "1.16.0") // when reached GA
-
- resource.ParallelTest(t, resource.TestCase{
- PreCheck: func() { acc.PreCheckBasic(t) },
- CheckDestroy: CheckDestroyStreamConnection,
- Steps: []resource.TestStep{
- {
- ExternalProviders: mig.ExternalProviders(),
- Config: config,
- Check: kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", false, true),
- },
- mig.TestStepCheckEmptyPlan(config),
- },
- })
-}
-
-func TestMigStreamRSStreamConnection_kafkaSSL(t *testing.T) {
- var (
- resourceName = "mongodbatlas_stream_connection.test"
- projectID = acc.ProjectIDExecution(t)
- instanceName = acc.RandomName()
- config = kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092", "earliest", true)
- )
- mig.SkipIfVersionBelow(t, "1.16.0") // when reached GA
-
- resource.ParallelTest(t, resource.TestCase{
- PreCheck: func() { acc.PreCheckBasic(t) },
- CheckDestroy: CheckDestroyStreamConnection,
- Steps: []resource.TestStep{
- {
- ExternalProviders: mig.ExternalProviders(),
- Config: config,
- Check: kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user", "rawpassword", "localhost:9092", "earliest", true, true),
- },
- mig.TestStepCheckEmptyPlan(config),
- },
- })
+ mig.CreateAndRunTest(t, testCaseKafkaPlaintext(t))
}
func TestMigStreamRSStreamConnection_cluster(t *testing.T) {
- var (
- resourceName = "mongodbatlas_stream_connection.test"
- projectID, clusterName = acc.ClusterNameExecution(t)
- instanceName = acc.RandomName()
- config = clusterStreamConnectionConfig(projectID, instanceName, clusterName)
- )
mig.SkipIfVersionBelow(t, "1.16.0") // when reached GA
-
- resource.ParallelTest(t, resource.TestCase{
- PreCheck: func() { acc.PreCheckBasic(t) },
- CheckDestroy: CheckDestroyStreamConnection,
- Steps: []resource.TestStep{
- {
- ExternalProviders: mig.ExternalProviders(),
- Config: config,
- Check: clusterStreamConnectionAttributeChecks(resourceName, clusterName),
- },
- mig.TestStepCheckEmptyPlan(config),
- },
- })
+ mig.CreateAndRunTest(t, testCaseCluster(t))
}
diff --git a/internal/service/streamconnection/resource_stream_connection_test.go b/internal/service/streamconnection/resource_stream_connection_test.go
index f65dce618b..f7cebd7074 100644
--- a/internal/service/streamconnection/resource_stream_connection_test.go
+++ b/internal/service/streamconnection/resource_stream_connection_test.go
@@ -9,12 +9,63 @@ import (
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/mig"
)
-//go:embed testdata/dummy-ca.pem
-var DummyCACert string
+var (
+ //go:embed testdata/dummy-ca.pem
+ DummyCACert string
+ networkingTypeVPC = "VPC"
+ networkingTypePublic = "PUBLIC"
+ kafkaNetworkingVPC = fmt.Sprintf(`networking = {
+ access = {
+ type = %[1]q
+ }
+ }`, networkingTypeVPC)
+ kafkaNetworkingPublic = fmt.Sprintf(`networking = {
+ access = {
+ type = %[1]q
+ }
+ }`, networkingTypePublic)
+)
func TestAccStreamRSStreamConnection_kafkaPlaintext(t *testing.T) {
+ testCase := testCaseKafkaPlaintext(t)
+ resource.ParallelTest(t, *testCase)
+}
+
+func testCaseKafkaPlaintext(t *testing.T) *resource.TestCase {
+ t.Helper()
+ var (
+ resourceName = "mongodbatlas_stream_connection.test"
+ projectID = acc.ProjectIDExecution(t)
+ instanceName = acc.RandomName()
+ )
+ return &resource.TestCase{
+ PreCheck: func() { acc.PreCheckBasic(t) },
+ ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
+ CheckDestroy: CheckDestroyStreamConnection,
+ Steps: []resource.TestStep{
+ {
+ Config: kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", "", false),
+ Check: kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", networkingTypePublic, false, true),
+ },
+ {
+ Config: kafkaStreamConnectionConfig(projectID, instanceName, "user2", "otherpassword", "localhost:9093", "latest", kafkaNetworkingPublic, false),
+ Check: kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user2", "otherpassword", "localhost:9093", "latest", networkingTypePublic, false, true),
+ },
+ {
+ ResourceName: resourceName,
+ ImportStateIdFunc: checkStreamConnectionImportStateIDFunc(resourceName),
+ ImportState: true,
+ ImportStateVerify: true,
+ ImportStateVerifyIgnore: []string{"authentication.password"},
+ },
+ },
+ }
+}
+
+func TestAccStreamRSStreamConnection_kafkaNetworkingVPC(t *testing.T) {
var (
resourceName = "mongodbatlas_stream_connection.test"
projectID = acc.ProjectIDExecution(t)
@@ -26,12 +77,14 @@ func TestAccStreamRSStreamConnection_kafkaPlaintext(t *testing.T) {
CheckDestroy: CheckDestroyStreamConnection,
Steps: []resource.TestStep{
{
- Config: kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", false),
- Check: kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user", "rawpassword", "localhost:9092,localhost:9092", "earliest", false, true),
+ Config: kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092", "earliest", kafkaNetworkingPublic, true),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user", "rawpassword", "localhost:9092", "earliest", networkingTypePublic, true, true),
+ ),
},
{
- Config: kafkaStreamConnectionConfig(projectID, instanceName, "user2", "otherpassword", "localhost:9093", "latest", false),
- Check: kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user2", "otherpassword", "localhost:9093", "latest", false, true),
+ Config: kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092", "earliest", kafkaNetworkingVPC, true),
+ Check: kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user", "rawpassword", "localhost:9092", "earliest", networkingTypeVPC, true, true),
},
{
ResourceName: resourceName,
@@ -56,8 +109,8 @@ func TestAccStreamRSStreamConnection_kafkaSSL(t *testing.T) {
CheckDestroy: CheckDestroyStreamConnection,
Steps: []resource.TestStep{
{
- Config: kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092", "earliest", true),
- Check: kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user", "rawpassword", "localhost:9092", "earliest", true, true),
+ Config: kafkaStreamConnectionConfig(projectID, instanceName, "user", "rawpassword", "localhost:9092", "earliest", kafkaNetworkingPublic, true),
+ Check: kafkaStreamConnectionAttributeChecks(resourceName, instanceName, "user", "rawpassword", "localhost:9092", "earliest", networkingTypePublic, true, true),
},
{
ResourceName: resourceName,
@@ -71,12 +124,18 @@ func TestAccStreamRSStreamConnection_kafkaSSL(t *testing.T) {
}
func TestAccStreamRSStreamConnection_cluster(t *testing.T) {
+ testCase := testCaseCluster(t)
+ resource.ParallelTest(t, *testCase)
+}
+
+func testCaseCluster(t *testing.T) *resource.TestCase {
+ t.Helper()
var (
resourceName = "mongodbatlas_stream_connection.test"
projectID, clusterName = acc.ClusterNameExecution(t)
instanceName = acc.RandomName()
)
- resource.ParallelTest(t, resource.TestCase{
+ return &resource.TestCase{
PreCheck: func() { acc.PreCheckBasic(t) },
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
CheckDestroy: CheckDestroyStreamConnection,
@@ -92,7 +151,7 @@ func TestAccStreamRSStreamConnection_cluster(t *testing.T) {
ImportStateVerify: true,
},
},
- })
+ }
}
func TestAccStreamRSStreamConnection_sample(t *testing.T) {
@@ -121,7 +180,7 @@ func TestAccStreamRSStreamConnection_sample(t *testing.T) {
})
}
-func kafkaStreamConnectionConfig(projectID, instanceName, username, password, bootstrapServers, configValue string, useSSL bool) string {
+func kafkaStreamConnectionConfig(projectID, instanceName, username, password, bootstrapServers, configValue, networkingConfig string, useSSL bool) string {
projectAndStreamInstanceConfig := acc.StreamInstanceConfig(projectID, instanceName, "VIRGINIA_USA", "AWS")
securityConfig := `
security = {
@@ -135,7 +194,6 @@ func kafkaStreamConnectionConfig(projectID, instanceName, username, password, bo
protocol = "SSL"
}`, DummyCACert)
}
-
return fmt.Sprintf(`
%[1]s
@@ -154,8 +212,9 @@ func kafkaStreamConnectionConfig(projectID, instanceName, username, password, bo
"auto.offset.reset": %[5]q
}
%[6]s
+ %[7]s
}
- `, projectAndStreamInstanceConfig, username, password, bootstrapServers, configValue, securityConfig)
+ `, projectAndStreamInstanceConfig, username, password, bootstrapServers, configValue, networkingConfig, securityConfig)
}
func sampleStreamConnectionConfig(projectID, instanceName, sampleName string) string {
@@ -186,18 +245,21 @@ func sampleStreamConnectionAttributeChecks(
}
func kafkaStreamConnectionAttributeChecks(
- resourceName, instanceName, username, password, bootstrapServers, configValue string, usesSSL, checkPassword bool) resource.TestCheckFunc {
+ resourceName, instanceName, username, password, bootstrapServers, configValue, networkingType string, usesSSL, checkPassword bool) resource.TestCheckFunc {
resourceChecks := []resource.TestCheckFunc{
checkStreamConnectionExists(),
resource.TestCheckResourceAttrSet(resourceName, "project_id"),
- resource.TestCheckResourceAttrSet(resourceName, "instance_name"),
resource.TestCheckResourceAttrSet(resourceName, "connection_name"),
resource.TestCheckResourceAttr(resourceName, "type", "Kafka"),
+ resource.TestCheckResourceAttr(resourceName, "instance_name", instanceName),
resource.TestCheckResourceAttr(resourceName, "authentication.mechanism", "PLAIN"),
resource.TestCheckResourceAttr(resourceName, "authentication.username", username),
resource.TestCheckResourceAttr(resourceName, "bootstrap_servers", bootstrapServers),
resource.TestCheckResourceAttr(resourceName, "config.auto.offset.reset", configValue),
}
+ if mig.IsProviderVersionAtLeast("1.25.0") {
+ resourceChecks = append(resourceChecks, resource.TestCheckResourceAttr(resourceName, "networking.access.type", networkingType))
+ }
if checkPassword {
resourceChecks = append(resourceChecks, resource.TestCheckResourceAttr(resourceName, "authentication.password", password))
}
diff --git a/internal/service/streamconnection/state_transition.go b/internal/service/streamconnection/state_transition.go
new file mode 100644
index 0000000000..6a21ca9b49
--- /dev/null
+++ b/internal/service/streamconnection/state_transition.go
@@ -0,0 +1,25 @@
+package streamconnection
+
+import (
+ "context"
+ "time"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
+ "go.mongodb.org/atlas-sdk/v20241113003/admin"
+)
+
+func DeleteStreamConnection(ctx context.Context, api admin.StreamsApi, projectID, instanceName, connectionName string, timeout time.Duration) error {
+ return retry.RetryContext(ctx, timeout, func() *retry.RetryError {
+ _, resp, err := api.DeleteStreamConnection(ctx, projectID, instanceName, connectionName).Execute()
+ if err == nil {
+ return nil
+ }
+ if admin.IsErrorCode(err, "STREAM_KAFKA_CONNECTION_IS_DEPLOYING") {
+ return retry.RetryableError(err)
+ }
+ if resp != nil && resp.StatusCode == 404 {
+ return nil
+ }
+ return retry.NonRetryableError(err)
+ })
+}
diff --git a/internal/service/streamconnection/state_transition_test.go b/internal/service/streamconnection/state_transition_test.go
new file mode 100644
index 0000000000..e42a263e95
--- /dev/null
+++ b/internal/service/streamconnection/state_transition_test.go
@@ -0,0 +1,51 @@
+package streamconnection_test
+
+import (
+ "context"
+ "net/http"
+ "testing"
+ "time"
+
+ "go.mongodb.org/atlas-sdk/v20241113003/admin"
+ "go.mongodb.org/atlas-sdk/v20241113003/mockadmin"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/service/streamconnection"
+)
+
+func TestStreamConnectionDeletion(t *testing.T) {
+ var (
+ m = mockadmin.NewStreamsApi(t)
+ projectID = "projectID"
+ instanceName = "instanceName"
+ connectionName = "connectionName"
+ errDeleteInProgress = admin.ApiError{
+ ErrorCode: "STREAM_KAFKA_CONNECTION_IS_DEPLOYING",
+ Error: 409,
+ }
+ genericErr = admin.GenericOpenAPIError{}
+ )
+ genericErr.SetError("error")
+ genericErr.SetModel(errDeleteInProgress)
+ m.EXPECT().DeleteStreamConnection(mock.Anything, projectID, instanceName, connectionName).Return(admin.DeleteStreamConnectionApiRequest{ApiService: m}).Times(3)
+ m.EXPECT().DeleteStreamConnectionExecute(mock.Anything).Once().Return(nil, nil, &genericErr)
+ m.EXPECT().DeleteStreamConnectionExecute(mock.Anything).Once().Return(nil, nil, &genericErr)
+ m.EXPECT().DeleteStreamConnectionExecute(mock.Anything).Once().Return(nil, nil, nil)
+ err := streamconnection.DeleteStreamConnection(context.Background(), m, projectID, instanceName, connectionName, time.Minute)
+ assert.NoError(t, err)
+}
+
+func TestStreamConnectionDeletion404(t *testing.T) {
+ var (
+ m = mockadmin.NewStreamsApi(t)
+ projectID = "projectID"
+ instanceName = "instanceName"
+ connectionName = "connectionName"
+ )
+ m.EXPECT().DeleteStreamConnection(mock.Anything, projectID, instanceName, connectionName).Return(admin.DeleteStreamConnectionApiRequest{ApiService: m}).Once()
+ m.EXPECT().DeleteStreamConnectionExecute(mock.Anything).Once().Return(nil, &http.Response{StatusCode: 404}, nil)
+ err := streamconnection.DeleteStreamConnection(context.Background(), m, projectID, instanceName, connectionName, time.Minute)
+ assert.NoError(t, err)
+}
diff --git a/internal/service/team/update_user.go b/internal/service/team/update_user.go
index 9b9716ed4a..941900559c 100644
--- a/internal/service/team/update_user.go
+++ b/internal/service/team/update_user.go
@@ -77,7 +77,7 @@ func GetChangesForTeamUsers(currentUsers, newUsers []admin.CloudAppUser) (toAdd,
func InitUserSet(users []admin.CloudAppUser) map[string]bool {
usersSet := make(map[string]bool, len(users))
- for i := 0; i < len(users); i++ {
+ for i := range len(users) {
usersSet[users[i].GetId()] = true
}
return usersSet
diff --git a/internal/testutil/acc/advanced_cluster_schema_v2.go b/internal/testutil/acc/advanced_cluster_schema_v2.go
index 59d8a2047c..3a49779ca5 100644
--- a/internal/testutil/acc/advanced_cluster_schema_v2.go
+++ b/internal/testutil/acc/advanced_cluster_schema_v2.go
@@ -4,81 +4,46 @@ import (
"strings"
"testing"
- "github.com/hashicorp/hcl/v2"
- "github.com/hashicorp/hcl/v2/hclparse"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
- "github.com/hashicorp/terraform-plugin-testing/terraform"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/hcl"
"github.com/zclconf/go-cty/cty"
"github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
)
func TestCheckResourceAttrSchemaV2(isAcc bool, name, key, value string) resource.TestCheckFunc {
- if skipChecks(isAcc, name) {
- return testCheckFuncAlwaysPass
- }
return resource.TestCheckResourceAttr(name, AttrNameToSchemaV2(isAcc, key), value)
}
func TestCheckResourceAttrSetSchemaV2(isAcc bool, name, key string) resource.TestCheckFunc {
- if skipChecks(isAcc, name) {
- return testCheckFuncAlwaysPass
- }
return resource.TestCheckResourceAttrSet(name, AttrNameToSchemaV2(isAcc, key))
}
func TestCheckResourceAttrWithSchemaV2(isAcc bool, name, key string, checkValueFunc resource.CheckResourceAttrWithFunc) resource.TestCheckFunc {
- if skipChecks(isAcc, name) {
- return testCheckFuncAlwaysPass
- }
return resource.TestCheckResourceAttrWith(name, AttrNameToSchemaV2(isAcc, key), checkValueFunc)
}
func TestCheckTypeSetElemNestedAttrsSchemaV2(isAcc bool, name, key string, values map[string]string) resource.TestCheckFunc {
- if skipChecks(isAcc, name) {
- return testCheckFuncAlwaysPass
- }
return resource.TestCheckTypeSetElemNestedAttrs(name, AttrNameToSchemaV2(isAcc, key), values)
}
-func testCheckFuncAlwaysPass(*terraform.State) error {
- return nil
-}
-
func AddAttrChecksSchemaV2(isAcc bool, name string, checks []resource.TestCheckFunc, mapChecks map[string]string) []resource.TestCheckFunc {
- if skipChecks(isAcc, name) {
- return []resource.TestCheckFunc{}
- }
return AddAttrChecks(name, checks, ConvertToSchemaV2AttrsMap(isAcc, mapChecks))
}
func AddAttrSetChecksSchemaV2(isAcc bool, name string, checks []resource.TestCheckFunc, attrNames ...string) []resource.TestCheckFunc {
- if skipChecks(isAcc, name) {
- return []resource.TestCheckFunc{}
- }
return AddAttrSetChecks(name, checks, ConvertToSchemaV2AttrsSet(isAcc, attrNames)...)
}
func AddAttrChecksPrefixSchemaV2(isAcc bool, name string, checks []resource.TestCheckFunc, mapChecks map[string]string, prefix string, skipNames ...string) []resource.TestCheckFunc {
- if skipChecks(isAcc, name) {
- return []resource.TestCheckFunc{}
- }
return AddAttrChecksPrefix(name, checks, ConvertToSchemaV2AttrsMap(isAcc, mapChecks), prefix, skipNames...)
}
-func skipChecks(isAcc bool, name string) bool {
- if !config.AdvancedClusterV2Schema() || !isAcc {
- return false
- }
- return strings.HasPrefix(name, "data.mongodbatlas_advanced_cluster")
-}
-
func ConvertToSchemaV2AttrsMap(isAcc bool, attrsMap map[string]string) map[string]string {
- if !config.AdvancedClusterV2Schema() || !isAcc {
+ if skipSchemaV2Work(isAcc) {
return attrsMap
}
ret := make(map[string]string, len(attrsMap))
@@ -89,7 +54,7 @@ func ConvertToSchemaV2AttrsMap(isAcc bool, attrsMap map[string]string) map[strin
}
func ConvertToSchemaV2AttrsSet(isAcc bool, attrsSet []string) []string {
- if !config.AdvancedClusterV2Schema() || !isAcc {
+ if skipSchemaV2Work(isAcc) {
return attrsSet
}
ret := make([]string, 0, len(attrsSet))
@@ -106,10 +71,11 @@ var tpfSingleNestedAttrs = []string{
"auto_scaling", // includes analytics_auto_scaling
"advanced_configuration",
"bi_connector_config",
+ "pinned_fcv",
}
func AttrNameToSchemaV2(isAcc bool, name string) string {
- if !config.AdvancedClusterV2Schema() || !isAcc {
+ if skipSchemaV2Work(isAcc) {
return name
}
for _, singleAttrName := range tpfSingleNestedAttrs {
@@ -120,10 +86,10 @@ func AttrNameToSchemaV2(isAcc bool, name string) string {
func ConvertAdvancedClusterToSchemaV2(t *testing.T, isAcc bool, def string) string {
t.Helper()
- if !config.AdvancedClusterV2Schema() || !isAcc {
+ if skipSchemaV2Work(isAcc) {
return def
}
- parse := getDefParser(t, def)
+ parse := hcl.GetDefParser(t, def)
for _, resource := range parse.Body().Blocks() {
isResource := resource.Type() == "resource"
resourceName := resource.Labels()[0]
@@ -131,19 +97,21 @@ func ConvertAdvancedClusterToSchemaV2(t *testing.T, isAcc bool, def string) stri
continue
}
writeBody := resource.Body()
- convertAttrs(t, "labels", writeBody, true, getAttrVal)
- convertAttrs(t, "tags", writeBody, true, getAttrVal)
convertAttrs(t, "replication_specs", writeBody, true, getReplicationSpecs)
- convertAttrs(t, "advanced_configuration", writeBody, false, getAttrVal)
- convertAttrs(t, "bi_connector_config", writeBody, false, getAttrVal)
+ convertAttrs(t, "advanced_configuration", writeBody, false, hcl.GetAttrVal)
+ convertAttrs(t, "bi_connector_config", writeBody, false, hcl.GetAttrVal)
}
content := parse.Bytes()
return string(content)
}
+func skipSchemaV2Work(isAcc bool) bool {
+ return !config.AdvancedClusterV2Schema() || !isAcc
+}
+
func AssertEqualHCL(t *testing.T, expected, actual string, msgAndArgs ...interface{}) {
t.Helper()
- assert.Equal(t, canonicalHCL(t, expected), canonicalHCL(t, actual), msgAndArgs...)
+ assert.Equal(t, hcl.CanonicalHCL(t, expected), hcl.CanonicalHCL(t, actual), msgAndArgs...)
}
func convertAttrs(t *testing.T, name string, writeBody *hclwrite.Body, isList bool, getOneAttr func(*testing.T, *hclsyntax.Body) cty.Value) {
@@ -154,7 +122,7 @@ func convertAttrs(t *testing.T, name string, writeBody *hclwrite.Body, isList bo
if match == nil {
break
}
- vals = append(vals, getOneAttr(t, getBlockBody(t, match)))
+ vals = append(vals, getOneAttr(t, hcl.GetBlockBody(t, match)))
writeBody.RemoveBlock(match) // TODO: RemoveBlock doesn't remove newline just after the block so an extra line is added
}
if len(vals) == 0 {
@@ -174,45 +142,11 @@ func getReplicationSpecs(t *testing.T, body *hclsyntax.Body) cty.Value {
var vals []cty.Value
for _, block := range body.Blocks {
assert.Equal(t, name, block.Type, "unexpected block type: %s", block.Type)
- vals = append(vals, getAttrVal(t, block.Body))
+ vals = append(vals, hcl.GetAttrVal(t, block.Body))
}
- return cty.ObjectVal(map[string]cty.Value{
+ attributeValues := map[string]cty.Value{
name: cty.TupleVal(vals),
- })
-}
-
-func getAttrVal(t *testing.T, body *hclsyntax.Body) cty.Value {
- t.Helper()
- ret := make(map[string]cty.Value)
- for name, attr := range body.Attributes {
- val, diags := attr.Expr.Value(nil)
- require.False(t, diags.HasErrors(), "failed to parse attribute %s: %s", name, diags.Error())
- ret[name] = val
- }
- for _, block := range body.Blocks {
- ret[block.Type] = getAttrVal(t, block.Body)
}
- return cty.ObjectVal(ret)
-}
-
-func canonicalHCL(t *testing.T, def string) string {
- t.Helper()
- return string(getDefParser(t, def).Bytes())
-}
-
-func getDefParser(t *testing.T, def string) *hclwrite.File {
- t.Helper()
- parser, diags := hclwrite.ParseConfig([]byte(def), "", hcl.Pos{Line: 1, Column: 1})
- require.False(t, diags.HasErrors(), "failed to parse def: %s", diags.Error())
- return parser
-}
-
-func getBlockBody(t *testing.T, block *hclwrite.Block) *hclsyntax.Body {
- t.Helper()
- parser, diags := hclparse.NewParser().ParseHCL(block.Body().BuildTokens(nil).Bytes(), "")
- require.False(t, diags.HasErrors(), "failed to parse block: %s", diags.Error())
-
- body, ok := parser.Body.(*hclsyntax.Body)
- require.True(t, ok, "unexpected *hclsyntax.Body type: %T", parser.Body)
- return body
+ hcl.AddAttributes(t, body, attributeValues)
+ return cty.ObjectVal(attributeValues)
}
diff --git a/internal/testutil/acc/advanced_cluster_schema_v2_test.go b/internal/testutil/acc/advanced_cluster_schema_v2_test.go
index 98848f2925..e5faab26f6 100644
--- a/internal/testutil/acc/advanced_cluster_schema_v2_test.go
+++ b/internal/testutil/acc/advanced_cluster_schema_v2_test.go
@@ -56,6 +56,7 @@ func TestConvertAdvancedClusterToSchemaV2(t *testing.T) {
cluster_type = "SHARDED"
replication_specs {
+ zone_name = "zone1"
region_configs {
electable_specs {
disk_size_gb = 10
@@ -151,30 +152,33 @@ func TestConvertAdvancedClusterToSchemaV2(t *testing.T) {
cluster_type = "SHARDED"
-
-
-
-
-
-
- labels = [{
+ tags {
+ key = "Key Tag 2"
+ value = "Value Tag 2"
+ }
+
+ labels {
key = "Key Label 1"
value = "Value Label 1"
- }, {
+ }
+
+ tags {
+ key = "Key Tag 1"
+ value = "Value Tag 1"
+ }
+
+ labels {
key = "Key Label 2"
value = "Value Label 2"
- }, {
+ }
+
+ labels {
key = "Key Label 3"
value = "Value Label 3"
- }]
- tags = [{
- key = "Key Tag 2"
- value = "Value Tag 2"
- }, {
- key = "Key Tag 1"
- value = "Value Tag 1"
- }]
+ }
+
+
replication_specs = [{
region_configs = [{
analytics_specs = {
@@ -198,7 +202,8 @@ func TestConvertAdvancedClusterToSchemaV2(t *testing.T) {
priority = 6
provider_name = "AZURE"
region_name = "US_EAST_2"
- }]
+ }]
+ zone_name = "zone1"
}, {
region_configs = [{
analytics_specs = {
diff --git a/internal/testutil/acc/atlas.go b/internal/testutil/acc/atlas.go
index 4ae0de5c24..df52eca773 100644
--- a/internal/testutil/acc/atlas.go
+++ b/internal/testutil/acc/atlas.go
@@ -102,9 +102,6 @@ func projectIDLocal(tb testing.TB) string {
if id == "" {
return ""
}
- if InCI() {
- tb.Fatal("MONGODB_ATLAS_PROJECT_ID can't be used in CI")
- }
tb.Logf("Using MONGODB_ATLAS_PROJECT_ID: %s", id)
return id
}
diff --git a/internal/testutil/acc/independent_shard_scaling.go b/internal/testutil/acc/independent_shard_scaling.go
new file mode 100644
index 0000000000..7dc3f1e544
--- /dev/null
+++ b/internal/testutil/acc/independent_shard_scaling.go
@@ -0,0 +1,49 @@
+package acc
+
+import (
+ "context"
+ "io"
+ "net/http"
+ "os"
+
+ "github.com/mongodb-forks/digest"
+)
+
+func GetIndependentShardScalingMode(ctx context.Context, projectID, clusterName string) (*string, *http.Response, error) {
+ baseURL := os.Getenv("MONGODB_ATLAS_BASE_URL")
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, baseURL+"test/utils/auth/groups/"+projectID+"/clusters/"+clusterName+"/independentShardScalingMode", http.NoBody)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ req.Header.Add("Accept", "*/*")
+
+ transport := digest.NewTransport(os.Getenv("MONGODB_ATLAS_PUBLIC_KEY"), os.Getenv("MONGODB_ATLAS_PRIVATE_KEY"))
+ httpClient, err := transport.Client()
+ if err != nil {
+ return nil, nil, err
+ }
+
+ resp, err := httpClient.Do(req)
+ if err != nil || resp == nil {
+ return nil, resp, err
+ }
+
+ var result *string
+ result, err = decode(resp.Body)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return result, resp, nil
+}
+
+func decode(body io.ReadCloser) (*string, error) {
+ buf, err := io.ReadAll(body)
+ _ = body.Close()
+ if err != nil {
+ return nil, err
+ }
+ result := string(buf)
+ return &result, nil
+}
diff --git a/internal/testutil/acc/pre_check.go b/internal/testutil/acc/pre_check.go
index cd6a6ba83b..3ceee361f5 100644
--- a/internal/testutil/acc/pre_check.go
+++ b/internal/testutil/acc/pre_check.go
@@ -148,6 +148,13 @@ func PreCheckGovBasic(tb testing.TB) {
tb.Fatal("`MONGODB_ATLAS_GOV_BASE_URL`, `MONGODB_ATLAS_GOV_PUBLIC_KEY`, `MONGODB_ATLAS_GOV_PRIVATE_KEY`and `MONGODB_ATLAS_GOV_ORG_ID` must be set for acceptance testing")
}
}
+func PreCheckPublicKey2(tb testing.TB) {
+ tb.Helper()
+ if os.Getenv("MONGODB_ATLAS_PUBLIC_KEY_READ_ONLY") == "" ||
+ os.Getenv("MONGODB_ATLAS_PRIVATE_KEY_READ_ONLY") == "" {
+ tb.Fatal("`MONGODB_ATLAS_PUBLIC_KEY_READ_ONLY`, `MONGODB_ATLAS_PRIVATE_KEY_READ_ONLY` must be set for acceptance testing")
+ }
+}
func PreCheckGPCEnv(tb testing.TB) {
tb.Helper()
diff --git a/internal/testutil/acc/provider.go b/internal/testutil/acc/provider.go
index 435d5bd344..bd192a2331 100644
--- a/internal/testutil/acc/provider.go
+++ b/internal/testutil/acc/provider.go
@@ -97,6 +97,10 @@ func ConfigGovProvider() string {
return configProvider(os.Getenv("MONGODB_ATLAS_GOV_PUBLIC_KEY"), os.Getenv("MONGODB_ATLAS_GOV_PRIVATE_KEY"), os.Getenv("MONGODB_ATLAS_GOV_BASE_URL"))
}
+func ConfigReadOnlyProvider() string {
+ return configProvider(os.Getenv("MONGODB_ATLAS_PUBLIC_KEY_READ_ONLY"), os.Getenv("MONGODB_ATLAS_PRIVATE_KEY_READ_ONLY"), os.Getenv("MONGODB_ATLAS_BASE_URL"))
+}
+
// configAzapiProvider creates a new azure/azapi provider with credentials explicit in config.
// This will authorize the provider for a client
func ConfigAzapiProvider(subscriptionID, clientID, clientSecret, tenantID string) string {
diff --git a/internal/testutil/hcl/common.go b/internal/testutil/hcl/common.go
new file mode 100644
index 0000000000..3ca51adcda
--- /dev/null
+++ b/internal/testutil/hcl/common.go
@@ -0,0 +1,101 @@
+package hcl
+
+import (
+ "context"
+ "io"
+ "os"
+ "strings"
+ "sync"
+ "testing"
+
+ "github.com/hashicorp/go-version"
+ "github.com/hashicorp/hc-install/product"
+ "github.com/hashicorp/hc-install/releases"
+
+ "github.com/hashicorp/hcl/v2"
+ "github.com/hashicorp/hcl/v2/hclparse"
+ "github.com/hashicorp/hcl/v2/hclsyntax"
+ "github.com/hashicorp/hcl/v2/hclwrite"
+ "github.com/hashicorp/terraform-exec/tfexec"
+ "github.com/zclconf/go-cty/cty"
+
+ "github.com/stretchr/testify/require"
+)
+
+var tf *tfexec.Terraform
+var tfMutex sync.Mutex
+
+func getTF() *tfexec.Terraform {
+ tfMutex.Lock()
+ defer tfMutex.Unlock()
+ if tf != nil {
+ return tf
+ }
+ installer := &releases.ExactVersion{
+ Product: product.Terraform,
+ Version: version.Must(version.NewVersion("1.10.1")),
+ }
+ execPath, err := installer.Install(context.Background())
+ if err != nil {
+ panic(err)
+ }
+ tempDir, err := os.Getwd()
+ if err != nil {
+ panic(err)
+ }
+ tf, err = tfexec.NewTerraform(tempDir, execPath)
+ if err != nil {
+ panic(err)
+ }
+ return tf
+}
+
+func GetAttrVal(t *testing.T, body *hclsyntax.Body) cty.Value {
+ t.Helper()
+ ret := make(map[string]cty.Value)
+ AddAttributes(t, body, ret)
+ for _, block := range body.Blocks {
+ ret[block.Type] = GetAttrVal(t, block.Body)
+ }
+ return cty.ObjectVal(ret)
+}
+
+func AddAttributes(t *testing.T, body *hclsyntax.Body, ret map[string]cty.Value) {
+ t.Helper()
+ for name, attr := range body.Attributes {
+ val, diags := attr.Expr.Value(nil)
+ require.False(t, diags.HasErrors(), "failed to parse attribute %s: %s", name, diags.Error())
+ ret[name] = val
+ }
+}
+
+func PrettyHCL(t *testing.T, content string) string {
+ t.Helper()
+ builder := strings.Builder{}
+ fmt := getTF().Format(context.Background(), io.NopCloser(strings.NewReader(content)), &builder)
+ require.NoError(t, fmt)
+ formatted := builder.String()
+ return formatted
+}
+
+func CanonicalHCL(t *testing.T, def string) string {
+ t.Helper()
+ return string(hclwrite.Format(GetDefParser(t, def).Bytes()))
+}
+
+func GetDefParser(t *testing.T, def string) *hclwrite.File {
+ t.Helper()
+ parser, diags := hclwrite.ParseConfig([]byte(def), "", hcl.Pos{Line: 1, Column: 1})
+ require.False(t, diags.HasErrors(), "failed to parse def: %s", diags.Error())
+ return parser
+}
+
+func GetBlockBody(t *testing.T, block *hclwrite.Block) *hclsyntax.Body {
+ t.Helper()
+ parser, diags := hclparse.NewParser().ParseHCL(block.Body().BuildTokens(nil).Bytes(), "")
+ require.False(t, diags.HasErrors(), "failed to parse block: %s", diags.Error())
+
+ body, ok := parser.Body.(*hclsyntax.Body)
+ require.True(t, ok, "unexpected *hclsyntax.Body type: %T", parser.Body)
+ return body
+}
diff --git a/internal/testutil/unit/http_mocker.go b/internal/testutil/unit/http_mocker.go
index 749e65aba0..ac969d4e5f 100644
--- a/internal/testutil/unit/http_mocker.go
+++ b/internal/testutil/unit/http_mocker.go
@@ -1,354 +1,247 @@
package unit
import (
- "encoding/json"
- "fmt"
- "io"
"net/http"
"os"
"path"
- "regexp"
- "strings"
+ "strconv"
+ "sync"
"testing"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
- "github.com/jarcoal/httpmock"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc"
- "github.com/sebdah/goldie/v2"
- "github.com/stretchr/testify/assert"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/hcl"
"github.com/stretchr/testify/require"
- "gopkg.in/yaml.v3"
)
-func replaceVars(text string, vars map[string]string) string {
- for key, value := range vars {
- text = strings.ReplaceAll(text, fmt.Sprintf("{%s}", key), value)
- }
- return text
-}
+const (
+ EnvNameHTTPMockerCapture = "HTTP_MOCKER_CAPTURE"
+ EnvNameHTTPMockerReplay = "HTTP_MOCKER_REPLAY"
+ EnvNameHTTPMockerDataUpdate = "HTTP_MOCKER_DATA_UPDATE"
+ configFileExtension = ".yaml"
+)
-type statusText struct {
- Text string `yaml:"text"`
- Status int `yaml:"status"`
- ResponseIndex int `yaml:"response_index"`
+type MockHTTPDataConfig struct {
+ SideEffect func() error
+ IsDiffSkipSuffixes []string
+ IsDiffMustSubstrings []string
+ QueryVars []string
+ AllowMissingRequests bool
+ AllowOutOfOrder bool
}
-type RequestInfo struct {
- Version string `yaml:"version"`
- Method string `yaml:"method"`
- Path string `yaml:"path"`
- Text string `yaml:"text"`
- Responses []statusText `yaml:"responses"`
+func (c MockHTTPDataConfig) WithAllowOutOfOrder() MockHTTPDataConfig { //nolint: gocritic // Want each test run to have its own config (hugeParam: c is heavy (112 bytes); consider passing it by pointer)
+ c.AllowOutOfOrder = true
+ return c
}
-func (i *RequestInfo) id() string {
- return fmt.Sprintf("%s_%s_%s_%s", i.Method, i.Path, i.Version, i.Text)
+func IsCapture() bool {
+ val, _ := strconv.ParseBool(os.Getenv(EnvNameHTTPMockerCapture))
+ return val
}
-func (i *RequestInfo) idShort() string {
- return fmt.Sprintf("%s_%s_%s", i.Method, i.Path, i.Version)
+func IsReplay() bool {
+ val, _ := strconv.ParseBool(os.Getenv(EnvNameHTTPMockerReplay))
+ return val
}
-func (i *RequestInfo) Match(method, urlPath, version string, vars map[string]string) bool {
- if i.Method != method {
- return false
- }
- selfPath := replaceVars(i.Path, vars)
- return selfPath == urlPath && i.Version == version
+func IsDataUpdate() bool {
+ val, _ := strconv.ParseBool(os.Getenv(EnvNameHTTPMockerDataUpdate))
+ return val
}
-type stepRequests struct {
- DiffRequests []RequestInfo `yaml:"diff_requests"`
- RequestResponses []RequestInfo `yaml:"request_responses"`
+func CaptureOrMockTestCaseAndRun(t *testing.T, config MockHTTPDataConfig, testCase *resource.TestCase) { //nolint: gocritic // Want each test run to have its own config (hugeParam: config is heavy (112 bytes); consider passing it by pointer)
+ t.Helper()
+ var err error
+ noneSet := !IsCapture() && !IsReplay()
+ bothSet := IsCapture() && IsReplay()
+ switch {
+ case bothSet:
+ t.Fatalf("Both %s and %s are set, only one of them should be set", EnvNameHTTPMockerCapture, EnvNameHTTPMockerReplay)
+ case noneSet:
+ t.Logf("Neither %s nor %s is set, running test case without modifications", EnvNameHTTPMockerCapture, EnvNameHTTPMockerReplay)
+ case IsReplay():
+ err = enableReplayForTestCase(t, &config, testCase)
+ case IsCapture():
+ err = enableCaptureForTestCase(t, &config, testCase)
+ }
+ require.NoError(t, err)
+ resource.ParallelTest(t, *testCase)
}
-type mockHTTPData struct {
- Variables map[string]string `yaml:"variables"`
- Steps []stepRequests `yaml:"steps"`
- StepCount int `yaml:"step_count"`
+type mockClientModifier struct {
+ config *MockHTTPDataConfig
+ mockRoundTripper http.RoundTripper
+ oldRoundTripper http.RoundTripper
}
-type MockHTTPDataConfig struct {
- AllowMissingRequests bool
- AllowReReadGet bool
+func (c *mockClientModifier) ModifyHTTPClient(httpClient *http.Client) error {
+ c.oldRoundTripper = httpClient.Transport
+ httpClient.Transport = c.mockRoundTripper
+ return nil
}
-func parseTestDataConfigYAML(filePath string) (*mockHTTPData, error) {
- data, err := os.ReadFile(filePath)
- if err != nil {
- return nil, err
- }
- var testData mockHTTPData
- err = yaml.Unmarshal(data, &testData)
- if err != nil {
- return nil, err
+func (c *mockClientModifier) ResetHTTPClient(httpClient *http.Client) {
+ if c.oldRoundTripper != nil {
+ httpClient.Transport = c.oldRoundTripper
}
- return &testData, nil
}
-func MockTestCaseAndRun(t *testing.T, vars map[string]string, config *MockHTTPDataConfig, testCase *resource.TestCase) {
+func enableReplayForTestCase(t *testing.T, config *MockHTTPDataConfig, testCase *resource.TestCase) error {
t.Helper()
- roundTripper, checkFunc := MockRoundTripper(t, vars, config)
- testCase.ProtoV6ProviderFactories = TestAccProviderV6FactoriesWithMock(t, roundTripper)
- testCase.PreCheck = nil
- stepCount := len(testCase.Steps)
- for i := range stepCount - 1 {
+ tfConfigs := extractAndNormalizeConfig(t, testCase)
+ data := ReadMockData(t, tfConfigs)
+ roundTripper, mockRoundTripper := NewMockRoundTripper(t, config, data)
+ httpClientModifier := mockClientModifier{config: config, mockRoundTripper: roundTripper}
+ testCase.ProtoV6ProviderFactories = TestAccProviderV6FactoriesWithMock(t, &httpClientModifier)
+ testCase.PreCheck = func() {
+ if config.SideEffect != nil {
+ require.NoError(t, config.SideEffect())
+ }
+ }
+ require.Equal(t, len(testCase.Steps), len(data.Steps), "Number of steps in test case and mock data should match")
+ checkFunc := mockRoundTripper.CheckStepRequests
+ for i := range testCase.Steps {
step := &testCase.Steps[i]
- if oldCheck := step.Check; oldCheck != nil {
- step.Check = resource.ComposeAggregateTestCheckFunc(oldCheck, checkFunc)
- }
- }
- // Using CheckDestroy for the final step assertions to allow mocked responses in cleanup
- oldCheckDestroy := testCase.CheckDestroy
- newCheckDestroy := func(s *terraform.State) error {
- if oldCheckDestroy != nil {
- if err := oldCheckDestroy(s); err != nil {
- return err
+ oldSkip := step.SkipFunc
+ step.SkipFunc = func() (bool, error) {
+ mockRoundTripper.IncreaseStepNumberAndInit()
+ if os.Getenv("TF_LOG") == "DEBUG" && tfConfigs[i] != "" {
+ t.Logf("Step %d:\n%s\n", i+1, tfConfigs[i])
+ }
+ var shouldSkip bool
+ var err error
+ if oldSkip != nil {
+ shouldSkip, err = oldSkip()
}
+ return shouldSkip, err
+ }
+ if i == len(testCase.Steps)-1 {
+ // Last check done in checkDestroy to support checking DELETE calls
+ step.Check = wrapClientDuringCheck(step.Check, &httpClientModifier)
+ } else {
+ step.Check = wrapClientDuringCheck(step.Check, &httpClientModifier, checkFunc)
}
- return checkFunc(s)
}
- testCase.CheckDestroy = newCheckDestroy
- resource.ParallelTest(t, *testCase)
+ testCase.CheckDestroy = wrapClientDuringCheck(testCase.CheckDestroy, &httpClientModifier, checkFunc)
+ return nil
}
-func MockRoundTripper(t *testing.T, vars map[string]string, config *MockHTTPDataConfig) (http.RoundTripper, resource.TestCheckFunc) {
+func ReadMockData(t *testing.T, tfConfigs []string) *MockHTTPData {
t.Helper()
- testDir := "testdata"
- httpDataPath := path.Join(testDir, t.Name()+".yaml")
- data, err := parseTestDataConfigYAML(httpDataPath)
- require.NoError(t, err)
- myTransport := httpmock.NewMockTransport()
- var mockTransport http.RoundTripper = myTransport
- g := goldie.New(t, goldie.WithTestNameForDir(true), goldie.WithNameSuffix(".json"))
- tracker := requestTracker{data: data, g: g, vars: vars, t: t}
- if config != nil {
- tracker.allowMissingRequests = config.AllowMissingRequests
- tracker.allowReReadGet = config.AllowReReadGet
- }
- err = tracker.initStep()
+ httpDataPath := MockConfigFilePath(t)
+ data, err := ParseTestDataConfigYAML(httpDataPath)
require.NoError(t, err)
- for _, method := range []string{"GET", "POST", "PUT", "DELETE", "PATCH"} {
- myTransport.RegisterRegexpResponder(method, regexp.MustCompile(".*"), tracker.receiveRequest(method))
- }
- return mockTransport, tracker.checkStepRequests
-}
-
-var versionDatePattern = regexp.MustCompile(`(\d{4}-\d{2}-\d{2})`)
-
-func ExtractVersion(contentType string) (string, error) {
- match := versionDatePattern.FindStringSubmatch(contentType)
- if len(match) > 1 {
- return match[1], nil
- }
- return "", fmt.Errorf("could not extract version from %s header", contentType)
-}
-
-type requestTracker struct {
- t *testing.T
- g *goldie.Goldie
- data *mockHTTPData
- vars map[string]string
- usedResponses map[string]int
- foundsDiffs map[int]string
- currentStepIndex int
- diffResponseIndex int
- allowMissingRequests bool
- allowReReadGet bool
-}
-
-func (r *requestTracker) allowReUse(method string) bool {
- return r.allowReReadGet && method == "GET"
-}
-
-func (r *requestTracker) requestFilename(requestID string, index int) string {
- return strings.ReplaceAll(fmt.Sprintf("%02d_%02d_%s", r.currentStepIndex+1, index+1, requestID), "/", "_")
-}
-
-func (r *requestTracker) manualFilenameIfExist(requestID string, index int) string {
- defaultFilestem := strings.ReplaceAll(fmt.Sprintf("%02d_%02d_%s", r.currentStepIndex+1, index+1, requestID), "/", "_")
- manualFilestem := defaultFilestem + "_manual"
- if _, err := os.Stat("testdata" + "/" + r.t.Name() + "/" + manualFilestem + ".json"); err == nil {
- return manualFilestem
- }
- return defaultFilestem
-}
-
-func (r *requestTracker) initStep() error {
- require.Len(r.t, r.data.Steps, r.data.StepCount, "step count didn't match steps")
- usedKeys := strings.Join(acc.SortStringMapKeys(r.vars), ", ")
- expectedKeys := strings.Join(acc.SortStringMapKeys(r.data.Variables), ", ")
- require.Equal(r.t, expectedKeys, usedKeys, "mock variables didn't match mock data variables")
- r.usedResponses = map[string]int{}
- r.foundsDiffs = map[int]string{}
- step := r.currentStep()
- if step == nil {
- return nil
- }
- for index, req := range step.DiffRequests {
- err := r.g.Update(r.t, r.requestFilename(req.idShort(), index), []byte(replaceVars(req.Text, r.vars)))
- if err != nil {
- return err
+ oldVariables := data.Variables
+ data.Variables = map[string]string{}
+ data.useTFConfigs(t, tfConfigs)
+ newVariables := data.Variables
+ for key, value := range oldVariables {
+ if _, ok := newVariables[key]; !ok {
+ t.Logf("Variable %s not found from TF Config, will use variable from the mock data with value %s", key, value)
+ data.Variables[key] = value
}
}
- r.nextDiffResponseIndex()
- return nil
-}
-
-func (r *requestTracker) nextDiffResponseIndex() {
- step := r.currentStep()
- if step == nil {
- r.t.Fatal("no more steps, in testCase")
- }
- for index, req := range step.DiffRequests {
- if _, ok := r.foundsDiffs[index]; !ok {
- r.diffResponseIndex = req.Responses[0].ResponseIndex
- return
+ for key, value := range newVariables {
+ if _, ok := oldVariables[key]; !ok {
+ t.Logf("Variable %s=%s not found in Mock Data, has the TF Config updated?", key, value)
}
}
- // no more diffs in current step, any response index will do, assuming never more than 100k responses
- r.diffResponseIndex = 99999
+ return data
}
-func (r *requestTracker) currentStep() *stepRequests {
- if r.currentStepIndex >= r.data.StepCount {
- return nil
- }
- return &r.data.Steps[r.currentStepIndex]
+func UpdateMockDataDiffRequest(t *testing.T, stepIndex, diffRequestIndex int, newText string) {
+ t.Helper()
+ httpDataPath := MockConfigFilePath(t)
+ data, err := ParseTestDataConfigYAML(httpDataPath)
+ require.NoError(t, err)
+ data.Steps[stepIndex].DiffRequests[diffRequestIndex].Text = newText
+ configYaml, err := ConfigYaml(data)
+ require.NoError(t, err)
+ err = WriteConfigYaml(httpDataPath, configYaml)
+ require.NoError(t, err)
}
-func (r *requestTracker) checkStepRequests(_ *terraform.State) error {
- missingRequests := []string{}
- step := r.currentStep()
- for _, req := range step.RequestResponses {
- missingRequestsCount := len(req.Responses) - r.usedResponses[req.id()]
- if missingRequestsCount > 0 {
- missingIndexes := []string{}
- for i := 0; i < missingRequestsCount; i++ {
- missingResponse := (len(req.Responses) - missingRequestsCount) + i
- missingIndexes = append(missingIndexes, fmt.Sprintf("%d", req.Responses[missingResponse].ResponseIndex))
+func enableCaptureForTestCase(t *testing.T, config *MockHTTPDataConfig, testCase *resource.TestCase) error {
+ t.Helper()
+ stepCount := len(testCase.Steps)
+ tfConfigs := extractAndNormalizeConfig(t, testCase)
+ capturedData := NewMockHTTPData(t, stepCount, tfConfigs)
+ clientModifier := NewCaptureMockConfigClientModifier(t, config, capturedData)
+ testCase.ProtoV6ProviderFactories = TestAccProviderV6FactoriesWithMock(t, clientModifier)
+ for i := range stepCount {
+ step := &testCase.Steps[i]
+ oldSkip := step.SkipFunc
+ step.SkipFunc = func() (bool, error) {
+ clientModifier.IncreaseStepNumber()
+ var shouldSkip bool
+ var err error
+ if oldSkip != nil {
+ shouldSkip, err = oldSkip()
}
- missingIndexesStr := strings.Join(missingIndexes, ", ")
- missingRequests = append(missingRequests, fmt.Sprintf("missing %d requests of %s (%s)", missingRequestsCount, req.idShort(), missingIndexesStr))
- }
- }
- if r.allowMissingRequests {
- if len(missingRequests) > 0 {
- r.t.Logf("missing requests:\n%s", strings.Join(missingRequests, "\n"))
+ return shouldSkip, err
}
- } else {
- assert.Empty(r.t, missingRequests)
+ step.Check = wrapClientDuringCheck(step.Check, clientModifier)
}
- missingDiffs := []string{}
- for i, req := range step.DiffRequests {
- if _, ok := r.foundsDiffs[i]; !ok {
- missingDiffs = append(missingDiffs, fmt.Sprintf("missing diff request %s", req.idShort()))
+
+ writeCapturedData := func() {
+ clientModifier.NormalizeCapturedData()
+ filePath := MockConfigFilePath(t)
+ if t.Failed() {
+ filePath = FailedFilename(filePath)
}
+ err := clientModifier.WriteCapturedData(filePath)
+ require.NoError(t, err)
}
- assert.Empty(r.t, missingDiffs)
- for index, payload := range r.foundsDiffs {
- diff := step.DiffRequests[index]
- filename := r.manualFilenameIfExist(diff.idShort(), index)
- r.t.Logf("checking diff %s", filename)
- r.g.Assert(r.t, filename, []byte(payload))
- }
- r.currentStepIndex++
- return r.initStep()
+ t.Cleanup(writeCapturedData)
+ testCase.CheckDestroy = wrapClientDuringCheck(testCase.CheckDestroy, clientModifier)
+ return nil
}
-func (r *requestTracker) receiveRequest(method string) func(req *http.Request) (*http.Response, error) {
- return func(req *http.Request) (*http.Response, error) {
- acceptHeader := req.Header.Get("Accept")
- version, err := ExtractVersion(acceptHeader)
- if err != nil {
- return nil, err
- }
- var payload string
- if req.Body != nil {
- payloadBytes, err := io.ReadAll(req.Body)
- if err != nil {
- return nil, err
- }
- payload = string(payloadBytes)
- }
- text, status, err := r.matchRequest(method, req.URL.Path, version, payload)
- if err != nil {
- return nil, err
- }
- response := httpmock.NewStringResponse(status, text)
- response.Header.Set("Content-Type", fmt.Sprintf("application/vnd.atlas.%s+json;charset=utf-8", version))
- return response, nil
+func extractAndNormalizeConfig(t *testing.T, testCase *resource.TestCase) []string {
+ t.Helper()
+ stepCount := len(testCase.Steps)
+ tfConfigs := make([]string, stepCount)
+ for i := range testCase.Steps {
+ tfConfigs[i] = hcl.PrettyHCL(t, testCase.Steps[i].Config)
}
+ return tfConfigs
}
-func normalizePayload(payload string) (string, error) {
- if payload == "" {
- return "", nil
- }
- var tempHolder any
- err := json.Unmarshal([]byte(payload), &tempHolder)
- if err != nil {
- return "", err
- }
- sb := strings.Builder{}
- encoder := json.NewEncoder(&sb)
- encoder.SetIndent("", " ")
- err = encoder.Encode(tempHolder)
- if err != nil {
- return "", err
- }
- return strings.TrimSuffix(sb.String(), "\n"), nil
+func MockConfigFilePath(t *testing.T) string {
+ t.Helper()
+ testDir := "testdata"
+ return path.Join(testDir, t.Name()+configFileExtension)
}
-func (r *requestTracker) matchRequest(method, urlPath, version, payload string) (response string, statusCode int, err error) {
- step := r.currentStep()
- if step == nil {
- return "", 0, fmt.Errorf("no more steps in mock data")
- }
- for index, request := range step.DiffRequests {
- if !request.Match(method, urlPath, version, r.vars) {
- continue
- }
- if _, ok := r.foundsDiffs[index]; ok {
- continue
- }
- normalizedPayload, err := normalizePayload(payload)
- if err != nil {
- return "", 0, err
- }
- r.foundsDiffs[index] = normalizedPayload
- r.nextDiffResponseIndex()
- break
- }
- nextDiffResponse := r.diffResponseIndex
+var accClientLock = &sync.Mutex{}
- for _, request := range step.RequestResponses {
- if !request.Match(method, urlPath, version, r.vars) {
- continue
- }
- requestID := request.id()
- nextIndex := r.usedResponses[requestID]
- if nextIndex >= len(request.Responses) {
- if r.allowReReadGet && method == "GET" {
- nextIndex = len(request.Responses) - 1
- } else {
- continue
+func wrapClientDuringCheck(oldCheck resource.TestCheckFunc, clientModifier HTTPClientModifier, extraChecks ...resource.TestCheckFunc) resource.TestCheckFunc {
+ if oldCheck == nil && len(extraChecks) == 0 {
+ return nil
+ }
+ return func(s *terraform.State) error {
+ accClientLock.Lock()
+ accClient := acc.ConnV2().GetConfig().HTTPClient
+ modifyErr := clientModifier.ModifyHTTPClient(accClient)
+ defer func() {
+ clientModifier.ResetHTTPClient(accClient)
+ accClientLock.Unlock()
+ }()
+ if modifyErr != nil {
+ return modifyErr
+ }
+ if oldCheck != nil {
+ if err := oldCheck(s); err != nil {
+ return err
}
- }
- response := request.Responses[nextIndex]
- // cannot return a response that is sent after a diff response
- if response.ResponseIndex > nextDiffResponse {
- prevIndex := nextIndex - 1
- if prevIndex >= 0 && r.allowReUse(method) {
- response = request.Responses[prevIndex]
- r.t.Logf("re-reading GET request with response_index=%d as diff hasn't been returned yet (%d)", response.ResponseIndex, nextDiffResponse)
- return replaceVars(response.Text, r.vars), response.Status, nil
+ for _, check := range extraChecks {
+ if err := check(s); err != nil {
+ return err
+ }
}
- continue
}
- r.usedResponses[requestID]++
- return replaceVars(response.Text, r.vars), response.Status, nil
+ return nil
}
- return "", 0, fmt.Errorf("no matching request found %s %s %s", method, urlPath, version)
}
diff --git a/internal/testutil/unit/http_mocker_api_paths.go b/internal/testutil/unit/http_mocker_api_paths.go
new file mode 100644
index 0000000000..a8c89718b8
--- /dev/null
+++ b/internal/testutil/unit/http_mocker_api_paths.go
@@ -0,0 +1,134 @@
+package unit
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "path"
+ "strings"
+ "time"
+
+ "gopkg.in/yaml.v3"
+)
+
+type OpenapiSchema struct {
+ Paths map[string]map[string]interface{} `yaml:"paths"`
+}
+
+func parseModel(apiSpecPath string) (OpenapiSchema, error) {
+ data, err := os.ReadFile(apiSpecPath)
+ if err != nil {
+ return OpenapiSchema{}, err
+ }
+
+ var model OpenapiSchema
+ err = yaml.Unmarshal(data, &model)
+ if err != nil {
+ return OpenapiSchema{}, err
+ }
+
+ return model, nil
+}
+
+func parseAPISpecPaths(apiSpecPath string) (map[string][]APISpecPath, error) {
+ model, err := parseModel(apiSpecPath)
+ if err != nil {
+ return nil, err
+ }
+ paths := make(map[string][]APISpecPath)
+ for path, pathDict := range model.Paths {
+ for method := range pathDict {
+ methodUpper := strings.ToUpper(method)
+ paths[methodUpper] = append(paths[methodUpper], APISpecPath{Path: path})
+ }
+ }
+ return paths, nil
+}
+
+// copied from tools/codegen/openapi/parser.go
+const (
+ atlasAdminAPISpecURL = "https://raw.githubusercontent.com/mongodb/atlas-sdk-go/main/openapi/atlas-api-transformed.yaml"
+ specFileRelPath = "tools/codegen/open-api-spec.yml"
+)
+
+func DownloadOpenAPISpec(url, specFilePath string) (err error) {
+ ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
+ defer cancel()
+
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, http.NoBody)
+ if err != nil {
+ return err
+ }
+
+ client := http.Client{}
+ res, getErr := client.Do(req)
+ if getErr != nil {
+ return getErr
+ }
+
+ if res.Body != nil {
+ defer res.Body.Close()
+ }
+
+ body, readErr := io.ReadAll(res.Body)
+ if readErr != nil {
+ return readErr
+ }
+
+ err = os.WriteFile(specFilePath, body, 0o600)
+ return err
+}
+
+var apiSpecPaths map[string][]APISpecPath
+
+func ReadAPISpecPaths() map[string][]APISpecPath {
+ return apiSpecPaths
+}
+
+func fileExist(fullPath string) bool {
+ _, err := os.Stat(fullPath)
+ if err == nil {
+ return true
+ }
+ return !os.IsNotExist(err)
+}
+
+func fullPath(relPath string) string {
+ workDir, err := os.Getwd()
+ if err != nil {
+ panic(fmt.Sprintf("error getting working directory: %s", err))
+ }
+ workdDirParts := strings.Split(workDir, "/")
+ workdDirParts[0] = "/" + workdDirParts[0]
+ for i := range workdDirParts {
+ parentCandidate := workdDirParts[:len(workdDirParts)-i]
+ parentCandidate = append(parentCandidate, ".git")
+ gitDir := path.Join(parentCandidate...)
+ if fileExist(gitDir) {
+ repoPath, _ := strings.CutSuffix(gitDir, ".git")
+ return path.Join(repoPath, relPath)
+ }
+ }
+ panic("could not find repo root")
+}
+
+func init() {
+ InitializeAPISpecPaths()
+}
+
+func InitializeAPISpecPaths() {
+ specPath := fullPath(specFileRelPath)
+ var err error
+ if !fileExist(specPath) {
+ err = DownloadOpenAPISpec(atlasAdminAPISpecURL, specPath)
+ if err != nil {
+ panic(fmt.Sprintf("error downloading OpenAPI spec: %s", err))
+ }
+ }
+ apiSpecPaths, err = parseAPISpecPaths(specPath)
+ if err != nil {
+ panic(fmt.Sprintf("error parsing OpenAPI spec: %s", err))
+ }
+}
diff --git a/internal/testutil/unit/http_mocker_api_paths_test.go b/internal/testutil/unit/http_mocker_api_paths_test.go
new file mode 100644
index 0000000000..e5239d9cf7
--- /dev/null
+++ b/internal/testutil/unit/http_mocker_api_paths_test.go
@@ -0,0 +1,23 @@
+package unit_test
+
+import (
+ "testing"
+
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/unit"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestApiPathsParsing(t *testing.T) {
+ specParts := unit.ReadAPISpecPaths()
+ assert.Len(t, specParts, 5)
+ assert.Contains(t, specParts, "GET")
+ processArgsPath := "/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/processArgs"
+ getPaths := specParts["GET"]
+ found1, err := unit.FindNormalizedPath(processArgsPath, &getPaths)
+ require.NoError(t, err)
+ assert.Equal(t, "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs", found1.Path)
+ variables := found1.Variables(processArgsPath)
+ assert.Equal(t, "6746ceed6f62fc3c122a3e0e", variables["groupId"])
+ assert.Equal(t, "test-acc-tf-c-7871793563057636102", variables["clusterName"])
+}
diff --git a/internal/testutil/unit/http_mocker_config_capture.go b/internal/testutil/unit/http_mocker_config_capture.go
new file mode 100644
index 0000000000..dd8f292490
--- /dev/null
+++ b/internal/testutil/unit/http_mocker_config_capture.go
@@ -0,0 +1,194 @@
+package unit
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "path"
+ "sort"
+ "strings"
+ "testing"
+ "time"
+
+ "gopkg.in/yaml.v3"
+)
+
+func configureIsDiff(config *MockHTTPDataConfig) func(*RoundTrip) bool {
+ return func(rt *RoundTrip) bool {
+ if rt.Request.Method == "GET" {
+ return false
+ }
+ if config == nil {
+ return true
+ }
+ if config.IsDiffSkipSuffixes != nil {
+ for _, suffix := range config.IsDiffSkipSuffixes {
+ if strings.HasSuffix(rt.Request.Path, suffix) {
+ return false
+ }
+ }
+ }
+ if config.IsDiffMustSubstrings != nil {
+ for _, substring := range config.IsDiffMustSubstrings {
+ if !strings.Contains(rt.Request.Path, substring) {
+ return false
+ }
+ }
+ }
+ return true
+ }
+}
+
+func configureQueryVars(config *MockHTTPDataConfig) []string {
+ if config == nil {
+ return nil
+ }
+ vars := config.QueryVars
+ sort.Strings(vars)
+ return vars
+}
+
+func NewCaptureMockConfigClientModifier(t *testing.T, config *MockHTTPDataConfig, data *MockHTTPData) *CaptureMockConfigClientModifier {
+ t.Helper()
+ return &CaptureMockConfigClientModifier{
+ t: t,
+ isDiff: configureIsDiff(config),
+ queryVars: configureQueryVars(config),
+ capturedData: data,
+ }
+}
+
+type CaptureMockConfigClientModifier struct {
+ oldTransport http.RoundTripper
+ t *testing.T
+ isDiff func(*RoundTrip) bool
+ capturedData *MockHTTPData
+ queryVars []string
+ responseIndex int
+ stepNumber int
+}
+
+func (c *CaptureMockConfigClientModifier) IncreaseStepNumber() {
+ c.stepNumber++
+}
+
+func (c *CaptureMockConfigClientModifier) ModifyHTTPClient(httpClient *http.Client) error {
+ c.oldTransport = httpClient.Transport
+ httpClient.Transport = c
+ return nil
+}
+
+func (c *CaptureMockConfigClientModifier) ResetHTTPClient(httpClient *http.Client) {
+ if c.oldTransport != nil {
+ httpClient.Transport = c.oldTransport
+ }
+}
+
+func (c *CaptureMockConfigClientModifier) RoundTrip(req *http.Request) (*http.Response, error) {
+ // Capture request body to avoid it being consumed
+ originalBody, normalizedBody, err := extractAndNormalizePayload(req.Body)
+ if err != nil {
+ return nil, err
+ }
+ req.Body = io.NopCloser(strings.NewReader(originalBody))
+
+ resp, err := c.oldTransport.RoundTrip(req)
+ if err != nil {
+ return nil, err
+ }
+
+ c.responseIndex++
+ specPaths := apiSpecPaths[req.Method]
+ rt, parseError := parseRoundTrip(req, resp, c.responseIndex, c.stepNumber, &specPaths, normalizedBody, c.queryVars)
+ if parseError != nil {
+ c.t.Logf("error parsing round trip: %s", parseError)
+ return resp, err
+ }
+ addError := c.capturedData.AddRoundtrip(c.t, rt, c.isDiff(rt))
+ if addError != nil {
+ c.t.Logf("error adding round trip: %s", addError)
+ }
+ return resp, err
+}
+
+func (c *CaptureMockConfigClientModifier) NormalizeCapturedData() {
+ c.capturedData.Normalize()
+}
+
+func (c *CaptureMockConfigClientModifier) ConfigYaml() (string, error) {
+ capturedData := c.capturedData
+ return ConfigYaml(capturedData)
+}
+
+func ConfigYaml(capturedData *MockHTTPData) (string, error) {
+ initialYaml := strings.Builder{}
+ e := yaml.NewEncoder(&initialYaml)
+ e.SetIndent(1)
+ err := e.Encode(capturedData)
+ return initialYaml.String(), err
+}
+
+func (c *CaptureMockConfigClientModifier) WriteCapturedData(filePath string) error {
+ configYaml, err := c.ConfigYaml()
+ if err != nil {
+ return err
+ }
+ return WriteConfigYaml(filePath, configYaml)
+}
+
+func WriteConfigYaml(filePath, configYaml string) error {
+ dirPath := path.Dir(filePath)
+ if !fileExist(dirPath) {
+ err := os.Mkdir(dirPath, 0o755)
+ if err != nil {
+ return err
+ }
+ }
+ // will override content if file exists
+ err := os.WriteFile(filePath, []byte(configYaml), 0o600)
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+func FailedFilename(filePath string) string {
+ dirName := path.Dir(filePath)
+ formattedTime := time.Now().Format("2006-01-02-15-04")
+ stem, _ := strings.CutSuffix(path.Base(filePath), configFileExtension)
+ return path.Join(dirName, fmt.Sprintf("%s_failed_%s", stem, formattedTime)) + configFileExtension
+}
+
+func parseRoundTrip(req *http.Request, resp *http.Response, responseIndex, stepNumber int, specPaths *[]APISpecPath, requestPayload string, queryVars []string) (*RoundTrip, error) {
+ version := ExtractVersionRequestResponse(req.Header.Get("Accept"), resp.Header.Get("Content-Type"))
+ if version == "" {
+ return nil, fmt.Errorf("could not find version in request or response headers for responseIndex %d", responseIndex)
+ }
+ normalizedPath, err := FindNormalizedPath(req.URL.Path, specPaths)
+ if err != nil {
+ return nil, err
+ }
+ originalResponsePayload, responsePayload, err := extractAndNormalizePayload(resp.Body)
+ if err != nil {
+ return nil, err
+ }
+ // Write back response body to support reading it again
+ resp.Body = io.NopCloser(strings.NewReader(originalResponsePayload))
+ return &RoundTrip{
+ QueryString: relevantQuery(queryVars, req.URL.Query()),
+ Variables: normalizedPath.Variables(req.URL.Path),
+ StepNumber: stepNumber,
+ Request: RequestInfo{
+ Version: version,
+ Path: removeQueryParamsAndTrim(req.URL.Path),
+ Method: req.Method,
+ Text: requestPayload,
+ },
+ Response: statusText{
+ Text: responsePayload,
+ Status: resp.StatusCode,
+ ResponseIndex: responseIndex,
+ },
+ }, nil
+}
diff --git a/internal/testutil/unit/http_mocker_config_capture_test.go b/internal/testutil/unit/http_mocker_config_capture_test.go
new file mode 100644
index 0000000000..93c0f260f7
--- /dev/null
+++ b/internal/testutil/unit/http_mocker_config_capture_test.go
@@ -0,0 +1,127 @@
+package unit_test
+
+import (
+ _ "embed"
+ "net/http"
+ "os"
+ "path"
+ "path/filepath"
+ "regexp"
+ "strings"
+ "testing"
+
+ "github.com/jarcoal/httpmock"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/unit"
+ "github.com/sebdah/goldie/v2"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+ "gopkg.in/yaml.v3"
+)
+
+var (
+ //go:embed testdata/CaptureTest/createCluster.json
+ createClusterReqBody string
+ //go:embed testdata/CaptureTest/createClusterResponse.json
+ createClusterRespBody string
+ //go:embed testdata/CaptureTest/getClusterIdle.json
+ getClusterIdleRespBody string
+ //go:embed testdata/CaptureTest/getContainersAws.json
+ getContainersAws string
+ //go:embed testdata/CaptureTest/getContainersAzure.json
+ getContainersAzure string
+)
+
+func TestFailedFilename(t *testing.T) {
+ normalName := unit.MockConfigFilePath(t)
+ assert.Equal(t, "testdata/TestFailedFilename.yaml", normalName)
+ failedName := unit.FailedFilename(normalName)
+ assert.Contains(t, failedName, "testdata/TestFailedFilename_failed")
+}
+
+func TestCaptureMockConfigClientModifier_clusterExample(t *testing.T) {
+ capturedData := unit.NewMockHTTPData(t, 3, []string{"resource \"dummy\" \"test\"{\n step = 1\n someString = \"my-string\"\n}", "", "resource \"dummy\" \"test\"{\n step = 3\n}"})
+ clientModifier := unit.NewCaptureMockConfigClientModifier(t, &unit.MockHTTPDataConfig{QueryVars: []string{"providerName"}}, capturedData)
+ transport := httpmock.NewMockTransport()
+ client := http.Client{Transport: transport}
+ err := clientModifier.ModifyHTTPClient(&client)
+ require.NoError(t, err)
+
+ // Step 1: Create a cluster
+ clientModifier.IncreaseStepNumber()
+ responder1 := httpmock.NewStringResponder(201, createClusterRespBody)
+ transport.RegisterRegexpResponder("POST", regexp.MustCompile(".*"), responder1)
+ createRequest := request("POST", "/api/atlas/v2/groups/g1/clusters", createClusterReqBody)
+ resp, err := client.Do(createRequest)
+ require.NoError(t, err)
+ assert.Equal(t, 201, resp.StatusCode)
+ createResponse := parseMapStringAny(t, resp)
+ assert.Equal(t, "test-acc-tf-c-7871793563057636102", createResponse["name"])
+
+ // Step 2: Read cluster
+ clientModifier.IncreaseStepNumber()
+ getResponses := []string{createClusterRespBody, getClusterIdleRespBody, getClusterIdleRespBody}
+ expectedState := []string{"CREATING", "IDLE", "IDLE"}
+ for i := range getResponses {
+ transport.Reset()
+ responder2 := httpmock.NewStringResponder(200, getResponses[i])
+ transport.RegisterRegexpResponder("GET", regexp.MustCompile(".*"), responder2)
+ getRequest := request("GET", "/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102", "")
+ resp, err = client.Do(getRequest)
+ require.NoError(t, err)
+ assert.Equal(t, 200, resp.StatusCode)
+ getResponse := parseMapStringAny(t, resp)
+ assert.Equal(t, expectedState[i], getResponse["stateName"])
+ }
+
+ // Step 3: Read containers, capture query args
+ clientModifier.IncreaseStepNumber()
+ containersGetResponses := []string{getContainersAws, getContainersAzure}
+ containersExpectedIDs := []string{"6746ceedaef48d1cb265896b", "6746cefbaef48d1cb2658bbb"}
+ containersGetPaths := []string{
+ "/api/atlas/v2/groups/6746cee66f62fc3c122a3b82/containers?includeCount=true&itemsPerPage=100&pageNum=1&providerName=AWS",
+ "/api/atlas/v2/groups/6746cee66f62fc3c122a3b82/containers?includeCount=true&itemsPerPage=100&pageNum=1&providerName=AZURE",
+ }
+ for i := range containersGetResponses {
+ transport.Reset()
+ responder3 := httpmock.NewStringResponder(200, containersGetResponses[i])
+ transport.RegisterRegexpResponder("GET", regexp.MustCompile(".*"), responder3)
+ getRequest := request("GET", containersGetPaths[i], "")
+ resp, err = client.Do(getRequest)
+ require.NoError(t, err)
+ assert.Equal(t, 200, resp.StatusCode)
+ getResponse := parseMapStringAny(t, resp)
+ assert.Equal(t, containersExpectedIDs[i], getResponse["results"].([]any)[0].(map[string]any)["id"])
+ }
+
+ g := goldie.New(t, goldie.WithTestNameForDir(true), goldie.WithNameSuffix(".yaml"))
+ configYaml, err := clientModifier.ConfigYaml()
+ require.NoError(t, err)
+ g.Assert(t, t.Name(), []byte(configYaml))
+}
+
+func Reformat(t *testing.T, filePath string) string {
+ t.Helper()
+ data, err := unit.ParseTestDataConfigYAML(filePath)
+ require.NoError(t, err)
+ initialYaml := strings.Builder{}
+ e := yaml.NewEncoder(&initialYaml)
+ e.SetIndent(1)
+ err = e.Encode(data)
+ require.NoError(t, err)
+ return initialYaml.String()
+}
+
+// Manual test used to test reformatting of all yaml files in the testdata directory
+func TestReformatConfigs(t *testing.T) {
+ testDataPath := os.Getenv("TEST_DATA_PATH")
+ if testDataPath == "" {
+ t.Skip("TEST_DATA_PATH is not set")
+ }
+ matches, err := filepath.Glob(path.Join(testDataPath, "*.yaml"))
+ require.NoError(t, err)
+ for _, p := range matches {
+ formatted := Reformat(t, p)
+ err = os.WriteFile(p, []byte(formatted), 0o600)
+ require.NoError(t, err)
+ }
+}
diff --git a/internal/testutil/unit/http_mocker_data.go b/internal/testutil/unit/http_mocker_data.go
new file mode 100644
index 0000000000..0899a3bfb6
--- /dev/null
+++ b/internal/testutil/unit/http_mocker_data.go
@@ -0,0 +1,386 @@
+package unit
+
+import (
+ "fmt"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "testing"
+
+ "github.com/stretchr/testify/require"
+ "gopkg.in/yaml.v3"
+)
+
+type statusText struct {
+ Text string `yaml:"text"`
+ ResponseIndex int `yaml:"response_index"`
+ Status int `yaml:"status"`
+ DuplicateResponses int `yaml:"duplicate_responses"`
+}
+
+func (s statusText) MarshalYAML() (interface{}, error) {
+ childNodes := []*yaml.Node{
+ {Kind: yaml.ScalarNode, Value: "response_index"},
+ {Kind: yaml.ScalarNode, Value: fmt.Sprintf("%d", s.ResponseIndex)},
+
+ {Kind: yaml.ScalarNode, Value: "status"},
+ {Kind: yaml.ScalarNode, Value: fmt.Sprintf("%d", s.Status)},
+ }
+ if s.DuplicateResponses > 0 {
+ childNodes = append(childNodes,
+ &yaml.Node{Kind: yaml.ScalarNode, Value: "duplicate_responses"},
+ &yaml.Node{Kind: yaml.ScalarNode, Value: fmt.Sprintf("%d", s.DuplicateResponses)},
+ )
+ }
+ childNodes = append(childNodes,
+ &yaml.Node{Kind: yaml.ScalarNode, Value: "text"},
+ &yaml.Node{Kind: yaml.ScalarNode, Value: s.Text, Tag: "!!str", Style: yaml.DoubleQuotedStyle},
+ )
+ return &yaml.Node{
+ Kind: yaml.MappingNode,
+ Content: childNodes,
+ }, nil
+}
+
+func (s *statusText) IncreaseDuplicateResponses() {
+ s.DuplicateResponses++
+}
+
+type RequestInfo struct {
+ Path string `yaml:"path"`
+ Method string `yaml:"method"`
+ Version string `yaml:"version"`
+ Text string `yaml:"text"`
+ Responses []statusText `yaml:"responses"`
+}
+
+// Custom marshaling is necessary to use `flow` style only on response fields (text and responses.*.text)
+func (i RequestInfo) MarshalYAML() (any, error) { //nolint:gocritic // Using a pointer method leads to inconsistent dump results
+ responseNode := []*yaml.Node{}
+ for _, response := range i.Responses {
+ node, err := response.MarshalYAML()
+ if err != nil {
+ return nil, err
+ }
+ responseNode = append(responseNode, node.(*yaml.Node))
+ }
+ childNodes := []*yaml.Node{
+ {Kind: yaml.ScalarNode, Value: "path"},
+ {Kind: yaml.ScalarNode, Value: i.Path},
+ {Kind: yaml.ScalarNode, Value: "method"},
+ {Kind: yaml.ScalarNode, Value: i.Method},
+ {Kind: yaml.ScalarNode, Value: "version"},
+ {Kind: yaml.ScalarNode, Value: i.Version, Tag: "!!str", Style: yaml.SingleQuotedStyle},
+ {Kind: yaml.ScalarNode, Value: "text"},
+ {Kind: yaml.ScalarNode, Value: i.Text, Tag: "!!str", Style: yaml.DoubleQuotedStyle},
+ {Kind: yaml.ScalarNode, Value: "responses"},
+ {Kind: yaml.SequenceNode, Content: responseNode},
+ }
+ return &yaml.Node{
+ Kind: yaml.MappingNode,
+ Style: yaml.FoldedStyle,
+ Content: childNodes,
+ }, nil
+}
+
+func (i *RequestInfo) id() string {
+ return fmt.Sprintf("%s_%s", i.idShort(), i.Text)
+}
+
+func (i *RequestInfo) idShort() string {
+ return fmt.Sprintf("%s_%s_%s", i.Method, i.Path, i.Version)
+}
+
+func (i *RequestInfo) NormalizePath(reqURL *url.URL) string {
+ queryVars := i.QueryVars()
+ if len(queryVars) == 0 {
+ return reqURL.Path
+ }
+ queryString := relevantQuery(queryVars, reqURL.Query())
+ if queryString == "" {
+ return removeQueryParamsAndTrim(reqURL.Path)
+ }
+ return removeQueryParamsAndTrim(reqURL.Path) + "?" + queryString
+}
+
+func (i *RequestInfo) QueryVars() []string {
+ selfURL, _ := url.Parse("http://localhost" + i.Path)
+ query := selfURL.Query()
+ queryVars := []string{}
+ for key := range query {
+ queryVars = append(queryVars, key)
+ }
+ return queryVars
+}
+
+func (i *RequestInfo) Match(t *testing.T, method, version string, reqURL *url.URL, mockData *MockHTTPData) bool {
+ t.Helper()
+ if i.Method != method || i.Version != version {
+ return false
+ }
+ reqPath := i.NormalizePath(reqURL)
+ if replaceVars(i.Path, mockData.Variables) == reqPath {
+ return true
+ }
+ apiPath := APISpecPath{Path: removeQueryParamsAndTrim(i.Path)}
+ if !apiPath.Match(reqURL.Path) {
+ return false
+ }
+ pathVars := apiPath.Variables(reqURL.Path)
+ err := mockData.UpdateVariablesIgnoreChanges(t, pathVars)
+ if err != nil {
+ t.Error(err)
+ return false
+ }
+ return replaceVars(i.Path, mockData.Variables) == reqPath
+}
+
+// There is an issue when dumping the yaml, if the \n \n sequence is found it will always dump using the DoubleQuotedStyle, workaround by using this custom dumping.
+type Literal string
+
+func (l Literal) MarshalYAML() (any, error) {
+ trimmed := strings.Trim(string(l), "\n ")
+ if trimmed == "" {
+ return "", nil
+ }
+ return &yaml.Node{
+ Kind: yaml.ScalarNode,
+ Value: strings.ReplaceAll(trimmed, "\n \n", "\n\n"),
+ Style: yaml.LiteralStyle,
+ Tag: "!!str",
+ }, nil
+}
+
+type stepRequests struct {
+ Config Literal `yaml:"config,omitempty"`
+ DiffRequests []RequestInfo `yaml:"diff_requests"`
+ RequestResponses []RequestInfo `yaml:"request_responses"`
+}
+
+func (s *stepRequests) findRequest(request *RequestInfo) (*RequestInfo, bool) {
+ for i := range s.RequestResponses {
+ if s.RequestResponses[i].id() == request.id() {
+ return &s.RequestResponses[i], true
+ }
+ }
+ return nil, false
+}
+
+func (s *stepRequests) AddRequest(request *RequestInfo, isDiff bool) {
+ if isDiff {
+ s.DiffRequests = append(s.DiffRequests, *request)
+ }
+ existing, found := s.findRequest(request)
+ if found {
+ lastResponse := existing.Responses[len(existing.Responses)-1]
+ newResponse := request.Responses[0]
+ if lastResponse.Status == newResponse.Status && lastResponse.Text == newResponse.Text {
+ existing.Responses[len(existing.Responses)-1].IncreaseDuplicateResponses()
+ } else {
+ existing.Responses = append(existing.Responses, newResponse)
+ }
+ } else {
+ s.RequestResponses = append(s.RequestResponses, *request)
+ }
+}
+
+type RoundTrip struct {
+ Variables map[string]string
+ QueryString string
+ Request RequestInfo
+ Response statusText
+ StepNumber int
+}
+
+func NewMockHTTPData(t *testing.T, stepCount int, tfConfigs []string) *MockHTTPData {
+ t.Helper()
+ steps := make([]stepRequests, stepCount)
+ data := MockHTTPData{
+ Steps: steps,
+ Variables: map[string]string{},
+ }
+ data.useTFConfigs(t, tfConfigs)
+ return &data
+}
+
+type VariableChange struct {
+ OldName string
+ NewName string
+ OldValue string
+ NewValue string
+}
+
+type VariablesChangedError struct {
+ Changes []VariableChange
+}
+
+func (e VariablesChangedError) Error() string {
+ return fmt.Sprintf("variables changed: %v", e.Changes)
+}
+
+func (e VariablesChangedError) ChangedNamesMap() map[string]string {
+ result := map[string]string{}
+ for _, change := range e.Changes {
+ result[change.OldName] = change.NewName
+ }
+ return result
+}
+
+func (e VariablesChangedError) ChangedValuesMap() map[string]string {
+ result := map[string]string{}
+ for _, change := range e.Changes {
+ result[change.OldValue] = change.NewValue
+ }
+ return result
+}
+
+type MockHTTPData struct {
+ Variables map[string]string `yaml:"variables"`
+ Steps []stepRequests `yaml:"steps"`
+}
+
+func (m *MockHTTPData) useTFConfigs(t *testing.T, tfConfigs []string) {
+ t.Helper()
+ require.Equal(t, len(tfConfigs), len(m.Steps), "Number of steps in test case and mock data should match")
+ for i := range tfConfigs {
+ tfConfig := tfConfigs[i]
+ configVars := ExtractConfigVariables(t, tfConfig)
+ err := m.UpdateVariablesIgnoreChanges(t, configVars)
+ require.NoError(t, err)
+ m.Steps[i].Config = Literal(tfConfig)
+ }
+}
+
+// Normalize happens after all data is captured, as a cluster.name might only be discovered as a variable in later steps
+func (m *MockHTTPData) Normalize() {
+ for i := range m.Steps {
+ step := &m.Steps[i]
+ for j := range step.RequestResponses {
+ request := &step.RequestResponses[j]
+ m.normalizeRequest(request)
+ }
+ for j := range step.DiffRequests {
+ request := &step.DiffRequests[j]
+ m.normalizeRequest(request)
+ }
+ }
+}
+
+func (m *MockHTTPData) normalizeRequest(request *RequestInfo) {
+ request.Text = useVars(m.Variables, request.Text)
+ for k := range request.Responses {
+ response := &request.Responses[k]
+ response.Text = useVars(m.Variables, response.Text)
+ }
+}
+
+func (m *MockHTTPData) AddRoundtrip(t *testing.T, rt *RoundTrip, isDiff bool) error {
+ t.Helper()
+ rtVariables := rt.Variables
+ err := m.UpdateVariables(t, rtVariables)
+ if vce, ok := err.(*VariablesChangedError); ok {
+ for _, change := range vce.Changes {
+ delete(rtVariables, change.OldName)
+ rtVariables[change.NewName] = change.NewValue
+ }
+ } else if err != nil {
+ return err
+ }
+ normalizedPath := useVars(rtVariables, rt.Request.Path)
+ if rt.QueryString != "" {
+ normalizedPath += "?" + useVars(rtVariables, rt.QueryString)
+ }
+ if rt.StepNumber > len(m.Steps) {
+ return fmt.Errorf("step number %d is out of bounds, are you re-running the same test case?", rt.StepNumber)
+ }
+ step := &m.Steps[rt.StepNumber-1]
+ requestInfo := RequestInfo{
+ Version: rt.Request.Version,
+ Method: rt.Request.Method,
+ Path: normalizedPath,
+ Text: useVars(rtVariables, rt.Request.Text),
+ Responses: []statusText{
+ {
+ Text: useVars(rtVariables, rt.Response.Text),
+ Status: rt.Response.Status,
+ ResponseIndex: rt.Response.ResponseIndex,
+ },
+ },
+ }
+ step.AddRequest(&requestInfo, isDiff)
+ return nil
+}
+
+func (m *MockHTTPData) UpdateVariablesIgnoreChanges(t *testing.T, variables map[string]string) error {
+ t.Helper()
+ err := m.UpdateVariables(t, variables)
+ if _, ok := err.(*VariablesChangedError); ok {
+ return nil
+ }
+ return err
+}
+func (m *MockHTTPData) UpdateVariables(t *testing.T, variables map[string]string) error {
+ t.Helper()
+ var missingValue []string
+ for name, value := range variables {
+ if value == "" {
+ missingValue = append(missingValue, name)
+ }
+ }
+ if len(missingValue) > 0 {
+ sort.Strings(missingValue)
+ return fmt.Errorf("missing values for variables: %v", missingValue)
+ }
+ changes := []VariableChange{}
+ for name, value := range variables {
+ oldValue, exists := m.Variables[name]
+ if !exists {
+ t.Logf("Adding variable %s=%s", name, value)
+ }
+ if exists && oldValue != value {
+ change, err := findVariableChange(t, name, m.Variables, oldValue, value)
+ if err != nil {
+ return err
+ }
+ changes = append(changes, *change)
+ m.Variables[change.NewName] = change.NewValue
+ } else {
+ m.Variables[name] = value
+ }
+ }
+ if len(changes) > 0 {
+ return &VariablesChangedError{Changes: changes}
+ }
+ return nil
+}
+
+func findVariableChange(t *testing.T, name string, vars map[string]string, oldValue, newValue string) (*VariableChange, error) {
+ t.Helper()
+ for suffix := 2; suffix < 10; suffix++ {
+ newName := fmt.Sprintf("%s%d", name, suffix)
+ oldValue2, exists := vars[newName]
+ if exists && oldValue2 != newValue {
+ continue
+ }
+ if !exists {
+ t.Logf("Adding variable %s to %s=%s", name, newName, newValue)
+ }
+ return &VariableChange{name, newName, oldValue, newValue}, nil
+ }
+ return nil, fmt.Errorf("too many variables with the same name and different values: %s", name)
+}
+
+func useVars(vars map[string]string, text string) string {
+ for key, value := range vars {
+ replaceInRegex := regexp.MustCompile(fmt.Sprintf(`\W(%s)\W?`, value))
+ text = replaceInRegex.ReplaceAllStringFunc(text, func(old string) string {
+ lastChar := old[len(old)-1]
+ if lastChar == value[len(value)-1] {
+ return fmt.Sprintf("%c{%s}", old[0], key)
+ }
+ return fmt.Sprintf("%c{%s}%c", old[0], key, lastChar)
+ })
+ }
+ return text
+}
diff --git a/internal/testutil/unit/http_mocker_data_test.go b/internal/testutil/unit/http_mocker_data_test.go
new file mode 100644
index 0000000000..bab58ea148
--- /dev/null
+++ b/internal/testutil/unit/http_mocker_data_test.go
@@ -0,0 +1,90 @@
+package unit_test
+
+import (
+ "strings"
+ "testing"
+
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/unit"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+ "gopkg.in/yaml.v3"
+)
+
+func TestMockHTTPData_UpdateVariables(t *testing.T) {
+ mockData := unit.NewMockHTTPData(t, 1, []string{""})
+ err := mockData.UpdateVariables(t, map[string]string{"groupId": "g1", "clusterName": "c1"})
+ require.NoError(t, err)
+ require.Equal(t, "g1", mockData.Variables["groupId"])
+ require.Equal(t, "c1", mockData.Variables["clusterName"])
+ err = mockData.UpdateVariables(t, map[string]string{"groupId": "g2", "clusterName": "c2"})
+ changeError, ok := err.(*unit.VariablesChangedError)
+ require.True(t, ok)
+ require.Len(t, changeError.Changes, 2)
+ assert.Equal(t, map[string]string{"groupId": "groupId2", "clusterName": "clusterName2"}, changeError.ChangedNamesMap())
+ assert.Equal(t, map[string]string{"g1": "g2", "c1": "c2"}, changeError.ChangedValuesMap())
+ assert.Equal(t, map[string]string{"clusterName": "c1", "clusterName2": "c2", "groupId": "g1", "groupId2": "g2"}, mockData.Variables)
+}
+
+func TestMockHTTPData_AddRoundtrip(t *testing.T) {
+ mockData := unit.NewMockHTTPData(t, 1, []string{""})
+ rt := &unit.RoundTrip{
+ Variables: map[string]string{"groupId": "g1", "clusterName": "c1"},
+ StepNumber: 1,
+ Request: unit.RequestInfo{},
+ }
+ err := mockData.AddRoundtrip(t, rt, false)
+ require.NoError(t, err)
+ require.Equal(t, "g1", mockData.Variables["groupId"])
+ require.Equal(t, "c1", mockData.Variables["clusterName"])
+ rt2 := &unit.RoundTrip{
+ Variables: map[string]string{"groupId": "g2", "clusterName": "c2"},
+ StepNumber: 1,
+ Request: unit.RequestInfo{},
+ }
+ err = mockData.AddRoundtrip(t, rt2, false)
+ require.NoError(t, err)
+ assert.Equal(t, map[string]string{"clusterName": "c1", "clusterName2": "c2", "groupId": "g1", "groupId2": "g2"}, mockData.Variables)
+}
+
+func TestMockDataExtractVars(t *testing.T) {
+ config1 := projectAdvClusterExample
+ config2 := strings.ReplaceAll(config1, "test-acc-tf-c-8022584361920682288", "test-acc-tf-c-8022584361920682289")
+ mockData := unit.NewMockHTTPData(t, 2, []string{config1, config2})
+ expected := map[string]string{
+ "clusterName": "test-acc-tf-c-8022584361920682288",
+ "clusterName2": "test-acc-tf-c-8022584361920682289",
+ "orgId": "65def6ce0f722a1507105aa5",
+ "projectName": "test-acc-tf-p-664077766951329406",
+ }
+ assert.Equal(t, expected, mockData.Variables)
+}
+
+var expectedDump = `variables: {}
+steps:
+ - diff_requests: []
+ request_responses: []
+ - config: |-
+ data "mongodbatlas_advanced_cluster" "test" {
+ project_id = mongodbatlas_advanced_cluster.test.project_id
+ name = mongodbatlas_advanced_cluster.test.name
+ use_replication_spec_per_shard = true
+ }
+ data "mongodbatlas_advanced_clusters" "test" {
+ project_id = mongodbatlas_advanced_cluster.test.project_id
+ use_replication_spec_per_shard = true
+ }
+ diff_requests: []
+ request_responses: []
+`
+
+var tfDsString = "\ndata \"mongodbatlas_advanced_cluster\" \"test\" {\n project_id = mongodbatlas_advanced_cluster.test.project_id\n name = mongodbatlas_advanced_cluster.test.name\n use_replication_spec_per_shard = true\n}\ndata \"mongodbatlas_advanced_clusters\" \"test\" {\n project_id = mongodbatlas_advanced_cluster.test.project_id\n use_replication_spec_per_shard = true\n}\n \n"
+
+func TestDumpingConfigUsesLiteralStyle(t *testing.T) {
+ mockData := unit.NewMockHTTPData(t, 2, []string{"", tfDsString})
+ initialYaml := strings.Builder{}
+ e := yaml.NewEncoder(&initialYaml)
+ e.SetIndent(1)
+ err := e.Encode(mockData)
+ require.NoError(t, err)
+ assert.Equal(t, expectedDump, initialYaml.String())
+}
diff --git a/internal/testutil/unit/http_mocker_round_tripper.go b/internal/testutil/unit/http_mocker_round_tripper.go
new file mode 100644
index 0000000000..3249dec255
--- /dev/null
+++ b/internal/testutil/unit/http_mocker_round_tripper.go
@@ -0,0 +1,267 @@
+package unit
+
+import (
+ "fmt"
+ "net/http"
+ "net/url"
+ "os"
+ "regexp"
+ "strings"
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-testing/terraform"
+ "github.com/jarcoal/httpmock"
+ "github.com/sebdah/goldie/v2"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+ "gopkg.in/yaml.v3"
+)
+
+func NewMockRoundTripper(t *testing.T, config *MockHTTPDataConfig, data *MockHTTPData) (http.RoundTripper, *MockRoundTripper) {
+ t.Helper()
+ myTransport := httpmock.NewMockTransport()
+ var mockTransport http.RoundTripper = myTransport
+ tracker := newMockRoundTripper(t, data)
+ if config != nil {
+ tracker.allowMissingRequests = config.AllowMissingRequests
+ tracker.allowOutOfOrder = config.AllowOutOfOrder
+ }
+ for _, method := range []string{"GET", "POST", "PUT", "DELETE", "PATCH"} {
+ myTransport.RegisterRegexpResponder(method, regexp.MustCompile(".*"), tracker.receiveRequest(method))
+ }
+ return mockTransport, tracker
+}
+func ParseTestDataConfigYAML(filePath string) (*MockHTTPData, error) {
+ data, err := os.ReadFile(filePath)
+ if err != nil {
+ return nil, err
+ }
+ var testData MockHTTPData
+ err = yaml.Unmarshal(data, &testData)
+ if err != nil {
+ return nil, err
+ }
+ return &testData, nil
+}
+
+func newMockRoundTripper(t *testing.T, data *MockHTTPData) *MockRoundTripper {
+ t.Helper()
+ return &MockRoundTripper{
+ t: t,
+ g: goldie.New(t, goldie.WithTestNameForDir(true), goldie.WithNameSuffix(".json")),
+ data: data,
+ logRequests: os.Getenv("TF_LOG") == "DEBUG",
+ currentStepIndex: -1, // increased on the start of the test
+ }
+}
+
+type MockRoundTripper struct {
+ t *testing.T
+ g *goldie.Goldie
+ data *MockHTTPData
+
+ usedResponses map[string]int
+ foundsDiffs map[int]string
+ currentStepIndex int
+ diffResponseIndex int
+ allowMissingRequests bool
+ allowOutOfOrder bool
+ logRequests bool
+ reReadCounter int
+}
+
+func (r *MockRoundTripper) IncreaseStepNumberAndInit() {
+ r.currentStepIndex++
+ err := r.initStep()
+ require.NoError(r.t, err)
+}
+
+func (r *MockRoundTripper) canReturnResponse(responseIndex int) bool {
+ isAfter := responseIndex > r.diffResponseIndex
+ if r.allowOutOfOrder && isAfter {
+ r.t.Logf("allowwingOutOfOrder: response_index=%d is after nextDiffResponse=%d", responseIndex, r.diffResponseIndex)
+ }
+ return r.allowOutOfOrder || !isAfter
+}
+
+func (r *MockRoundTripper) allowReUse(req *RequestInfo) bool {
+ isGet := req.Method == "GET"
+ customReReadOk := req.Method == "POST" && strings.HasSuffix(req.Path, ":validate")
+ return isGet || customReReadOk
+}
+
+func (r *MockRoundTripper) requestFilename(requestID string, index int) string {
+ return strings.ReplaceAll(fmt.Sprintf("%02d_%02d_%s", r.currentStepIndex+1, index+1, requestID), "/", "_")
+}
+
+func (r *MockRoundTripper) manualFilenameIfExist(requestID string, index int) string {
+ defaultFilestem := strings.ReplaceAll(fmt.Sprintf("%02d_%02d_%s", r.currentStepIndex+1, index+1, requestID), "/", "_")
+ manualFilestem := defaultFilestem + "_manual"
+ if _, err := os.Stat("testdata" + "/" + r.t.Name() + "/" + manualFilestem + ".json"); err == nil {
+ return manualFilestem
+ }
+ return defaultFilestem
+}
+
+func (r *MockRoundTripper) initStep() error {
+ r.usedResponses = map[string]int{}
+ r.foundsDiffs = map[int]string{}
+ r.reReadCounter = 0
+ step := r.currentStep()
+ if step == nil {
+ return nil
+ }
+ for index, req := range step.DiffRequests {
+ err := r.g.Update(r.t, r.requestFilename(req.idShort(), index), []byte(req.Text))
+ if err != nil {
+ return err
+ }
+ }
+ r.nextDiffResponseIndex()
+ return nil
+}
+
+func (r *MockRoundTripper) nextDiffResponseIndex() {
+ step := r.currentStep()
+ if step == nil {
+ r.t.Fatal("no more steps, in testCase")
+ }
+ for index, req := range step.DiffRequests {
+ if _, ok := r.foundsDiffs[index]; !ok {
+ r.diffResponseIndex = req.Responses[0].ResponseIndex
+ return
+ }
+ }
+ // no more diffs in current step, any response index will do, assuming never more than 100k responses
+ r.diffResponseIndex = 99999
+}
+
+func (r *MockRoundTripper) currentStep() *stepRequests {
+ if r.currentStepIndex >= len(r.data.Steps) {
+ return nil
+ }
+ return &r.data.Steps[r.currentStepIndex]
+}
+
+func (r *MockRoundTripper) CheckStepRequests(_ *terraform.State) error {
+ missingRequests := []string{}
+ step := r.currentStep()
+ for _, req := range step.RequestResponses {
+ missingRequestsCount := len(req.Responses) - r.usedResponses[req.id()]
+ if missingRequestsCount > 0 {
+ missingIndexes := []string{}
+ for i := range missingRequestsCount {
+ missingResponse := (len(req.Responses) - missingRequestsCount) + i
+ missingIndexes = append(missingIndexes, fmt.Sprintf("%d", req.Responses[missingResponse].ResponseIndex))
+ }
+ missingIndexesStr := strings.Join(missingIndexes, ", ")
+ missingRequests = append(missingRequests, fmt.Sprintf("missing %d requests of %s (%s)", missingRequestsCount, req.idShort(), missingIndexesStr))
+ }
+ }
+ if r.allowMissingRequests {
+ if len(missingRequests) > 0 {
+ r.t.Logf("missing requests:\n%s", strings.Join(missingRequests, "\n"))
+ }
+ } else {
+ assert.Empty(r.t, missingRequests)
+ }
+ missingDiffs := []string{}
+ for i, req := range step.DiffRequests {
+ if _, ok := r.foundsDiffs[i]; !ok {
+ missingDiffs = append(missingDiffs, fmt.Sprintf("missing diff request %s", req.idShort()))
+ }
+ }
+ assert.Empty(r.t, missingDiffs)
+ for index, payload := range r.foundsDiffs {
+ diff := step.DiffRequests[index]
+ filename := r.manualFilenameIfExist(diff.idShort(), index)
+ r.t.Logf("checking diff %s", filename)
+ payloadWithVars := useVars(r.data.Variables, payload)
+ r.g.Assert(r.t, filename, []byte(payloadWithVars))
+ if IsDataUpdate() {
+ r.t.Logf("updating diff %s", filename)
+ UpdateMockDataDiffRequest(r.t, r.currentStepIndex, index, payloadWithVars)
+ }
+ }
+ return nil
+}
+
+func (r *MockRoundTripper) receiveRequest(method string) func(req *http.Request) (*http.Response, error) {
+ return func(req *http.Request) (*http.Response, error) {
+ acceptHeader := req.Header.Get("Accept")
+ version, err := ExtractVersion(acceptHeader)
+ if err != nil {
+ return nil, err
+ }
+ _, payload, err := extractAndNormalizePayload(req.Body)
+ if r.logRequests {
+ r.t.Logf("received request\n %s %s %s\n%s\n", method, req.URL.Path, version, payload)
+ }
+ if err != nil {
+ return nil, err
+ }
+ text, status, err := r.matchRequest(method, version, payload, req.URL)
+ if err != nil {
+ return nil, err
+ }
+ if r.logRequests {
+ r.t.Logf("responding with\n%d\n%s\n", status, text)
+ }
+ response := httpmock.NewStringResponse(status, text)
+ response.Header.Set("Content-Type", fmt.Sprintf("application/vnd.atlas.%s+json;charset=utf-8", version))
+ return response, nil
+ }
+}
+func (r *MockRoundTripper) matchRequest(method, version, payload string, reqURL *url.URL) (response string, statusCode int, err error) {
+ step := r.currentStep()
+ if step == nil {
+ return "", 0, fmt.Errorf("no more steps in mock data")
+ }
+ isDiff := false
+ for index, request := range step.DiffRequests {
+ if !request.Match(r.t, method, version, reqURL, r.data) {
+ continue
+ }
+ if _, ok := r.foundsDiffs[index]; ok {
+ continue
+ }
+ r.foundsDiffs[index] = payload
+ r.nextDiffResponseIndex()
+ isDiff = true
+ break
+ }
+ nextDiffResponse := r.diffResponseIndex
+
+ for _, request := range step.RequestResponses {
+ if !request.Match(r.t, method, version, reqURL, r.data) {
+ continue
+ }
+ requestID := request.id()
+ nextIndex := r.usedResponses[requestID]
+ if nextIndex >= len(request.Responses) {
+ if r.allowReUse(&request) {
+ nextIndex = len(request.Responses) - 1
+ } else {
+ continue
+ }
+ }
+ response := request.Responses[nextIndex]
+ // cannot return a response that is sent after a diff response, unless it is a diff or we ignore order with allowOutOfOrder
+ if !isDiff && !r.canReturnResponse(response.ResponseIndex) {
+ prevIndex := nextIndex - 1
+ if prevIndex >= 0 && r.allowReUse(&request) {
+ r.reReadCounter++
+ if r.reReadCounter > 20 {
+ return "", 0, fmt.Errorf("stuck in a loop trying to re-read the same request: %s %s %s", method, version, reqURL.Path)
+ }
+ response = request.Responses[prevIndex]
+ r.t.Logf("re-reading %s request with response_index=%d as diff hasn't been returned yet (%d)", request.Method, response.ResponseIndex, nextDiffResponse)
+ return replaceVars(response.Text, r.data.Variables), response.Status, nil
+ }
+ continue
+ }
+ r.usedResponses[requestID]++
+ return replaceVars(response.Text, r.data.Variables), response.Status, nil
+ }
+ return "", 0, fmt.Errorf("no matching request found %s %s\n%s\nnextDiffResponse=%d", method, version, reqURL.Path, nextDiffResponse)
+}
diff --git a/internal/testutil/unit/http_mocker_round_tripper_test.go b/internal/testutil/unit/http_mocker_round_tripper_test.go
new file mode 100644
index 0000000000..81b2f47240
--- /dev/null
+++ b/internal/testutil/unit/http_mocker_round_tripper_test.go
@@ -0,0 +1,130 @@
+package unit_test
+
+import (
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "testing"
+
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/unit"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+
+ "go.mongodb.org/atlas-sdk/v20241113003/admin"
+)
+
+const reqPoliciesCreateBody = `{
+ "name": "test-policy",
+ "policies": [
+ {
+ "body": "\t\t\t\n\tforbid (\n\tprincipal,\n\taction == cloud::Action::\"cluster.createEdit\",\n\tresource\n\t) when {\n\tcontext.cluster.cloudProviders.containsAny([cloud::cloudProvider::\"aws\"])\n\t};\n"
+ }
+ ]
+}`
+const reqPoliciesUpdateBody = `{
+ "name": "updated-policy",
+ "policies": [
+ {
+ "body": "\t\t\t\n\tforbid (\n\tprincipal,\n\taction == cloud::Action::\"cluster.createEdit\",\n\tresource\n\t) when {\n\tcontext.cluster.cloudProviders.containsAny([cloud::cloudProvider::\"aws\"])\n\t};\n"
+ }
+ ]
+}`
+
+const reqPoliciesManualValidateDelete = `{}`
+
+func TestMockRoundTripper(t *testing.T) {
+ orgID := "123"
+ resourcePolicyID := "456"
+ data := unit.ReadMockData(t, []string{"", "", ""})
+ data.Variables = map[string]string{}
+ mockTransport, tracker := unit.NewMockRoundTripper(t, &unit.MockHTTPDataConfig{AllowMissingRequests: true}, data)
+ client := &http.Client{
+ Transport: mockTransport,
+ }
+ // Error check
+ tracker.IncreaseStepNumberAndInit()
+ unknownRequest := request("GET", "/v1/cluster/123", "")
+ resp, err := client.Do(unknownRequest)
+ require.ErrorContains(t, err, "no matching request found")
+ assert.Nil(t, resp)
+
+ // Step 1
+ createRequest := request("POST", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies", orgID), reqPoliciesCreateBody)
+ resp, err = client.Do(createRequest)
+
+ require.NoError(t, err)
+ require.Equal(t, 201, resp.StatusCode)
+ err = tracker.CheckStepRequests(nil)
+ require.NoError(t, err)
+ // Step 2
+ tracker.IncreaseStepNumberAndInit()
+ patchRequest := request("PATCH", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies/%s", orgID, resourcePolicyID), reqPoliciesUpdateBody)
+ resp, err = client.Do(patchRequest)
+ require.NoError(t, err)
+ err = tracker.CheckStepRequests(nil)
+ require.NoError(t, err)
+ var policyResp admin.ApiAtlasResourcePolicy
+ err = json.NewDecoder(resp.Body).Decode(&policyResp)
+ require.NoError(t, err)
+ assert.Equal(t, resourcePolicyID, policyResp.GetId())
+
+ // Step 3
+ tracker.IncreaseStepNumberAndInit()
+ // First GET request OK
+ // Second GET request OK
+ getRequest := request("GET", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies/%s", orgID, resourcePolicyID), "")
+ _, err = client.Do(getRequest)
+ require.NoError(t, err)
+ _, err = client.Do(getRequest)
+ require.NoError(t, err)
+ // Third GET request is re-read, since we have not gotten the diff
+ require.NoError(t, err)
+ okResp, err := client.Do(getRequest)
+ require.NoError(t, err)
+ require.Equal(t, 200, okResp.StatusCode)
+
+ // Test _manual diff file (set to {} instead of '')
+ validateRequest := request("DELETE", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies/%s", orgID, resourcePolicyID), reqPoliciesManualValidateDelete)
+ _, err = client.Do(validateRequest)
+ require.NoError(t, err)
+ // Fourth GET request OK, since we have gotten the diff
+ notFoundResp, err := client.Do(getRequest)
+ require.NoError(t, err)
+ notFoundMap := parseMapStringAny(t, notFoundResp)
+ assert.Equal(t, "RESOURCE_POLICY_NOT_FOUND", notFoundMap["errorCode"])
+
+ err = tracker.CheckStepRequests(nil)
+ require.NoError(t, err)
+}
+
+func parseMapStringAny(t *testing.T, resp *http.Response) map[string]any {
+ t.Helper()
+ stringMap := map[string]any{}
+ err := json.NewDecoder(resp.Body).Decode(&stringMap)
+ require.NoError(t, err)
+ return stringMap
+}
+
+func TestMockRoundTripperAllowReRead(t *testing.T) {
+ orgID := "123"
+ data := unit.ReadMockData(t, []string{""})
+ data.Variables = map[string]string{}
+ mockTransport, tracker := unit.NewMockRoundTripper(t, &unit.MockHTTPDataConfig{AllowMissingRequests: true}, data)
+ client := &http.Client{
+ Transport: mockTransport,
+ }
+ tracker.IncreaseStepNumberAndInit()
+ for range []int{0, 1, 2} {
+ getRequest := request("GET", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies", orgID), "")
+ resp, err := client.Do(getRequest)
+ require.NoError(t, err)
+ assert.Equal(t, "returned again", parseMapStringAny(t, resp)["expect"])
+ }
+ createRequest := request("POST", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies", orgID), reqPoliciesCreateBody)
+ resp, err := client.Do(createRequest)
+
+ require.NoError(t, err)
+ require.Equal(t, 201, resp.StatusCode)
+ err = tracker.CheckStepRequests(nil)
+ require.NoError(t, err)
+}
diff --git a/internal/testutil/unit/http_mocker_test.go b/internal/testutil/unit/http_mocker_test.go
index 03f8fe7079..6a274863c9 100644
--- a/internal/testutil/unit/http_mocker_test.go
+++ b/internal/testutil/unit/http_mocker_test.go
@@ -1,8 +1,6 @@
package unit_test
import (
- "encoding/json"
- "fmt"
"io"
"net/http"
"net/url"
@@ -12,8 +10,6 @@ import (
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/unit"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
-
- "go.mongodb.org/atlas-sdk/v20241113003/admin"
)
func TestExtractVersion(t *testing.T) {
@@ -21,141 +17,83 @@ func TestExtractVersion(t *testing.T) {
require.NoError(t, err)
require.Equal(t, "2022-06-01", version)
}
+
+func TestExtractVersionRequestResponse(t *testing.T) {
+ version := unit.ExtractVersionRequestResponse("application/json;", "application/vnd.atlas.2023-01-01+json;charset=utf-8")
+ require.Equal(t, "2023-01-01", version)
+}
+
+func TestExtractVersionRequestResponseNotFound(t *testing.T) {
+ version := unit.ExtractVersionRequestResponse("application/json;", "application/vnd.atlas.2023-01+json;charset=utf-8")
+ require.Equal(t, "", version)
+}
+
+func asURL(t *testing.T, reqPath string) *url.URL {
+ t.Helper()
+ u, err := url.Parse("http://localhost" + reqPath)
+ require.NoError(t, err)
+ return u
+}
+
func TestRequestInfo_Match(t *testing.T) {
req := unit.RequestInfo{
Version: "2022-06-01",
Method: "GET",
Path: "/v1/cluster/{cluster_id}",
}
- assert.True(t, req.Match("GET", "/v1/cluster/123", "2022-06-01", map[string]string{"cluster_id": "123"}))
- assert.False(t, req.Match("GET", "/v1/cluster/123", "2022-06-01", map[string]string{"cluster_id": "456"}))
-}
-
-func request(method, path string) *http.Request {
- return &http.Request{
- Method: method,
- URL: &url.URL{Path: path},
- Header: http.Header{
- "Accept": []string{"application/json; version=2024-08-05"},
- },
+ mockData := unit.MockHTTPData{
+ Variables: map[string]string{"cluster_id": "123"},
}
+ assert.True(t, req.Match(t, "GET", "2022-06-01", asURL(t, "/v1/cluster/123"), &mockData)) // Exact match
+ mockData2 := unit.MockHTTPData{
+ Variables: map[string]string{"cluster_id": "456"},
+ }
+ // Doesn't match the current request, but adds the new variable mapping cluster_id2=123
+ assert.False(t, req.Match(t, "GET", "2022-06-01", asURL(t, "/v1/cluster/123"), &mockData2)) // API Spec match
+ assert.Equal(t, map[string]string{"cluster_id": "456", "cluster_id2": "123"}, mockData2.Variables)
}
-
-const reqPoliciesCreateBody = `{
- "name": "test-policy",
- "policies": [
- {
- "body": "\t\t\t\n\tforbid (\n\tprincipal,\n\taction == cloud::Action::\"cluster.createEdit\",\n\tresource\n\t) when {\n\tcontext.cluster.cloudProviders.containsAny([cloud::cloudProvider::\"aws\"])\n\t};\n"
- }
- ]
-}`
-const reqPoliciesUpdateBody = `{
- "name": "updated-policy",
- "policies": [
- {
- "body": "\t\t\t\n\tforbid (\n\tprincipal,\n\taction == cloud::Action::\"cluster.createEdit\",\n\tresource\n\t) when {\n\tcontext.cluster.cloudProviders.containsAny([cloud::cloudProvider::\"aws\"])\n\t};\n"
- }
- ]
-}`
-
-const reqPoliciesManualValidateDelete = `{}`
-
-func TestMockRoundTripper(t *testing.T) {
- orgID := "123"
- resourcePolicyID := "456"
- vars := map[string]string{
- "orgId": orgID,
- "resourcePolicyId": resourcePolicyID,
+func TestRequestInfo_MatchQuery(t *testing.T) {
+ reqAzure := unit.RequestInfo{
+ Version: "2022-06-01",
+ Method: "GET",
+ Path: "/api/atlas/v2/groups/{groupId3}/containers?providerName=AZURE",
}
- mockTransport, checkFunc := unit.MockRoundTripper(t, vars, &unit.MockHTTPDataConfig{AllowMissingRequests: true})
- client := &http.Client{
- Transport: mockTransport,
+ assert.Equal(t, []string{"providerName"}, reqAzure.QueryVars())
+ expectedNormalized := "/api/atlas/v2/groups/6746cee66f62fc3c122a3b82/containers?providerName=AZURE"
+ reqURLAzure := asURL(t, "/api/atlas/v2/groups/6746cee66f62fc3c122a3b82/containers?includeCount=true&itemsPerPage=100&pageNum=1&providerName=AZURE")
+ assert.Equal(t, expectedNormalized, reqAzure.NormalizePath(reqURLAzure))
+ mockData := unit.MockHTTPData{
+ Variables: map[string]string{"groupId3": "6746cee66f62fc3c122a3b82"},
}
- // Error check
- unknownRequest := request("GET", "/v1/cluster/123")
- resp, err := client.Do(unknownRequest)
- require.ErrorContains(t, err, "no matching request found")
- assert.Nil(t, resp)
+ assert.True(t, reqAzure.Match(t, "GET", "2022-06-01", reqURLAzure, &mockData))
- // Step 1
- createRequest := request("POST", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies", orgID))
- createRequest.Body = io.NopCloser(strings.NewReader(reqPoliciesCreateBody))
- resp, err = client.Do(createRequest)
+ assert.Equal(t, map[string]string{"groupId3": "6746cee66f62fc3c122a3b82"}, mockData.Variables)
+ reqURLAws := asURL(t, "/api/atlas/v2/groups/6746cee66f62fc3c122a3b82/containers?includeCount=true&itemsPerPage=100&pageNum=1&providerName=AWS")
+ assert.False(t, reqAzure.Match(t, "GET", "2022-06-01", reqURLAws, &mockData))
+ assert.Equal(t, map[string]string{"groupId3": "6746cee66f62fc3c122a3b82"}, mockData.Variables)
- require.NoError(t, err)
- require.Equal(t, 201, resp.StatusCode)
- err = checkFunc(nil)
- require.NoError(t, err)
- // Step 2
- patchRequest := request("PATCH", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies/%s", orgID, resourcePolicyID))
- patchRequest.Body = io.NopCloser(strings.NewReader(reqPoliciesUpdateBody))
- resp, err = client.Do(patchRequest)
- require.NoError(t, err)
- err = checkFunc(nil)
- require.NoError(t, err)
- var policyResp admin.ApiAtlasResourcePolicy
- err = json.NewDecoder(resp.Body).Decode(&policyResp)
- require.NoError(t, err)
- assert.Equal(t, resourcePolicyID, policyResp.GetId())
-
- // Step 3
- // First GET request OK
- // Second GET request OK
- getRequest := request("GET", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies/%s", orgID, resourcePolicyID))
- _, err = client.Do(getRequest)
- require.NoError(t, err)
- _, err = client.Do(getRequest)
- require.NoError(t, err)
- // Third GET request FAIL with no match as there are no more responses until after DELETE
- _, err = client.Do(getRequest)
- require.ErrorContains(t, err, "no matching request found")
-
- // Test _manual diff file (set to {} instead of '')
- validateRequest := request("DELETE", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies/%s", orgID, resourcePolicyID))
- validateRequest.Body = io.NopCloser(strings.NewReader(reqPoliciesManualValidateDelete))
- _, err = client.Do(validateRequest)
- require.NoError(t, err)
- // Fourth GET request OK, since we have gotten the diff
- notFoundResp, err := client.Do(getRequest)
- require.NoError(t, err)
- notFoundMap := parseMapStringAny(t, notFoundResp)
- assert.Equal(t, "RESOURCE_POLICY_NOT_FOUND", notFoundMap["errorCode"])
-
- err = checkFunc(nil)
- require.NoError(t, err)
-}
-
-func parseMapStringAny(t *testing.T, resp *http.Response) map[string]any {
- t.Helper()
- stringMap := map[string]any{}
- err := json.NewDecoder(resp.Body).Decode(&stringMap)
- require.NoError(t, err)
- return stringMap
+ reqAws := unit.RequestInfo{
+ Version: "2022-06-01",
+ Method: "GET",
+ Path: "/api/atlas/v2/groups/{groupId3}/containers?providerName=AWS",
+ }
+ assert.True(t, reqAws.Match(t, "GET", "2022-06-01", reqURLAws, &mockData))
}
-func TestMockRoundTripperAllowReRead(t *testing.T) {
- orgID := "123"
- resourcePolicyID := "456"
- vars := map[string]string{
- "orgId": orgID,
- "resourcePolicyId": resourcePolicyID,
+func request(method, path, body string) *http.Request {
+ reqURL, err := url.Parse("http://localhost" + path)
+ if err != nil {
+ panic(err)
}
- mockTransport, checkFunc := unit.MockRoundTripper(t, vars, &unit.MockHTTPDataConfig{AllowReReadGet: true, AllowMissingRequests: true})
- client := &http.Client{
- Transport: mockTransport,
+ req := http.Request{
+ Method: method,
+ URL: reqURL,
+ Header: http.Header{
+ "Accept": []string{"application/json; version=2024-08-05"},
+ },
}
- for range []int{0, 1, 2} {
- getRequest := request("GET", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies", orgID))
- resp, err := client.Do(getRequest)
- require.NoError(t, err)
- assert.Equal(t, "returned again", parseMapStringAny(t, resp)["expect"])
+ if body != "" {
+ req.Body = io.NopCloser(strings.NewReader(body))
}
- createRequest := request("POST", fmt.Sprintf("/api/atlas/v2/orgs/%s/resourcePolicies", orgID))
- createRequest.Body = io.NopCloser(strings.NewReader(reqPoliciesCreateBody))
- resp, err := client.Do(createRequest)
-
- require.NoError(t, err)
- require.Equal(t, 201, resp.StatusCode)
- err = checkFunc(nil)
- require.NoError(t, err)
+ return &req
}
diff --git a/internal/testutil/unit/http_path_normalizing.go b/internal/testutil/unit/http_path_normalizing.go
new file mode 100644
index 0000000000..650532f7eb
--- /dev/null
+++ b/internal/testutil/unit/http_path_normalizing.go
@@ -0,0 +1,132 @@
+package unit
+
+import (
+ "encoding/json"
+ "fmt"
+ "io"
+ "net/url"
+ "regexp"
+ "strings"
+)
+
+type APISpecPath struct {
+ Path string
+}
+
+func (a *APISpecPath) Variables(path string) map[string]string {
+ variables := make(map[string]string)
+ expectedParts := strings.Split(a.Path, "/")
+ actualParts := strings.Split(path, "/")
+ for i, part := range expectedParts {
+ if strings.HasPrefix(part, "{") && strings.HasSuffix(part, "}") {
+ variables[part[1:len(part)-1]] = actualParts[i]
+ }
+ }
+ return variables
+}
+
+func (a *APISpecPath) Match(path string) bool {
+ expectedParts := strings.Split(a.Path, "/")
+ actualParts := strings.Split(path, "/")
+ if len(expectedParts) != len(actualParts) {
+ return false
+ }
+ for i, expected := range expectedParts {
+ actual := actualParts[i]
+ if expected == actual {
+ continue
+ }
+ if strings.HasPrefix(expected, "{") && strings.HasSuffix(expected, "}") {
+ continue
+ }
+ return false
+ }
+ return true
+}
+
+func removeQueryParamsAndTrim(path string) string {
+ if strings.Contains(path, "?") {
+ path = strings.Split(path, "?")[0]
+ }
+ return strings.TrimRight(path, "/")
+}
+
+func FindNormalizedPath(path string, apiSpecPaths *[]APISpecPath) (APISpecPath, error) {
+ path = removeQueryParamsAndTrim(path)
+ for _, apiSpecPath := range *apiSpecPaths {
+ if apiSpecPath.Match(path) {
+ return apiSpecPath, nil
+ }
+ }
+ return APISpecPath{}, fmt.Errorf("could not find path: %s", path)
+}
+
+func replaceVars(text string, vars map[string]string) string {
+ for key, value := range vars {
+ text = strings.ReplaceAll(text, fmt.Sprintf("{%s}", key), value)
+ }
+ return text
+}
+
+var versionDatePattern = regexp.MustCompile(`(\d{4}-\d{2}-\d{2})`)
+
+func ExtractVersion(contentType string) (string, error) {
+ match := versionDatePattern.FindStringSubmatch(contentType)
+ if len(match) > 1 {
+ return match[1], nil
+ }
+ return "", fmt.Errorf("could not extract version from %s header", contentType)
+}
+
+func ExtractVersionRequestResponse(headerValueRequest, headerValueResponse string) string {
+ found := versionDatePattern.FindString(headerValueRequest)
+ if found != "" {
+ return found
+ }
+ return versionDatePattern.FindString(headerValueResponse)
+}
+
+func extractAndNormalizePayload(body io.Reader) (originalPayload, normalizedPayload string, err error) {
+ if body != nil {
+ payloadBytes, err := io.ReadAll(body)
+ if err != nil {
+ return "", "", err
+ }
+ originalPayload = string(payloadBytes)
+ }
+ normalizedPayload, err = normalizePayload(originalPayload)
+ if err != nil {
+ return "", "", err
+ }
+ return originalPayload, normalizedPayload, nil
+}
+
+func normalizePayload(payload string) (string, error) {
+ if payload == "" {
+ return "", nil
+ }
+ var tempHolder any
+ err := json.Unmarshal([]byte(payload), &tempHolder)
+ if err != nil {
+ return "", err
+ }
+ sb := strings.Builder{}
+ encoder := json.NewEncoder(&sb)
+ encoder.SetIndent("", " ")
+ err = encoder.Encode(tempHolder)
+ if err != nil {
+ return "", err
+ }
+ return strings.TrimSuffix(sb.String(), "\n"), nil
+}
+
+func relevantQuery(queryVars []string, queryValues url.Values) string {
+ queryStrings := []string{}
+ for _, queryVar := range queryVars {
+ foundValue := queryValues.Get(queryVar)
+ if foundValue != "" {
+ queryStrings = append(queryStrings, fmt.Sprintf("%s=%s", queryVar, foundValue))
+ }
+ }
+ return strings.Join(queryStrings, "&")
+}
diff --git a/internal/testutil/unit/main_test.go b/internal/testutil/unit/main_test.go
new file mode 100644
index 0000000000..670797ecdb
--- /dev/null
+++ b/internal/testutil/unit/main_test.go
@@ -0,0 +1,14 @@
+package unit_test
+
+import (
+ "os"
+ "testing"
+
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/unit"
+)
+
+func TestMain(m *testing.M) {
+ unit.InitializeAPISpecPaths()
+ exitCode := m.Run()
+ os.Exit(exitCode)
+}
diff --git a/internal/testutil/unit/provider_mock.go b/internal/testutil/unit/provider_mock.go
index 7afadd8640..18ec2fd897 100644
--- a/internal/testutil/unit/provider_mock.go
+++ b/internal/testutil/unit/provider_mock.go
@@ -16,12 +16,20 @@ import (
"github.com/mongodb/terraform-provider-mongodbatlas/internal/provider"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+
fwProvider "github.com/hashicorp/terraform-plugin-framework/provider"
)
+type HTTPClientModifier interface {
+ ModifyHTTPClient(*http.Client) error
+ ResetHTTPClient(*http.Client)
+}
+
type ProviderMocked struct {
OriginalProvider *provider.MongodbtlasProvider
- MockRoundTripper http.RoundTripper
+ ClientModifier HTTPClientModifier
t *testing.T
}
@@ -42,7 +50,12 @@ func (p *ProviderMocked) Configure(ctx context.Context, req fwProvider.Configure
if httpClient == nil {
p.t.Fatal("HTTPClient is nil, mocking will fail")
}
- httpClient.Transport = p.MockRoundTripper
+ if p.ClientModifier != nil {
+ err := p.ClientModifier.ModifyHTTPClient(httpClient)
+ if err != nil {
+ p.t.Fatal(err)
+ }
+ }
}
func (p *ProviderMocked) DataSources(ctx context.Context) []func() datasource.DataSource {
@@ -53,9 +66,23 @@ func (p *ProviderMocked) Resources(ctx context.Context) []func() resource.Resour
}
// Similar to provider.go#muxProviderFactory
-func muxProviderFactory(t *testing.T, mockRoundTripper http.RoundTripper) func() tfprotov6.ProviderServer {
+func muxProviderFactory(t *testing.T, clientModifier HTTPClientModifier) func() tfprotov6.ProviderServer {
t.Helper()
v2Provider := provider.NewSdkV2Provider(nil)
+ v2ProviderConfigureContextFunc := v2Provider.ConfigureContextFunc
+ v2Provider.ConfigureContextFunc = func(ctx context.Context, d *schema.ResourceData) (any, diag.Diagnostics) {
+ resp, diags := v2ProviderConfigureContextFunc(ctx, d)
+ client, ok := resp.(*config.MongoDBClient)
+ if !ok {
+ t.Fatalf("Failed to cast response to MongoDBClient, Got type %T", resp)
+ }
+ httpClient := client.AtlasV2.GetConfig().HTTPClient
+ err := clientModifier.ModifyHTTPClient(httpClient)
+ if err != nil {
+ t.Fatalf("Failed to modify HTTPClient: %s", err)
+ }
+ return resp, diags
+ }
fwProviderInstance := provider.NewFrameworkProvider(nil)
fwProviderInstanceTyped, ok := fwProviderInstance.(*provider.MongodbtlasProvider)
if !ok {
@@ -63,7 +90,7 @@ func muxProviderFactory(t *testing.T, mockRoundTripper http.RoundTripper) func()
}
mockedProvider := &ProviderMocked{
OriginalProvider: fwProviderInstanceTyped,
- MockRoundTripper: mockRoundTripper,
+ ClientModifier: clientModifier,
t: t,
}
ctx := context.Background()
@@ -81,11 +108,11 @@ func muxProviderFactory(t *testing.T, mockRoundTripper http.RoundTripper) func()
return muxServer.ProviderServer
}
-func TestAccProviderV6FactoriesWithMock(t *testing.T, mockRoundTripper http.RoundTripper) map[string]func() (tfprotov6.ProviderServer, error) {
+func TestAccProviderV6FactoriesWithMock(t *testing.T, clientModifier HTTPClientModifier) map[string]func() (tfprotov6.ProviderServer, error) {
t.Helper()
return map[string]func() (tfprotov6.ProviderServer, error){
acc.ProviderNameMongoDBAtlas: func() (tfprotov6.ProviderServer, error) {
- return muxProviderFactory(t, mockRoundTripper)(), nil
+ return muxProviderFactory(t, clientModifier)(), nil
},
}
}
diff --git a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json b/internal/testutil/unit/testdata/CaptureTest/createCluster.json
similarity index 66%
rename from internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
rename to internal/testutil/unit/testdata/CaptureTest/createCluster.json
index 6778b1311a..778003df1c 100644
--- a/internal/service/advancedclustertpf/testdata/TestMockClusterAdvancedCluster_tenantUpgrade/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
+++ b/internal/testutil/unit/testdata/CaptureTest/createCluster.json
@@ -1,23 +1,21 @@
{
"clusterType": "REPLICASET",
- "labels": [],
- "name": "test-acc-tf-c-878317177498266511",
+ "name": "test-acc-tf-c-7871793563057636102",
"replicationSpecs": [
{
"regionConfigs": [
{
- "backingProviderName": "AWS",
"electableSpecs": {
"instanceSize": "M5",
"nodeCount": 0
},
"priority": 7,
"providerName": "TENANT",
- "regionName": "US_EAST_1"
+ "regionName": "US_EAST_1",
+ "backingProviderName": "AWS"
}
],
"zoneName": "ZoneName managed by Terraform"
}
- ],
- "tags": []
+ ]
}
\ No newline at end of file
diff --git a/internal/testutil/unit/testdata/CaptureTest/createClusterResponse.json b/internal/testutil/unit/testdata/CaptureTest/createClusterResponse.json
new file mode 100644
index 0000000000..0ee52a72d7
--- /dev/null
+++ b/internal/testutil/unit/testdata/CaptureTest/createClusterResponse.json
@@ -0,0 +1,61 @@
+{
+ "backupEnabled": true,
+ "biConnector": {
+ "enabled": false,
+ "readPreference": "secondary"
+ },
+ "clusterType": "REPLICASET",
+ "connectionStrings": {},
+ "createDate": "2024-11-27T07:49:10Z",
+ "diskWarmingMode": "FULLY_WARMED",
+ "encryptionAtRestProvider": "NONE",
+ "featureCompatibilityVersion": "8.0",
+ "globalClusterSelfManagedSharding": false,
+ "groupId": "6746ceed6f62fc3c122a3e0e",
+ "id": "6746cef66f62fc3c122a3fe9",
+ "labels": [],
+ "links": [
+ {
+ "href": "https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102",
+ "rel": "self"
+ },
+ {
+ "href": "https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/backup/restoreJobs",
+ "rel": "https://cloud.mongodb.com/restoreJobs"
+ },
+ {
+ "href": "https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/backup/snapshots",
+ "rel": "https://cloud.mongodb.com/snapshots"
+ }
+ ],
+ "mongoDBMajorVersion": "8.0",
+ "mongoDBVersion": "8.0.3",
+ "name": "test-acc-tf-c-7871793563057636102",
+ "paused": false,
+ "pitEnabled": false,
+ "redactClientLogData": false,
+ "replicationSpecs": [
+ {
+ "id": "6746cef66f62fc3c122a3fcb",
+ "regionConfigs": [
+ {
+ "electableSpecs": {
+ "effectiveInstanceSize": "M5",
+ "instanceSize": "M5",
+ "diskSizeGB": 5.0
+ },
+ "backingProviderName": "AWS",
+ "priority": 7,
+ "providerName": "TENANT",
+ "regionName": "US_EAST_1"
+ }
+ ],
+ "zoneId": "6746cef66f62fc3c122a3fc9",
+ "zoneName": "ZoneName managed by Terraform"
+ }
+ ],
+ "rootCertType": "ISRGROOTX1",
+ "stateName": "CREATING",
+ "terminationProtectionEnabled": false,
+ "versionReleaseSystem": "LTS"
+}
\ No newline at end of file
diff --git a/internal/testutil/unit/testdata/CaptureTest/getClusterIdle.json b/internal/testutil/unit/testdata/CaptureTest/getClusterIdle.json
new file mode 100644
index 0000000000..49eab3acac
--- /dev/null
+++ b/internal/testutil/unit/testdata/CaptureTest/getClusterIdle.json
@@ -0,0 +1,65 @@
+{
+ "backupEnabled": true,
+ "biConnector": {
+ "enabled": false,
+ "readPreference": "secondary"
+ },
+ "clusterType": "REPLICASET",
+ "connectionStrings": {
+ "standard": "mongodb://ac-a43sbzi-shard-00-00.efwnixe.mongodb-dev.net:27017,ac-a43sbzi-shard-00-01.efwnixe.mongodb-dev.net:27017,ac-a43sbzi-shard-00-02.efwnixe.mongodb-dev.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-13c9xc-shard-0",
+ "standardSrv": "mongodb+srv://test-acc-tf-c-787179356.efwnixe.mongodb-dev.net"
+ },
+ "createDate": "2024-11-27T07:49:10Z",
+ "diskWarmingMode": "FULLY_WARMED",
+ "encryptionAtRestProvider": "NONE",
+ "featureCompatibilityVersion": "8.0",
+ "globalClusterSelfManagedSharding": false,
+ "groupId": "6746ceed6f62fc3c122a3e0e",
+ "id": "6746cef66f62fc3c122a3fe9",
+ "labels": [],
+ "links": [
+ {
+ "href": "https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102",
+ "rel": "self"
+ },
+ {
+ "href": "https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/backup/restoreJobs",
+ "rel": "https://cloud.mongodb.com/restoreJobs"
+ },
+ {
+ "href": "https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/backup/snapshots",
+ "rel": "https://cloud.mongodb.com/snapshots"
+ }
+ ],
+ "mongoDBMajorVersion": "8.0",
+ "mongoDBVersion": "8.0.3",
+ "name": "test-acc-tf-c-7871793563057636102",
+ "paused": false,
+ "pitEnabled": false,
+ "redactClientLogData": false,
+ "replicationSpecs": [
+ {
+ "id": "6746cef66f62fc3c122a3fcb",
+ "regionConfigs": [
+ {
+ "electableSpecs": {
+ "effectiveInstanceSize": "M5",
+ "instanceSize": "M5",
+ "diskSizeGB": 5.0
+ },
+ "backingProviderName": "AWS",
+ "priority": 7,
+ "providerName": "TENANT",
+ "regionName": "US_EAST_1"
+ }
+ ],
+ "zoneId": "6746cef66f62fc3c122a3fc9",
+ "zoneName": "ZoneName managed by Terraform"
+ }
+ ],
+ "rootCertType": "ISRGROOTX1",
+ "stateName": "IDLE",
+ "tags": [],
+ "terminationProtectionEnabled": false,
+ "versionReleaseSystem": "LTS"
+}
\ No newline at end of file
diff --git a/internal/testutil/unit/testdata/CaptureTest/getContainersAws.json b/internal/testutil/unit/testdata/CaptureTest/getContainersAws.json
new file mode 100644
index 0000000000..203af21a8f
--- /dev/null
+++ b/internal/testutil/unit/testdata/CaptureTest/getContainersAws.json
@@ -0,0 +1,19 @@
+{
+ "links": [
+ {
+ "href": "https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746cee66f62fc3c122a3b82/containers?includeCount=true&providerName=AWS&pageNum=1&itemsPerPage=100",
+ "rel": "self"
+ }
+ ],
+ "results": [
+ {
+ "atlasCidrBlock": "192.168.248.0/21",
+ "id": "6746ceedaef48d1cb265896b",
+ "providerName": "AWS",
+ "provisioned": true,
+ "regionName": "EU_WEST_1",
+ "vpcId": "vpc-00b20ecca20a410e2"
+ }
+ ],
+ "totalCount": 1
+}
\ No newline at end of file
diff --git a/internal/testutil/unit/testdata/CaptureTest/getContainersAzure.json b/internal/testutil/unit/testdata/CaptureTest/getContainersAzure.json
new file mode 100644
index 0000000000..c5837403b2
--- /dev/null
+++ b/internal/testutil/unit/testdata/CaptureTest/getContainersAzure.json
@@ -0,0 +1,20 @@
+{
+ "links": [
+ {
+ "href": "https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746cef5aef48d1cb2658a7f/containers?includeCount=true&providerName=AZURE&pageNum=1&itemsPerPage=100",
+ "rel": "self"
+ }
+ ],
+ "results": [
+ {
+ "atlasCidrBlock": "192.168.248.0/21",
+ "azureSubscriptionId": "591236d43d098d433845860f",
+ "id": "6746cefbaef48d1cb2658bbb",
+ "providerName": "AZURE",
+ "provisioned": true,
+ "region": "US_EAST_2",
+ "vnetName": "vnet_6746cefbaef48d1cb2658bbb_ykngkrlx"
+ }
+ ],
+ "totalCount": 1
+}
\ No newline at end of file
diff --git a/internal/testutil/unit/testdata/TestCaptureMockConfigClientModifier_clusterExample/TestCaptureMockConfigClientModifier_clusterExample.yaml b/internal/testutil/unit/testdata/TestCaptureMockConfigClientModifier_clusterExample/TestCaptureMockConfigClientModifier_clusterExample.yaml
new file mode 100644
index 0000000000..562b09f8d5
--- /dev/null
+++ b/internal/testutil/unit/testdata/TestCaptureMockConfigClientModifier_clusterExample/TestCaptureMockConfigClientModifier_clusterExample.yaml
@@ -0,0 +1,65 @@
+variables:
+ clusterName: test-acc-tf-c-7871793563057636102
+ groupId: g1
+ groupId2: 6746ceed6f62fc3c122a3e0e
+ groupId3: 6746cee66f62fc3c122a3b82
+steps:
+ - config: |-
+ resource "dummy" "test"{
+ step = 1
+ someString = "my-string"
+ }
+ diff_requests:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-08-05'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"name\": \"test-acc-tf-c-7871793563057636102\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\",\n \"nodeCount\": 0\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-27T07:49:10Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"6746ceed6f62fc3c122a3e0e\",\n \"id\": \"6746cef66f62fc3c122a3fe9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"test-acc-tf-c-7871793563057636102\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cef66f62fc3c122a3fcb\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746cef66f62fc3c122a3fc9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId}/clusters
+ method: POST
+ version: '2024-08-05'
+ text: "{\n \"clusterType\": \"REPLICASET\",\n \"name\": \"test-acc-tf-c-7871793563057636102\",\n \"replicationSpecs\": [\n {\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"instanceSize\": \"M5\",\n \"nodeCount\": 0\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ]\n}"
+ responses:
+ - response_index: 1
+ status: 201
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-27T07:49:10Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"6746ceed6f62fc3c122a3e0e\",\n \"id\": \"6746cef66f62fc3c122a3fe9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"test-acc-tf-c-7871793563057636102\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cef66f62fc3c122a3fcb\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746cef66f62fc3c122a3fc9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - diff_requests: []
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId2}/clusters/{clusterName}
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 2
+ status: 200
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {},\n \"createDate\": \"2024-11-27T07:49:10Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId2}\",\n \"id\": \"6746cef66f62fc3c122a3fe9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId2}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId2}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId2}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cef66f62fc3c122a3fcb\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746cef66f62fc3c122a3fc9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"CREATING\",\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - response_index: 3
+ status: 200
+ duplicate_responses: 1
+ text: "{\n \"backupEnabled\": true,\n \"biConnector\": {\n \"enabled\": false,\n \"readPreference\": \"secondary\"\n },\n \"clusterType\": \"REPLICASET\",\n \"connectionStrings\": {\n \"standard\": \"mongodb://ac-a43sbzi-shard-00-00.efwnixe.mongodb-dev.net:27017,ac-a43sbzi-shard-00-01.efwnixe.mongodb-dev.net:27017,ac-a43sbzi-shard-00-02.efwnixe.mongodb-dev.net:27017/?ssl=true\\u0026authSource=admin\\u0026replicaSet=atlas-13c9xc-shard-0\",\n \"standardSrv\": \"mongodb+srv://test-acc-tf-c-787179356.efwnixe.mongodb-dev.net\"\n },\n \"createDate\": \"2024-11-27T07:49:10Z\",\n \"diskWarmingMode\": \"FULLY_WARMED\",\n \"encryptionAtRestProvider\": \"NONE\",\n \"featureCompatibilityVersion\": \"8.0\",\n \"globalClusterSelfManagedSharding\": false,\n \"groupId\": \"{groupId2}\",\n \"id\": \"6746cef66f62fc3c122a3fe9\",\n \"labels\": [],\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId2}/clusters/{clusterName}\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId2}/clusters/{clusterName}/backup/restoreJobs\",\n \"rel\": \"https://cloud.mongodb.com/restoreJobs\"\n },\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId2}/clusters/{clusterName}/backup/snapshots\",\n \"rel\": \"https://cloud.mongodb.com/snapshots\"\n }\n ],\n \"mongoDBMajorVersion\": \"8.0\",\n \"mongoDBVersion\": \"8.0.3\",\n \"name\": \"{clusterName}\",\n \"paused\": false,\n \"pitEnabled\": false,\n \"redactClientLogData\": false,\n \"replicationSpecs\": [\n {\n \"id\": \"6746cef66f62fc3c122a3fcb\",\n \"regionConfigs\": [\n {\n \"backingProviderName\": \"AWS\",\n \"electableSpecs\": {\n \"diskSizeGB\": 5,\n \"effectiveInstanceSize\": \"M5\",\n \"instanceSize\": \"M5\"\n },\n \"priority\": 7,\n \"providerName\": \"TENANT\",\n \"regionName\": \"US_EAST_1\"\n }\n ],\n \"zoneId\": \"6746cef66f62fc3c122a3fc9\",\n \"zoneName\": \"ZoneName managed by Terraform\"\n }\n ],\n \"rootCertType\": \"ISRGROOTX1\",\n \"stateName\": \"IDLE\",\n \"tags\": [],\n \"terminationProtectionEnabled\": false,\n \"versionReleaseSystem\": \"LTS\"\n}"
+ - config: |-
+ resource "dummy" "test"{
+ step = 3
+ }
+ diff_requests: []
+ request_responses:
+ - path: /api/atlas/v2/groups/{groupId3}/containers?providerName=AWS
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 5
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/{groupId3}/containers?includeCount=true\\u0026providerName=AWS\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"id\": \"6746ceedaef48d1cb265896b\",\n \"providerName\": \"AWS\",\n \"provisioned\": true,\n \"regionName\": \"EU_WEST_1\",\n \"vpcId\": \"vpc-00b20ecca20a410e2\"\n }\n ],\n \"totalCount\": 1\n}"
+ - path: /api/atlas/v2/groups/{groupId3}/containers?providerName=AZURE
+ method: GET
+ version: '2024-08-05'
+ text: ""
+ responses:
+ - response_index: 6
+ status: 200
+ text: "{\n \"links\": [\n {\n \"href\": \"https://cloud-dev.mongodb.com/api/atlas/v2/groups/6746cef5aef48d1cb2658a7f/containers?includeCount=true\\u0026providerName=AZURE\\u0026pageNum=1\\u0026itemsPerPage=100\",\n \"rel\": \"self\"\n }\n ],\n \"results\": [\n {\n \"atlasCidrBlock\": \"192.168.248.0/21\",\n \"azureSubscriptionId\": \"591236d43d098d433845860f\",\n \"id\": \"6746cefbaef48d1cb2658bbb\",\n \"providerName\": \"AZURE\",\n \"provisioned\": true,\n \"region\": \"US_EAST_2\",\n \"vnetName\": \"vnet_6746cefbaef48d1cb2658bbb_ykngkrlx\"\n }\n ],\n \"totalCount\": 1\n}"
diff --git a/internal/testutil/unit/testdata/TestMockRoundTripperAllowReRead.yaml b/internal/testutil/unit/testdata/TestMockRoundTripperAllowReRead.yaml
index a24f4b8c3a..7f5c4c6fdd 100644
--- a/internal/testutil/unit/testdata/TestMockRoundTripperAllowReRead.yaml
+++ b/internal/testutil/unit/testdata/TestMockRoundTripperAllowReRead.yaml
@@ -1,4 +1,3 @@
-step_count: 1
steps:
- diff_requests:
- version: '2024-08-05'
diff --git a/internal/testutil/unit/tf_config_modifier.go b/internal/testutil/unit/tf_config_modifier.go
new file mode 100644
index 0000000000..1213e8319b
--- /dev/null
+++ b/internal/testutil/unit/tf_config_modifier.go
@@ -0,0 +1,71 @@
+package unit
+
+import (
+ "strings"
+ "testing"
+
+ "github.com/hashicorp/hcl/v2/hclsyntax"
+ "github.com/hashicorp/hcl/v2/hclwrite"
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/hcl"
+)
+
+type TFConfigReplacementType int
+
+const (
+ TFConfigReplacementString TFConfigReplacementType = iota
+)
+
+// Current assumption, variable name must match API Spec Path Param name
+var variableAttributes = map[string]func(string, string) string{
+ "name": func(resourceName string, attrName string) string {
+ return shortName(resourceName) + "Name"
+ },
+ "org_id": func(resourceName string, attrName string) string {
+ return "orgId"
+ },
+ "project_id": func(resourceName string, attrName string) string {
+ return "groupId"
+ },
+}
+
+func ExtractConfigVariables(t *testing.T, config string) map[string]string {
+ t.Helper()
+ if config == "" {
+ return nil
+ }
+ vars := map[string]string{}
+ parse := hcl.GetDefParser(t, config)
+ for _, resource := range parse.Body().Blocks() {
+ if resource.Type() != "resource" {
+ continue
+ }
+ for name, attr := range resource.Body().Attributes() {
+ varNameFunc, ok := variableAttributes[name]
+ if !ok {
+ continue
+ }
+ varName := varNameFunc(resource.Labels()[0], name)
+ varValue := extractStringValue(attr.BuildTokens(nil))
+ if varValue != "" {
+ vars[varName] = varValue
+ }
+ }
+ }
+ return vars
+}
+
+func shortName(resourceName string) string {
+ parts := strings.Split(resourceName, "_")
+ return parts[len(parts)-1]
+}
+
+func extractStringValue(tokens hclwrite.Tokens) string {
+ var str string
+ for _, token := range tokens {
+ if token.Type == hclsyntax.TokenQuotedLit {
+ str = string(token.Bytes)
+ break
+ }
+ }
+ return str
+}
diff --git a/internal/testutil/unit/tf_config_modifier_test.go b/internal/testutil/unit/tf_config_modifier_test.go
new file mode 100644
index 0000000000..78a89f5a8b
--- /dev/null
+++ b/internal/testutil/unit/tf_config_modifier_test.go
@@ -0,0 +1,70 @@
+package unit_test
+
+import (
+ "testing"
+
+ "github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/unit"
+ "github.com/stretchr/testify/require"
+)
+
+var projectAdvClusterExample = `
+resource "mongodbatlas_project" "test" {
+ org_id = "65def6ce0f722a1507105aa5"
+ name = "test-acc-tf-p-664077766951329406"
+}
+
+resource "mongodbatlas_advanced_cluster" "test" {
+ project_id = mongodbatlas_project.test.id
+ name = "test-acc-tf-c-8022584361920682288"
+ cluster_type = "REPLICASET"
+ backup_enabled = false
+
+ replication_specs {
+ region_configs {
+ provider_name = "AWS"
+ priority = 6
+ region_name = "US_WEST_2"
+ electable_specs {
+ node_count = 1
+ instance_size = "M10"
+ }
+ }
+
+ region_configs {
+ provider_name = "AWS"
+ priority = 7
+ region_name = "US_EAST_1"
+ electable_specs {
+ node_count = 2
+ instance_size = "M10"
+ }
+ }
+ }
+}`
+
+func TestExtractConfigVariables(t *testing.T) {
+ tests := map[string]struct {
+ expected map[string]string
+ config string
+ }{
+ "Extract variables from a long example": {
+ config: projectAdvClusterExample,
+ expected: map[string]string{
+ "orgId": "65def6ce0f722a1507105aa5",
+ "projectName": "test-acc-tf-p-664077766951329406",
+ "clusterName": "test-acc-tf-c-8022584361920682288",
+ },
+ },
+ "Extract variables from an empty config": {
+ config: "",
+ expected: nil,
+ },
+ }
+
+ for name, tc := range tests {
+ t.Run(name, func(t *testing.T) {
+ result := unit.ExtractConfigVariables(t, tc.config)
+ require.Equal(t, tc.expected, result)
+ })
+ }
+}
diff --git a/scripts/generate-doc.sh b/scripts/generate-doc.sh
index cfc7c05d20..118ba7f4df 100755
--- a/scripts/generate-doc.sh
+++ b/scripts/generate-doc.sh
@@ -32,7 +32,7 @@
set -euo pipefail
-TF_VERSION="${TF_VERSION:-"1.10.2"}" # TF version to use when running tfplugindocs. Default: 1.10.2
+TF_VERSION="${TF_VERSION:-"1.10.3"}" # TF version to use when running tfplugindocs. Default: 1.10.3
TEMPLATE_FOLDER_PATH="${TEMPLATE_FOLDER_PATH:-"templates"}" # PATH to the templates folder. Default: templates
diff --git a/scripts/generate-docs-all.sh b/scripts/generate-docs-all.sh
index 99f52f8604..01ab28def4 100755
--- a/scripts/generate-docs-all.sh
+++ b/scripts/generate-docs-all.sh
@@ -26,7 +26,7 @@
set -euo pipefail
-TF_VERSION="${TF_VERSION:-"1.10.2"}" # TF version to use when running tfplugindocs. Default: 1.10.2
+TF_VERSION="${TF_VERSION:-"1.10.3"}" # TF version to use when running tfplugindocs. Default: 1.10.3
TEMPLATE_FOLDER_PATH="${TEMPLATE_FOLDER_PATH:-"templates"}" # PATH to the templates folder. Default: templates
# ensure preview resource and data sources are also included during generation