Skip to content

Commit

Permalink
chore: Bring latest changes from master into dev branch (includes ado…
Browse files Browse the repository at this point in the history
…pting latest stable SDK version) (#2491)

* doc: Updates `mongodbatlas_global_cluster_config` doc about self-managed sharding clusters (#2372)

* update doc

* add link

* test: Unifies Azure and GCP networking tests (#2371)

* unify Azure and GCP tests

* TEMPORARY no update

* Revert "TEMPORARY no update"

This reverts commit ab60d67.

* run in parallel

* chore: Updates examples link in index.html.markdown for v1.17.3 release

* chore: Updates CHANGELOG.md header for v1.17.3 release

* doc: Updates Terraform Compatibility Matrix documentation (#2370)

Co-authored-by: maastha <[email protected]>

* use ComposeAggregateTestCheckFunc (#2375)

* chore: Updates asdf to TF 1.9.0 and compatibility matrix body (#2376)

* update asdf to TF 1.9.0

* update compatibility message

* Update .github/workflows/update_tf_compatibility_matrix.yml

Co-authored-by: maastha <[email protected]>

* Fix actionlint

---------

Co-authored-by: maastha <[email protected]>

* fix: stale.yaml gh action (#2379)

* doc: Updates alert-config examples (#2378)

* doc: Update alert-config examples

* doc: Removes other references to GROUP_CHARTS_ADMIN

* chore: align table

* chore: Updates Atlas Go SDK (#2380)

* build(deps): bump go.mongodb.org/atlas-sdk

* rename DiskBackupSnapshotAWSExportBucket to DiskBackupSnapshotExportBucket

* add param to DeleteAtlasSearchDeployment

* add LatestDefinition

* more LatestDefinition and start using SearchIndexCreateRequest

* HasElementsSliceOrMap

* update

* ToAnySlicePointer

* fix update

---------

Co-authored-by: lantoli <[email protected]>

* chore: Bump github.com/aws/aws-sdk-go from 1.54.8 to 1.54.13 (#2383)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.54.8 to 1.54.13.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.54.8...v1.54.13)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Bump amannn/action-semantic-pull-request from 5.5.2 to 5.5.3 (#2382)

Bumps [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) from 5.5.2 to 5.5.3.
- [Release notes](https://github.com/amannn/action-semantic-pull-request/releases)
- [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md)
- [Commits](amannn/action-semantic-pull-request@cfb6070...0723387)

---
updated-dependencies:
- dependency-name: amannn/action-semantic-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: Improves tests for mongodbatlas_search_index (#2384)

* checkVector

* checkBasic

* checkWithMapping

* checkWithSynonyms

* checkAdditional

* checkAdditionalAnalyzers and checkAdditionalMappingsFields

* remove addAttrChecks and addAttrSetChecks

* use commonChecks in all checks

* test checks cleanup

* chore: Updates nightly tests to TF 1.9.x (#2386)

* update nightly tests to TF 1.9.x

* use TF var

* keep until 1.3.x

* Update .github/workflows/update_tf_compatibility_matrix.yml

Co-authored-by: maastha <[email protected]>

---------

Co-authored-by: maastha <[email protected]>

* fix: Emptying cloud_back_schedule "copy_settings" (#2387)

* test: add test to reproduce Github Issue

* fix: update copy_settings on changes (even when empty)

* docs: Add changelog entry

* chore: fix changelog entry

* apply review comments

* chore: Updates CHANGELOG.md for #2387

* chore: Updates delete logic for `mongodbatlas_search_deployment` (#2389)

* update delete logic

* update unit test

* refactor: use advanced_cluster instead of cluster (#2392)

* fix: Returns error if the analyzers attribute contains unknown fields. (#2394)

* fix: Returns error if the analyzers attribute contains unknown fields.

* adds changelog file.

* Update .changelog/2394.txt

Co-authored-by: Leo Antoli <[email protected]>

---------

Co-authored-by: Leo Antoli <[email protected]>

* chore: Updates CHANGELOG.md for #2394

* chore: Bump github.com/aws/aws-sdk-go from 1.54.13 to 1.54.17 (#2401)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.54.13 to 1.54.17.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.54.13...v1.54.17)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Bump github.com/hashicorp/terraform-plugin-testing (#2400)

Bumps [github.com/hashicorp/terraform-plugin-testing](https://github.com/hashicorp/terraform-plugin-testing) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-testing/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-testing/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-plugin-testing@v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-testing
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Bump github.com/hashicorp/terraform-plugin-framework (#2398)

Bumps [github.com/hashicorp/terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-framework/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-framework/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-plugin-framework@v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Bump github.com/hashicorp/terraform-plugin-framework-validators (#2399)

Bumps [github.com/hashicorp/terraform-plugin-framework-validators](https://github.com/hashicorp/terraform-plugin-framework-validators) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-framework-validators/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-framework-validators/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-plugin-framework-validators@v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-framework-validators
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: Uses hclwrite to generate the cluster for GetClusterInfo (#2404)

* test: Use hclwrite to generate the cluster for GetClusterInfo

* test: fix unit test

* refactor: minor improvements

* refactor: use Zone 1 as the default ZoneName to make tests pass

* refactor: remove num_shards in request and add more tests

* fix: use same default region as before

* test: Support disk_size_gb for ClusterInfo and add test case for multiple dependencies

* refactor: move replication specs to ClusterRequest

* test: add support for CloudRegionConfig

* add: suggestions from PR comments

* refactor: use acc.ReplicationSpecRequest instead of admin.ReplicationSpec

* fix: Fixes `disk_iops` attribute for Azure cloud provider in `mongodbatlas_advanced_cluster` resource (#2396)

* fix disk_iops in Azure

* expand

* tests for disk_iops

* chore: Updates CHANGELOG.md for #2396

* test: Refactors `mongodbatlas_private_endpoint_regional_mode` to use cluster info (#2403)

* test: refactor to use cluster info

* test: enable test in CI and fix duplicate zone name

* test: use AWS_REGION_UPPERCASE and add pre-checks

* fix: use clusterResourceName

* test: fix GetClusterInfo call

* fix: pre check call

* fix: add UPPERCASE/LOWERCASE to network test suite

* test: Skip in ci since it is slow and use new GetClusterInfo api

* test: Fix the broken test and simpify assert statements

* test: enable in CI, after refactorings ~1230s

* test: Refactors resource tests to use GetClusterInfo `online_archive` (#2409)

* feat: adds support for Tags & AutoScalingDiskGbEnabled

* feat: refactor tests to use GetClusterInfo & new SDK

* chore: fomatting fix

* test: make unit test deterministic

* test: onlinearchive force us_east_1

* spelling in comment

* test: fix migration test to use package clusterRequest (with correct region)

* update .tool-versions (#2417)

* feat: Adds `stored_source` attribute to `mongodbatlas_search_index` resource and corresponding data sources (#2388)

* fix ds schemas

* add changelog

* add storedSource to configBasic and checkBasic

* update doc about index_id

* update boolean test

* first implementation of stored_source as string

* create model file

* marshal

* don't allow update

* test for objects in stored_source

* TestAccSearchIndex_withStoredSourceUpdate

* update StoredSource

* fix merge

* tests for storedSource updates

* swap test names

* doc

* chore: Updates CHANGELOG.md for #2388

* doc: Improves Guides menu (#2408)

* add 0.8.2 metadata

* update old category and remove unneeded headers

* update page_title

* fix titles

* remove old guide

* test: Refactors resource tests to use GetClusterInfo `ldap_configuration` (#2411)

* test:  Refactors resource tests to use GetClusterInfo ldap_configuration

* test: Fix depends_on clause

* test: remove unused clusterName and align fields

* test: Refactors resource tests to use GetClusterInfo `cloud_backup_snapshot_restore_job` (#2413)

* test: Refactors resource tests to use GetClusterInfo `cloud_backup_snapshot_restore_job`

* test: fix reference to clusterResourceName

* doc: Clarify usage of maintenance window resource (#2418)

* test: Refactors resource tests to use GetClusterInfo `cloud_backup_schedule` (#2414)

* test: Cluster support PitEnabled

* test: Refactors resource tests to use GetClusterInfo `mongodbatlas_cloud_backup_schedule`

* apply PR suggestions

* test: fix broken test after merging

* test: Refactors resource tests to use GetClusterInfo `federated_database_instance` (#2412)

* test: Support getting cluster info with project

* test: Refactors resource tests to use GetClusterInfo `federated_database_instance`

* test: refactor, use a single GetClusterInfo and support AddDefaults

* test: use renamed argument in test

* doc: Removes docs headers as they are not needed (#2422)

* remove unneeded YAML frontmatter headers

* small adjustements

* change root files

* remove from templates

* use Deprecated category

* apply feedback

* test: Refactors resource tests to use GetClusterInfo `backup_compliance_policy` (#2415)

* test: Support AdvancedConfiguration, MongoDBMajorVersion, RetainBackupsEnabled, EbsVolumeType in cluster

* test: refactor test to use GetClusterInfo

* test: Refactors resource tests to use GetClusterInfo `cluster_outage_simulation` (#2423)

* test: support Priority and NodeCountReadOnly

* test: Refactors resource tests to use GetClusterInfo `cluster_outage_simulation`

* test: reuse test case in migration test

* chore: increase timeout to ensure test is passing

* test: avoid global variables to ensure no duplicate cluster names

* revert delete timeout change

* test: Fixes DUPLICATE_CLUSTER_NAME failures (#2424)

* test: fix DUPLICATE_CLUSTER_NAME online_archive

* test: fix DUPLICATE_CLUSTER_NAME backup_snapshot_restore_job

* test: Refactors GetClusterInfo (#2426)

* test: support creating a datasource when using GetClusterInfo

* test: Add documentation for cluster methods

* refactor: move out config_cluster to its own file

* refactor: move configClusterGlobal to the only usage file

* refactor: remove ProjectIDStr field

* test: update references for cluster_info fields

* chore: missing whitespace

* test: fix missing quotes around projectID

* Update internal/testutil/acc/cluster.go

Co-authored-by: Leo Antoli <[email protected]>

---------

Co-authored-by: Leo Antoli <[email protected]>

* doc: Updates to new Terraform doc structure (#2425)

* move to root doc folder

* rename ds and resource folders

* change file extension to .md

* update doc links

* gitignore

* releasing instructions

* git hook

* codeowners

* workflow template

* gha workflows

* scripts

* remove website-lint

* update references to html.markdown

* fix compatibility script matrix

* rename rest of files

* fix generate doc script using docs-out folder to temporary generate all files and copying only to docs folder the specified resource files

* fix typo

* chore: Bump github.com/zclconf/go-cty from 1.14.4 to 1.15.0 (#2433)

Bumps [github.com/zclconf/go-cty](https://github.com/zclconf/go-cty) from 1.14.4 to 1.15.0.
- [Release notes](https://github.com/zclconf/go-cty/releases)
- [Changelog](https://github.com/zclconf/go-cty/blob/main/CHANGELOG.md)
- [Commits](zclconf/go-cty@v1.14.4...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/zclconf/go-cty
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Bump github.com/aws/aws-sdk-go from 1.54.17 to 1.54.19 (#2432)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.54.17 to 1.54.19.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.54.17...v1.54.19)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Bump actions/setup-go from 5.0.1 to 5.0.2 (#2431)

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@cdcb360...0a12ed9)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Bump tj-actions/verify-changed-files (#2430)

Bumps [tj-actions/verify-changed-files](https://github.com/tj-actions/verify-changed-files) from 11ea2b36f98609331b8dc9c5ad9071ee317c6d28 to 79f398ac63ab46f7f820470c821d830e5c340ef9.
- [Release notes](https://github.com/tj-actions/verify-changed-files/releases)
- [Changelog](https://github.com/tj-actions/verify-changed-files/blob/main/HISTORY.md)
- [Commits](tj-actions/verify-changed-files@11ea2b3...79f398a)

---
updated-dependencies:
- dependency-name: tj-actions/verify-changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* refactor: avoid usage of github.com/go-test/deep (use `reflect.DeepEqual instead`) (#2427)

* chore: Deletes modules folder (#2435)

* remove modules folder

* gitignore

* chore: Makes sure doc generation is up-to-date (#2441)

* generate doc

* split in runs

* detect changes

* TEMPORARY: change 3 files to trigger doc failures

* rename

* Revert "TEMPORARY: change 3 files to trigger doc failures"

This reverts commit cc36481.

* chore: Enables GitHub Action linter errors in GitHub (#2440)

* TEMPORARY: make action linter fail

* problem matcher

* Revert "TEMPORARY: make action linter fail"

This reverts commit 2ea3cd5.

* update version (#2439)

* doc: Updates examples & docs that use replicaSet clusters (#2428)

* update basic examples

* fix linter

* fix tf-validate

* update tflint version

* fix validate

* remove tf linter exceptions

* make linter fail

* simplify and show linter errors in GH

* tlint problem matcher

* problem matcher

* minimum severity warning

* fix linter

* make tf-validate logic easier to be run in local

* less verbose tf init

* fix /mongodbatlas_network_peering/aws

* doc for backup_compliance_policy

* fix container_id reference

* fix mongodbatlas_network_peering/azure

* use temp fodler

* fix examples/mongodbatlas_network_peering/gcp

* remaining examples

* fix mongodbatlas_clusters

* fix adv_cluster doc

* remaining doc changes

* fix typo

* fix examples with deprecated arguments

* get the first value for containter_id

* container_id in doc

* address feedback

* fix MongoDB_Atlas (#2445)

* chore: Updates examples link in index.md for v1.17.4 release

* chore: Updates CHANGELOG.md header for v1.17.4 release

* chore: Migrates `mongodbatlas_cloud_backup_snapshot_export_job` to new auto-generated SDK (#2436)

* migrate to new auto-generated SDK

* refactor and deprecate err_msg field

* add changelog entry

* docs

* change deprecation version to 1.20

* reduce changelog explanation

* chore: Migrates `mongodbatlas_project_api_key` to new auto-generated SDK (#2437)

* resource create

* migrate update read and delete of resource

* data sources migrated to new sdk

* remove apiUserId from create and update in payload(is read only)

* PR comments

* chore: Removes usage of old Admin SDK in tests (#2442)

* remove matlas from alert_configuration test

* remove matlas from custom_db_role test

* chore: Updates CHANGELOG.md for #2436

* chore: Clean up usages of old SDK (#2449)

* remove usages of old SDK

* add az2 to vpc endpoint

* Revert "add az2 to vpc endpoint"

This reverts commit ce6f7cc.

* skip flaky test

* allow 0 (#2456)

* fix: Fixes creation of organization  (#2462)

* fix TerraformVersion interface conversion

* refactor organization resource

* add changelog entry

* PR comment

* chore: Updates CHANGELOG.md for #2462

* fix: Fixes nil pointer dereference in `mongodbatlas_alert_configuration` (#2463)

* fix nil pointer dereference

* avoid nil pointer dereference in metric_threshold_config

* changelog entry

* changelog suggestion

* Update .changelog/2463.txt

Co-authored-by: Leo Antoli <[email protected]>

* remove periods at the end of changelog entries to make it consistent

---------

Co-authored-by: Leo Antoli <[email protected]>

* chore: Updates CHANGELOG.md for #2463

* chore: Updates examples link in index.md for v1.17.5 release

* chore: Updates CHANGELOG.md header for v1.17.5 release

* chore: Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 (#2469)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.0.1 to 6.1.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@a4f60bb...aaa42aa)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Bump github.com/aws/aws-sdk-go from 1.54.19 to 1.55.5 (#2468)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.54.19 to 1.55.5.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.54.19...v1.55.5)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: Handles update of `mongodbatlas_backup_compliance_policy` as a create operation (#2480)

* handle update as a create

* add test to make sure no plan changes appear when reapplying config with non default values

* add changelog

* fix projectId

* fix name of resource in test

* Update .changelog/2480.txt

Co-authored-by: kyuan-mongodb <[email protected]>

---------

Co-authored-by: kyuan-mongodb <[email protected]>

* chore: Updates CHANGELOG.md for #2480

* chore: Updates examples link in index.md for v1.17.6 release

* chore: Updates CHANGELOG.md header for v1.17.6 release

* feat: Adds azure support for backup snapshot export bucket (#2486)

* feat: add azure support for backup snapshot export bucket

* fix: add acceptance test configuration

* fix changelog entry number

* upgrade azuread to 2.53.1 in example

* fix checks

* fix checks for mongodbatlas_access_list_api_key

* fix docs check

* fix docs check for data source

* add readme.md in examples

* use acc.AddAttrChecks in tests

* remove importstateverifyignore

---------

Co-authored-by: Luiz Viana <[email protected]>

* chore: Updates CHANGELOG.md for #2486

* chore: Improves backup_compliance_policy test(#2484)

* chore: Updates Atlas Go SDK to version 2024-08-05 (#2487)

* automatic changes with renaming

* fix trivial compilation errors

* include 2024-05-30 version and adjust cloud-backup-schedule to use old SDK

* adjust global-cluster-config to use old API

* adjust advanced-cluster to use old API

* fix hcl config generation remove num_shards attribute

* manual fixes of versions in advanced cluster, cloud backup schedule, and other small compilations

* fix incorrect merging in cloud backup schedule tests

* using connV2 for import in advanced cluster

* use lastest sdk model for tests that require autoscaling model

* avoid using old SDK for delete operation

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Leo Antoli <[email protected]>
Co-authored-by: svc-apix-bot <[email protected]>
Co-authored-by: svc-apix-Bot <[email protected]>
Co-authored-by: maastha <[email protected]>
Co-authored-by: Andrea Angiolillo <[email protected]>
Co-authored-by: Espen Albert <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marco Suma <[email protected]>
Co-authored-by: Oriol <[email protected]>
Co-authored-by: kyuan-mongodb <[email protected]>
Co-authored-by: Luiz Viana <[email protected]>
  • Loading branch information
12 people authored Aug 12, 2024
1 parent 75d092c commit 25e10d6
Show file tree
Hide file tree
Showing 204 changed files with 1,588 additions and 1,148 deletions.
11 changes: 11 additions & 0 deletions .changelog/2436.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```release-note:note
resource/mongodbatlas_cloud_backup_snapshot_export_job: Deprecates the `err_msg` attribute
```

```release-note:note
data-source/mongodbatlas_cloud_backup_snapshot_export_job: Deprecates the `err_msg` attribute
```

```release-note:note
data-source/mongodbatlas_cloud_backup_snapshot_export_jobs: Deprecates the `err_msg` attribute
```
3 changes: 3 additions & 0 deletions .changelog/2462.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/mongodbatlas_organization: Fixes a bug in organization resource creation where the provider crashed
```
3 changes: 3 additions & 0 deletions .changelog/2463.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/mongodbatlas_alert_configuration: Fixes an issue where the `terraform apply` command crashes if you attempt to edit an existing `mongodbatlas_alert_configuration` by adding a value to `threshold_config`
```
3 changes: 3 additions & 0 deletions .changelog/2480.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/mongodbatlas_backup_compliance_policy: Fixes an issue where the update operation modified attributes that were not supposed to be modified"
```
11 changes: 11 additions & 0 deletions .changelog/2486.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```release-note:enhancement
data-source/mongodbatlas_cloud_backup_snapshot_export_bucket: Adds Azure support
```

```release-note:enhancement
resource/mongodbatlas_cloud_backup_snapshot_export_bucket: Adds Azure support
```

```release-note:enhancement
data-source/mongodbatlas_cloud_backup_snapshot_export_buckets: Adds Azure support
```
9 changes: 9 additions & 0 deletions .github/workflows/acceptance-tests-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ on:
required: true
aws_s3_bucket_backup:
required: true
azure_service_url_backup:
required: true
azure_blob_storage_container_backup:
required: true
mongodb_atlas_ldap_hostname:
required: true
mongodb_atlas_ldap_username:
Expand Down Expand Up @@ -364,6 +368,11 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
AWS_S3_BUCKET: ${{ secrets.aws_s3_bucket_backup }}
AZURE_BLOB_STORAGE_CONTAINER_NAME: ${{ secrets.azure_blob_storage_container_backup }}
AZURE_SERVICE_URL: ${{ secrets.azure_service_url_backup }}
AZURE_ATLAS_APP_ID: ${{ inputs.azure_atlas_app_id }}
AZURE_SERVICE_PRINCIPAL_ID: ${{ inputs.azure_service_principal_id }}
AZURE_TENANT_ID: ${{ inputs.azure_tenant_id }}
ACCTEST_PACKAGES: |
./internal/service/cloudbackupschedule
./internal/service/cloudbackupsnapshot
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_s3_bucket_federation: ${{ secrets.AWS_S3_BUCKET_FEDERATION }}
aws_s3_bucket_backup: ${{ secrets.AWS_S3_BUCKET_BACKUP }}
azure_service_url_backup: ${{ secrets.AZURE_SERVICE_URL_BACKUP }}
azure_blob_storage_container_backup: ${{ secrets.AZURE_BLOB_STORAGE_CONTAINER_BACKUP }}
mongodb_atlas_ldap_hostname: ${{ secrets.MONGODB_ATLAS_LDAP_HOSTNAME }}
mongodb_atlas_ldap_username: ${{ secrets.MONGODB_ATLAS_LDAP_USERNAME }}
mongodb_atlas_ldap_password: ${{ secrets.MONGODB_ATLAS_LDAP_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
go-version-file: 'go.mod'
cache: false # see https://github.com/golangci/golangci-lint-action/issues/807
- name: golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86
with:
version: v1.59.1 # Also update GOLANGCI_VERSION variable in GNUmakefile when updating this version
- name: actionlint
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

ENHANCEMENTS:

* data-source/mongodbatlas_cloud_backup_snapshot_export_bucket: Adds Azure support ([#2486](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2486))
* data-source/mongodbatlas_cloud_backup_snapshot_export_buckets: Adds Azure support ([#2486](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2486))
* resource/mongodbatlas_cloud_backup_snapshot_export_bucket: Adds Azure support ([#2486](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2486))

## 1.17.6 (August 07, 2024)

BUG FIXES:

* resource/mongodbatlas_backup_compliance_policy: Fixes an issue where the update operation modified attributes that were not supposed to be modified" ([#2480](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2480))

## 1.17.5 (July 30, 2024)

NOTES:

* data-source/mongodbatlas_cloud_backup_snapshot_export_job: Deprecates the `err_msg` attribute ([#2436](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2436))
* data-source/mongodbatlas_cloud_backup_snapshot_export_jobs: Deprecates the `err_msg` attribute ([#2436](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2436))
* resource/mongodbatlas_cloud_backup_snapshot_export_job: Deprecates the `err_msg` attribute ([#2436](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2436))

BUG FIXES:

* resource/mongodbatlas_alert_configuration: Fixes an issue where the `terraform apply` command crashes if you attempt to edit an existing `mongodbatlas_alert_configuration` by adding a value to `threshold_config` ([#2463](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2463))
* resource/mongodbatlas_organization: Fixes a bug in organization resource creation where the provider crashed ([#2462](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2462))

## 1.17.4 (July 19, 2024)

ENHANCEMENTS:

* data-source/mongodbatlas_search_index: Adds attribute `stored_source` ([#2388](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2388))
* data-source/mongodbatlas_search_indexes: Adds attribute `stored_source` ([#2388](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2388))
* resource/mongodbatlas_search_index: Adds attribute `stored_source` ([#2388](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2388))
Expand Down
10 changes: 7 additions & 3 deletions docs/data-sources/cloud_backup_snapshot_export_bucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ data "mongodbatlas_cloud_backup_snapshot_export_bucket" "test" {

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

* `iam_role_id` - Unique identifier of the role that Atlas can use to access the bucket. You must also specify the `bucket_name`.
* `bucket_name` - Name of the bucket that the provided role ID is authorized to access. You must also specify the `iam_role_id`.
* `cloud_provider` - Name of the provider of the cloud service where Atlas can access the S3 bucket. Atlas only supports `AWS`.
* `iam_role_id` - Unique identifier of the role that Atlas can use to access the bucket.
* `bucket_name` - Name of the bucket that the provided role ID is authorized to access.
* `cloud_provider` - Name of the provider of the cloud service where Atlas can access the S3 bucket.
* `role_id` - Unique identifier of the Azure Service Principal that Atlas can use to access the Azure Blob Storage Container.
* `service_url` - URL that identifies the blob Endpoint of the Azure Blob Storage Account.
* `tenant_id` - UUID that identifies the Azure Active Directory Tenant ID.




Expand Down
9 changes: 6 additions & 3 deletions docs/data-sources/cloud_backup_snapshot_export_buckets.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ In addition to all arguments above, the following attributes are exported:
### CloudProviderSnapshotExportBucket
* `project_id` - The unique identifier of the project for the Atlas cluster.
* `export_bucket_id` - Unique identifier of the snapshot bucket id.
* `iam_role_id` - Unique identifier of the role that Atlas can use to access the bucket. You must also specify the `bucket_name`.
* `bucket_name` - Name of the bucket that the provided role ID is authorized to access. You must also specify the `iam_role_id`.
* `cloud_provider` - Name of the provider of the cloud service where Atlas can access the S3 bucket. Atlas only supports `AWS`.
* `iam_role_id` - Unique identifier of the role that Atlas can use to access the bucket.
* `bucket_name` - Name of the bucket that the provided role ID is authorized to access.
* `cloud_provider` - Name of the provider of the cloud service where Atlas can access the S3 bucket.
* `role_id` - Unique identifier of the Azure Service Principal that Atlas can use to access the Azure Blob Storage Container.
* `service_url` - URL that identifies the blob Endpoint of the Azure Blob Storage Account.
* `tenant_id` - UUID that identifies the Azure Active Directory Tenant ID.


For more information see: [MongoDB Atlas API Reference.](https://docs.atlas.mongodb.com/reference/api/cloud-backup/export/create-one-export-bucket/)
2 changes: 1 addition & 1 deletion docs/data-sources/cloud_backup_snapshot_export_job.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ In addition to all arguments above, the following attributes are exported:
* `custom_data` - Custom data to include in the metadata file named `.complete` that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
* `components` - _Returned for sharded clusters only._ Export job details for each replica set in the sharded cluster.
* `created_at` - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
* `err_msg` - Error message, only if the export job failed.
* `err_msg` - Error message, only if the export job failed. **Note:** This attribute is deprecated as it is not being used.
* `export_status` - _Returned for replica set only._ Status of the export job.
* `finished_at` - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
* `export_job_id` - Unique identifier of the export job.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/cloud_backup_snapshot_export_jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ In addition to all arguments above, the following attributes are exported:
* `custom_data` - Custom data to include in the metadata file named `.complete` that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
* `components` - _Returned for sharded clusters only._ Export job details for each replica set in the sharded cluster.
* `created_at` - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
* `err_msg` - Error message, only if the export job failed.
* `err_msg` - Error message, only if the export job failed. **Note:** This attribute is deprecated as it is not being used.
* `export_status` - _Returned for replica set only._ Status of the export job.
* `finished_at` - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
* `export_job_id` - Unique identifier of the export job.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ We ship binaries but do not prioritize fixes for the following operating system
## Examples from MongoDB and the Community

<!-- NOTE: the below examples link is updated during the release process, when doing changes in the following sentence verify scripts/update-examples-reference-in-docs.sh is not impacted-->
We have [example configurations](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.17.3/examples)
We have [example configurations](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.17.6/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?
Expand Down
25 changes: 22 additions & 3 deletions docs/resources/cloud_backup_snapshot_export_bucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

## Example Usage


### AWS Example

```terraform
resource "mongodbatlas_cloud_backup_snapshot_export_bucket" "test" {
project_id = "{PROJECT_ID}"
Expand All @@ -16,12 +19,28 @@ resource "mongodbatlas_cloud_backup_snapshot_export_bucket" "test" {
}
```

### Azure Example

```terraform
resource "mongodbatlas_cloud_backup_snapshot_export_bucket" "test" {
project_id = "{PROJECT_ID}"
role_id = "{ROLE_ID}"
service_url = "{SERVICE_URL}"
tenant_id = "{TENANT_ID}"
bucket_name = "example-bucket"
cloud_provider = "AZURE"
}
```

## Argument Reference

* `project_id` - (Required) The unique identifier of the project for the Atlas cluster.
* `iam_role_id` - (Required) Unique identifier of the role that Atlas can use to access the bucket. You must also specify the `bucket_name`.
* `bucket_name` - (Required) Name of the bucket that the provided role ID is authorized to access. You must also specify the `iam_role_id`.
* `cloud_provider` - (Required) Name of the provider of the cloud service where Atlas can access the S3 bucket. Atlas only supports `AWS`.
* `bucket_name` - (Required) Name of the bucket that the provided role ID is authorized to access.
* `cloud_provider` - (Required) Name of the provider of the cloud service where Atlas can access the S3 bucket.
* `iam_role_id` - Unique identifier of the role that Atlas can use to access the bucket. Required if `cloud_provider` is set to `AWS`.
* `role_id` - Unique identifier of the Azure Service Principal that Atlas can use to access the Azure Blob Storage Container. Required if `cloud_provider` is set to `AZURE`.
* `service_url` - URL that identifies the blob Endpoint of the Azure Blob Storage Account. Required if `cloud_provider` is set to `AZURE`.
* `tenant_id` - UUID that identifies the Azure Active Directory Tenant ID. Required if `cloud_provider` is set to `AZURE`.

## Attributes Reference

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/cloud_backup_snapshot_export_job.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ In addition to all arguments above, the following attributes are exported:

* `components` - _Returned for sharded clusters only._ Export job details for each replica set in the sharded cluster.
* `created_at` - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
* `err_msg` - Error message, only if the export job failed.
* `err_msg` - Error message, only if the export job failed. **Note:** This attribute is deprecated as it is not being used.
* `export_status` - _Returned for replica set only._ Status of the export job.
* `finished_at` - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
* `export_job_id` - Unique identifier of the export job.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# MongoDB Atlas Provider - Atlas Cloud Backup Snapshot Export Bucket in AWS

This example shows how to set up Cloud Backup Snapshot Export Bucket in Atlas through Terraform.

You must set the following variables:

- `public_key`: Atlas public key
- `private_key`: Atlas private key
- `project_id`: Unique 24-hexadecimal digit string that identifies the project where the stream instance will be created.
- `access_key`: AWS Access Key
- `secret_key`: AWS Secret Key.
- `aws_region`: AWS region.

To learn more, see the [Export Cloud Backup Snapshot Documentation](https://www.mongodb.com/docs/atlas/backup/cloud-backup/export/).


Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MongoDB Atlas Provider - Atlas Cloud Backup Snapshot Export Bucket in Azure

This example shows how to set up Cloud Backup Snapshot Export Bucket in Atlas through Terraform.

You must set the following variables:

- `public_key`: Atlas public key.
- `private_key`: Atlas private key.
- `project_id`: Unique 24-hexadecimal digit string that identifies the project where the stream instance will be created.
- `azure_tenant_id`: The Tenant ID which should be used.
- `subscription_id`: Azure Subscription ID.
- `client_id`: Azure Client ID.
- `client_secret`: Azure Client Secret.
- `tenant_id`: Azure Tenant ID.
- `azure_atlas_app_id`: The client ID of the application for which to create a service principal.
- `azure_resource_group_location`: The Azure Region where the Resource Group should exist.
- `storage_account_name`: Specifies the name of the storage account.

To learn more, see the [Export Cloud Backup Snapshot Documentation](https://www.mongodb.com/docs/atlas/backup/cloud-backup/export/).


Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
resource "azuread_service_principal" "mongo" {
client_id = var.azure_atlas_app_id
app_role_assignment_required = false
}

# Define the resource group
resource "azurerm_resource_group" "test_resource_group" {
name = "mongo-test-resource-group"
location = var.azure_resource_group_location
}

resource "azurerm_storage_account" "test_storage_account" {
name = var.storage_account_name
resource_group_name = azurerm_resource_group.test_resource_group.name
location = azurerm_resource_group.test_resource_group.location
account_tier = "Standard"
account_replication_type = "LRS"
}

resource "azurerm_storage_container" "test_storage_container" {
name = "mongo-test-storage-container"
storage_account_name = azurerm_storage_account.test_storage_account.name
container_access_type = "private"
}

resource "azurerm_role_assignment" "test_role_assignment" {
principal_id = azuread_service_principal.mongo.id
role_definition_name = "Storage Blob Data Contributor"
scope = azurerm_storage_account.test_storage_account.id
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
resource "mongodbatlas_cloud_provider_access_setup" "setup_only" {
project_id = var.project_id
provider_name = "AZURE"
azure_config {
atlas_azure_app_id = var.azure_atlas_app_id
service_principal_id = azuread_service_principal.mongo.id
tenant_id = var.tenant_id
}
}

resource "mongodbatlas_cloud_provider_access_authorization" "auth_role" {
project_id = var.project_id
role_id = mongodbatlas_cloud_provider_access_setup.setup_only.role_id

azure {
atlas_azure_app_id = var.azure_atlas_app_id
service_principal_id = azuread_service_principal.mongo.id
tenant_id = var.tenant_id
}
}


resource "mongodbatlas_cloud_backup_snapshot_export_bucket" "test" {
project_id = var.tenant_id
bucket_name = azurerm_storage_container.test_storage_container.name
cloud_provider = "AZURE"
service_url = azurerm_storage_account.test_storage_account.primary_blob_endpoint
role_id = mongodbatlas_cloud_provider_access_authorization.auth_role.role_id
tenant_id = var.tenant_id
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
provider "mongodbatlas" {
public_key = var.public_key
private_key = var.private_key
}
provider "azuread" {
tenant_id = var.azure_tenant_id
}
provider "azurerm" {
subscription_id = var.subscription_id
client_id = var.client_id
client_secret = var.client_secret
tenant_id = var.tenant_id
features {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
variable "public_key" {
description = "The public API key for MongoDB Atlas"
type = string
}
variable "private_key" {
description = "The private API key for MongoDB Atlas"
type = string
}
variable "project_id" {
description = "Atlas project ID"
type = string
}
variable "azure_tenant_id" {
type = string
}
variable "subscription_id" {
default = "Azure Subscription ID"
type = string
}
variable "client_id" {
default = "Azure Client ID"
type = string
}
variable "client_secret" {
default = "Azure Client Secret"
type = string
}
variable "tenant_id" {
default = "Azure Tenant ID"
type = string
}
variable "azure_atlas_app_id" {
type = string
}
variable "azure_resource_group_location" {
type = string
}
variable "storage_account_name" {
type = string
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
azuread = {
source = "hashicorp/azuread"
version = "~> 2.53.1"
}
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.0"
}
mongodbatlas = {
source = "mongodb/mongodbatlas"
version = "~> 1.0"
}
}
required_version = ">= 1.0"
}
Loading

0 comments on commit 25e10d6

Please sign in to comment.