Skip to content

Commit 3f053ae

Browse files
committed
Merge branch 'master' into CLOUDP-262752-ear-aws-kms-dev
2 parents 9fd394e + c3ae0f2 commit 3f053ae

File tree

289 files changed

+2625
-2067
lines changed

Some content is hidden

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

289 files changed

+2625
-2067
lines changed

.changelog/3034.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:bug
2+
resource/mongodbatlas_advanced_cluster: Adds `PENDING` status for update and delete operations
3+
```
4+
5+
```release-note:bug
6+
resource/mongodbatlas_cluster: Adds `PENDING` status for update and delete operations
7+
```

.changelog/3051.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
resource/mongodbatlas_alert_configuration: Removes UseStateForUnknown plan modifier for interval_min
3+
```

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

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ on:
2525
description: 'The branch, tag or SHA where tests will run, e.g. v1.14.0, empty for default branch'
2626
type: string
2727
required: false
28-
28+
reduced_tests:
29+
description: 'If run only minimum tests for advanced_cluster, e.g. in PRs'
30+
type: boolean
31+
required: false
32+
default: false
33+
2934
mongodb_atlas_org_id:
3035
type: string
3136
required: true
@@ -370,14 +375,15 @@ jobs:
370375
- name: Acceptance Tests
371376
env:
372377
MONGODB_ATLAS_LAST_VERSION: ${{ needs.get-provider-version.outputs.provider_version }}
378+
ACCTEST_REGEX_RUN: ${{ inputs.reduced_tests && '^TestAccMockable' || env.ACCTEST_REGEX_RUN }}
373379
ACCTEST_PACKAGES: ./internal/service/advancedcluster
374380
run: make testacc
375381

376382
advanced_cluster_tpf:
377383
needs: [ change-detection, get-provider-version ]
378384
if: ${{ needs.change-detection.outputs.advanced_cluster_tpf == 'true' || inputs.test_group == 'advanced_cluster_tpf' }}
379385
env:
380-
MONGODB_ATLAS_ADVANCED_CLUSTER_V2_SCHEMA: 'true'
386+
MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER: 'true'
381387
runs-on: ubuntu-latest
382388
permissions: {}
383389
steps:
@@ -392,9 +398,9 @@ jobs:
392398
terraform_version: ${{ inputs.terraform_version }}
393399
terraform_wrapper: false
394400
- name: Prepare new advanced_cluster
395-
run: make tools enable-advancedclustertpf
396-
- name: Unit tests # delete after allowAdvancedClusterV2Schema is removed
397-
run: go test -v ./internal/testutil/acc/advanced_cluster_schema_v2_test.go
401+
run: make tools enable-preview-provider-v2
402+
- name: Unit tests # delete after allowPreviewProviderV2AdvancedCluster is removed
403+
run: go test -v ./internal/testutil/acc/advanced_cluster_preview_provider_v2_test.go
398404
- name: Mocked Acceptance Tests
399405
env:
400406
ACCTEST_REGEX_RUN: '^TestAccMockable'
@@ -404,16 +410,17 @@ jobs:
404410
env:
405411
MONGODB_ATLAS_LAST_VERSION: ${{ needs.get-provider-version.outputs.provider_version }}
406412
HTTP_MOCKER_CAPTURE: 'true'
413+
ACCTEST_REGEX_RUN: ${{ inputs.reduced_tests && '^TestAccMockable' || env.ACCTEST_REGEX_RUN }}
407414
ACCTEST_PACKAGES: |
408415
./internal/service/advancedcluster
409416
./internal/service/advancedclustertpf
410417
run: make testacc
411418

412419
advanced_cluster_tpf_move:
413420
needs: [ change-detection, get-provider-version ]
414-
if: ${{ (needs.change-detection.outputs.advanced_cluster_tpf == 'true' || inputs.test_group == 'advanced_cluster_tpf') && inputs.terraform_version == '1.10.x' }}
421+
if: ${{ (needs.change-detection.outputs.advanced_cluster_tpf == 'true' || inputs.test_group == 'advanced_cluster_tpf') && inputs.terraform_version == '1.10.x' && inputs.reduced_tests == false }}
415422
env:
416-
MONGODB_ATLAS_ADVANCED_CLUSTER_V2_SCHEMA: 'true'
423+
MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER: 'true'
417424
strategy:
418425
max-parallel: 2
419426
fail-fast: false
@@ -434,7 +441,7 @@ jobs:
434441
terraform_version: ${{ matrix.terraform_version }}
435442
terraform_wrapper: false
436443
- name: Prepare new advanced_cluster
437-
run: make tools enable-advancedclustertpf
444+
run: make tools enable-preview-provider-v2
438445
- name: Acceptance Tests
439446
env:
440447
ACCTEST_REGEX_RUN: '^TestAccAdvancedCluster_move'

.github/workflows/acceptance-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ on:
4747
description: 'The branch, tag or SHA where tests will run, e.g. v1.14.0, empty for default branch'
4848
type: string
4949
required: false
50+
reduced_tests:
51+
description: 'If run only minimum tests for advanced_cluster, e.g. in PRs'
52+
type: boolean
53+
required: false
5054

5155
jobs:
5256
tests:
@@ -98,6 +102,7 @@ jobs:
98102
ref: ${{ inputs.ref }}
99103
test_group: ${{ inputs.test_group }}
100104
test_name: ${{ inputs.test_name }}
105+
reduced_tests: ${{ inputs.reduced_tests || false }}
101106
aws_region_federation: ${{ vars.AWS_REGION_FEDERATION }}
102107
mongodb_atlas_org_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_ORG_ID_CLOUD_QA || vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }}
103108
mongodb_atlas_base_url: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_BASE_URL_QA || vars.MONGODB_ATLAS_BASE_URL }}

.github/workflows/code-health.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
go-version-file: 'go.mod'
4848
cache: false # see https://github.com/golangci/golangci-lint-action/issues/807
4949
- name: golangci-lint
50-
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae
50+
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837
5151
with:
5252
version: v1.62.2 # Also update GOLANGCI_VERSION variable in GNUmakefile when updating this version
5353
- name: actionlint
@@ -84,3 +84,5 @@ jobs:
8484
needs: [build, lint, shellcheck, unit-test, generate-doc-check]
8585
secrets: inherit
8686
uses: ./.github/workflows/acceptance-tests.yml
87+
with:
88+
reduced_tests: true

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
146146
passphrase: ${{ secrets.PASSPHRASE }}
147147
- name: Run GoReleaser
148-
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf
148+
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3
149149
with:
150150
version: '~> v2'
151151
args: release --clean

.github/workflows/stale.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
stale-pr-label: 'stale'
2323
days-before-stale: 5
2424
days-before-close: 2
25-
exempt-pr-labels: 'not_stale'
26-
exempt-issue-labels: 'not_stale'
25+
exempt-pr-labels: 'not_stale, dependencies'
26+
exempt-issue-labels: 'not_stale'

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
## (Unreleased)
22

3+
BUG FIXES:
4+
5+
* resource/mongodbatlas_alert_configuration: Removes UseStateForUnknown plan modifier for interval_min ([#3051](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3051))
6+
7+
## 1.26.1 (February 07, 2025)
8+
9+
BUG FIXES:
10+
11+
* resource/mongodbatlas_advanced_cluster: Adds `PENDING` status for update and delete operations ([#3034](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3034))
12+
* resource/mongodbatlas_cluster: Adds `PENDING` status for update and delete operations ([#3034](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3034))
13+
314
## 1.26.0 (January 23, 2025)
415

516
FEATURES:

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ testmact: ## Run MacT tests (mocked acc tests)
5050
@$(eval export MONGODB_ATLAS_ORG_ID?=111111111111111111111111)
5151
@$(eval export MONGODB_ATLAS_PROJECT_ID?=111111111111111111111111)
5252
@$(eval export MONGODB_ATLAS_CLUSTER_NAME?=mocked-cluster)
53-
@$(eval export MONGODB_ATLAS_ADVANCED_CLUSTER_V2_SCHEMA?=true)
53+
@$(eval export MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER?=true)
5454
@if [ "$(ACCTEST_PACKAGES)" = "./..." ]; then \
5555
echo "Error: ACCTEST_PACKAGES must be explicitly set for testmact target, './...' is not allowed"; \
5656
exit 1; \
@@ -191,9 +191,9 @@ check-changelog-entry-file: ## Check a changelog entry file in a PR
191191
jira-release-version: ## Update Jira version in a release
192192
go run ./tools/jira-release-version/*.go
193193

194-
.PHONY: enable-advancedclustertpf
195-
enable-advancedclustertpf: ## Enable Advanced Cluster V2 Schema
196-
make change-lines filename=./internal/config/advanced_cluster_v2_schema.go find="allowAdvancedClusterV2Schema = false" new="allowAdvancedClusterV2Schema = true"
194+
.PHONY: enable-preview-provider-v2
195+
enable-preview-provider-v2: ## Enable Preview Provider V2
196+
make change-lines filename=./internal/config/preview_provider_v2.go find="allowPreviewProviderV2AdvancedCluster = false" new="allowPreviewProviderV2AdvancedCluster = true"
197197

198198
.PHONY: delete-lines ${filename} ${delete}
199199
delete-lines:

contributing/development-setup.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
provider_installation {
3131
3232
dev_overrides {
33-
"mongodb/mongodbatlas" = "/Users/yourUser/terraform-provider-mongodbatlas/bin" # path to the provider binary
33+
"mongodb/mongodbatlas" = "/Users/<YourUser>/terraform-provider-mongodbatlas/bin" # path to the provider binary
3434
}
3535
3636
direct {}
@@ -284,22 +284,22 @@ To do this you can:
284284
```terraform
285285
provider_installation {
286286
filesystem_mirror {
287-
path = "C:\Users\ZuhairAhmed\Desktop\Tenant_Upgrade\tf_cache"
287+
path = "C:\Users\<YourUser>\Desktop\Tenant_Upgrade\tf_cache"
288288
include = ["registry.terraform.io/hashicorp/*"]
289289
}
290290
direct {
291291
exclude = ["registry.terraform.io/hashicorp/*"]
292292
}
293293
}
294-
plugin_cache_dir = "C:\Users\ZuhairAhmed\Desktop\Tenant_Upgrade\tf_cache"
294+
plugin_cache_dir = "C:\Users\<YourUser>\Desktop\Tenant_Upgrade\tf_cache"
295295
disable_checkpoint=true
296296
```
297297
- `cd` back up to original directory and `mv` the `.terraform/providers/registry.terraform.io` directory to `tf_cache`
298298

299299
- Create required environment variables (modify accordingly to your own local path directory):
300300
```bash
301-
export TF_PLUGIN_CACHE_DIR=/mnt/c/Users/ZuhairAhmed/Desktop/Tenant_Upgrade/tf_cache
302-
export TF_CLI_CONFIG_FILE=/mnt/c/Users/ZuhairAhmed/Desktop/Tenant_Upgrade/tf_cache/terraform.rc
301+
export TF_PLUGIN_CACHE_DIR=/mnt/c/Users/<YourUser>/Desktop/Tenant_Upgrade/tf_cache
302+
export TF_CLI_CONFIG_FILE=/mnt/c/Users/<YourUser>/Desktop/Tenant_Upgrade/tf_cache/terraform.rc
303303
```
304304
- Delete the `.terraform` and `.terraform.lock.hcl` directories altogether. At this point you should only have the `tf_cache` directory and the `versions.tf` config file remaining.
305305

0 commit comments

Comments
 (0)