Skip to content

Commit 0893ccb

Browse files
maasthaoarbusi
authored andcommitted
remove: Disables use of MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER (#3547)
1 parent c246282 commit 0893ccb

File tree

83 files changed

+1647
-2707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1647
-2707
lines changed

.changelog/3547.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
```release-note:breaking-change
2+
resource/mongodbatlas_advanced_cluster: Disables legacy SDKv2 implementation of this resource and removes the MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER feature flag
3+
```
4+
5+
```release-note:breaking-change
6+
data-source/mongodbatlas_advanced_cluster: Disables legacy SDKv2 implementation of this datasource and removes the MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER feature flag
7+
```
8+
9+
```release-note:breaking-change
10+
data-source/mongodbatlas_advanced_clusters: Disables legacy SDKv2 implementation of this datasource and removes the MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER feature flag
11+
```

.github/workflows/acceptance-tests-runner.yml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ on:
118118
mongodb_atlas_asp_project_aws_role_arn:
119119
type: string
120120
required: true
121+
mongodb_atlas_last_1x_version:
122+
type: string
123+
required: true
121124
secrets: # all secrets are passed explicitly in this workflow
122125
mongodb_atlas_public_key:
123126
required: true
@@ -381,34 +384,10 @@ jobs:
381384
- 'internal/service/streamprocessor/*.go'
382385
- 'internal/service/streamprivatelinkendpoint/*.go'
383386
384-
advanced_cluster:
385-
needs: [ change-detection, get-provider-version ]
386-
if: ${{ needs.change-detection.outputs.advanced_cluster == 'true' || inputs.test_group == 'advanced_cluster' }}
387-
runs-on: ubuntu-latest
388-
permissions: {}
389-
steps:
390-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
391-
with:
392-
ref: ${{ inputs.ref || github.ref }}
393-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
394-
with:
395-
go-version-file: 'go.mod'
396-
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
397-
with:
398-
terraform_version: ${{ inputs.terraform_version }}
399-
terraform_wrapper: false
400-
- name: Acceptance Tests
401-
env:
402-
MONGODB_ATLAS_LAST_VERSION: ${{ needs.get-provider-version.outputs.provider_version }}
403-
ACCTEST_REGEX_RUN: ${{ inputs.reduced_tests && '^TestAccMockable' || env.ACCTEST_REGEX_RUN }}
404-
ACCTEST_PACKAGES: ./internal/service/advancedcluster
405-
run: make testacc
406387
407388
advanced_cluster_tpf:
408389
needs: [ change-detection, get-provider-version ]
409390
if: ${{ needs.change-detection.outputs.advanced_cluster_tpf == 'true' || inputs.test_group == 'advanced_cluster_tpf' }}
410-
env:
411-
MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER: 'true'
412391
runs-on: ubuntu-latest
413392
permissions: {}
414393
steps:
@@ -425,6 +404,7 @@ jobs:
425404
- name: Acceptance Tests
426405
env:
427406
MONGODB_ATLAS_LAST_VERSION: ${{ needs.get-provider-version.outputs.provider_version }}
407+
MONGODB_ATLAS_LAST_1X_VERSION: ${{ inputs.mongodb_atlas_last_1x_version }}
428408
HTTP_MOCKER_CAPTURE: 'true'
429409
ACCTEST_REGEX_RUN: ${{ inputs.reduced_tests && '^TestAccMockable' || env.ACCTEST_REGEX_RUN }}
430410
ACCTEST_PACKAGES: |
@@ -436,7 +416,6 @@ jobs:
436416
needs: [ change-detection, get-provider-version ]
437417
if: ${{ inputs.reduced_tests == false && (needs.change-detection.outputs.advanced_cluster_tpf == 'true' || inputs.test_group == 'advanced_cluster_tpf') }}
438418
env:
439-
MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER: 'true'
440419
MONGODB_ATLAS_TEST_SDKV2_TO_TPF: 'true'
441420
runs-on: ubuntu-latest
442421
permissions: {}
@@ -453,9 +432,11 @@ jobs:
453432
terraform_wrapper: false
454433
- name: Acceptance Tests
455434
env:
456-
MONGODB_ATLAS_LAST_VERSION: ${{ needs.get-provider-version.outputs.provider_version }}
435+
MONGODB_ATLAS_LAST_VERSION: ${{ inputs.mongodb_atlas_last_1x_version }}
436+
MONGODB_ATLAS_LAST_1X_VERSION: ${{ inputs.mongodb_atlas_last_1x_version }}
457437
ACCTEST_REGEX_RUN: '^TestMig'
458-
ACCTEST_PACKAGES: ./internal/service/advancedcluster
438+
ACCTEST_PACKAGES: |
439+
./internal/service/advancedcluster
459440
run: make testacc
460441

461442
assume_role:
@@ -1098,6 +1079,7 @@ jobs:
10981079
terraform_wrapper: false
10991080
- name: Acceptance Tests
11001081
env:
1082+
MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER: 'true' # required for migration tests that use provider version < 2.0.0
11011083
MONGODB_ATLAS_LAST_VERSION: ${{ needs.get-provider-version.outputs.provider_version }}
11021084
ACCTEST_PACKAGES: ./internal/service/searchdeployment
11031085
run: make testacc

.github/workflows/acceptance-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,4 @@ jobs:
132132
confluent_cloud_privatelink_access_id: ${{ vars.CONFLUENT_CLOUD_PRIVATELINK_ACCESS_ID }}
133133
mongodb_atlas_asp_project_ear_pe_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_ASP_PROJECT_EAR_PE_ID_QA || vars.MONGODB_ATLAS_ASP_PROJECT_EAR_PE_ID_DEV }}
134134
mongodb_atlas_asp_project_aws_role_arn: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_ASP_PROJECT_AWS_ROLE_ARN_QA || vars.MONGODB_ATLAS_ASP_PROJECT_AWS_ROLE_ARN_DEV }}
135+
mongodb_atlas_last_1x_version: ${{ vars.MONGODB_ATLAS_LAST_1X_VERSION }}

.github/workflows/code-health.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
go-version-file: 'go.mod'
4242
- name: Unit Test
4343
run: make test
44-
env:
45-
MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER: "true"
4644
lint:
4745
runs-on: ubuntu-latest
4846
permissions: {}
@@ -93,4 +91,4 @@ jobs:
9391
secrets: inherit
9492
uses: ./.github/workflows/acceptance-tests.yml
9593
with:
96-
reduced_tests: true
94+
reduced_tests: false

.github/workflows/update-dev-branches.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ jobs:
8686
- name: Project check
8787
if: steps.merge-check.outputs.has-changes == 'true'
8888
id: project-check
89-
env:
90-
MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER: "true"
9189
run: |
9290
if make tools build lint test; then
9391
echo "slack-text=✅ Dev branch \`${{ matrix.branch }}\` merged and pushed with latest changes from master. ${{ secrets.SLACK_ONCALL_TAG }} <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}|View Action>" >> "${GITHUB_OUTPUT}"

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ testmact: ## Run MacT tests (mocked acc tests)
5353
@$(eval export MONGODB_ATLAS_ORG_ID?=111111111111111111111111)
5454
@$(eval export MONGODB_ATLAS_PROJECT_ID?=111111111111111111111111)
5555
@$(eval export MONGODB_ATLAS_CLUSTER_NAME?=mocked-cluster)
56-
@$(eval export MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER?=true)
5756
@if [ "$(ACCTEST_PACKAGES)" = "./..." ]; then \
5857
echo "Error: ACCTEST_PACKAGES must be explicitly set for testmact target, './...' is not allowed"; \
5958
exit 1; \
@@ -236,4 +235,4 @@ upload-sbom: ## Upload SBOM
236235

237236
.PHONY: augment-sbom
238237
augment-sbom: ## Augment SBOM
239-
./scripts/compliance/augment-sbom.sh
238+
./scripts/compliance/augment-sbom.sh

docs/data-sources/encryption_at_rest.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
5252
backup_enabled = true
5353
encryption_at_rest_provider = "AWS"
5454
55-
replication_specs {
56-
region_configs {
55+
replication_specs = [{
56+
region_configs = [{
5757
priority = 7
5858
provider_name = "AWS"
5959
region_name = "US_EAST_1"
60-
electable_specs {
60+
electable_specs = {
6161
instance_size = "M10"
6262
node_count = 3
6363
}
64-
}
65-
}
64+
}]
65+
}]
6666
}
6767
6868
data "mongodbatlas_encryption_at_rest" "test" {

docs/data-sources/search_deployment.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ resource "mongodbatlas_advanced_cluster" "example" {
1414
name = "ClusterExample"
1515
cluster_type = "REPLICASET"
1616
17-
replication_specs {
18-
region_configs {
19-
electable_specs {
17+
replication_specs = [{
18+
region_configs = [{
19+
electable_specs = {
2020
instance_size = "M10"
2121
node_count = 3
2222
}
2323
provider_name = "AWS"
2424
priority = 7
2525
region_name = "US_EAST_1"
26-
}
27-
}
26+
}]
27+
}]
2828
}
2929
3030
resource "mongodbatlas_search_deployment" "example" {

docs/resources/encryption_at_rest.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
6767
backup_enabled = true
6868
encryption_at_rest_provider = "AWS"
6969
70-
replication_specs {
71-
region_configs {
70+
replication_specs = [{
71+
region_configs = [{
7272
priority = 7
7373
provider_name = "AWS"
7474
region_name = "US_EAST_1"
75-
electable_specs {
75+
electable_specs = {
7676
instance_size = "M10"
7777
node_count = 3
7878
}
79-
}
80-
}
79+
}]
80+
}]
8181
}
8282
8383
data "mongodbatlas_encryption_at_rest" "test" {

docs/resources/search_deployment.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ resource "mongodbatlas_advanced_cluster" "example" {
1919
name = "ClusterExample"
2020
cluster_type = "REPLICASET"
2121
22-
replication_specs {
23-
region_configs {
24-
electable_specs {
22+
replication_specs = [{
23+
region_configs = [{
24+
electable_specs = {
2525
instance_size = "M10"
2626
node_count = 3
2727
}
2828
provider_name = "AWS"
2929
priority = 7
3030
region_name = "US_EAST_1"
31-
}
32-
}
31+
}]
32+
}]
3333
}
3434
3535
resource "mongodbatlas_search_deployment" "example" {

0 commit comments

Comments
 (0)