Skip to content

Commit

Permalink
v1.8.1 Pre Release (#1088)
Browse files Browse the repository at this point in the history
* INTMDB-390: Upgrade to go1.19 (#1031)

* Update go version references to 1.19 go mod tidy

* Update CHANGELOG.md

* Chore(deps): Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#1026)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v3.3.1...v3.4.0)

---
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]>

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

* Update golangci-lint.yml

* Update version and timeout

---------

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

* Set SMS email from schema to carry value of boolean forward (#1029)

* Add metric_threshold_config threshold_config in read provider (#1030)

* INTMDB-440: Update ldap_configuration broken (#1033)

* Update CHANGELOG.md

* Chore(deps): Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#1026)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v3.3.1...v3.4.0)

---
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]>

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

* Add authentication_enabled parameter to LDAPConfigurationUpdate

---------

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

* INTMDB-556: Regression in 1.8.0: mongodbatlas_third_party_integration marks "type" attribute as deprecated (#1034)

* Update CHANGELOG.md

* Chore(deps): Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#1026)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v3.3.1...v3.4.0)

---
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]>

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

* Add warning for deprecated integration types

---------

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

* INTMDB-32: Add example for NVME upgrade (#1037)

* Update CHANGELOG.md

* Chore(deps): Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#1026)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v3.3.1...v3.4.0)

---
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]>

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

* Add example for NVME upgrade

* Update examples/atlas-cluster/nvme-upgrade/README.md

Co-authored-by: Zuhair Ahmed <[email protected]>

* Update examples/atlas-cluster/nvme-upgrade/README.md

Co-authored-by: Zuhair Ahmed <[email protected]>

* Update examples/atlas-cluster/nvme-upgrade/README.md

Co-authored-by: Zuhair Ahmed <[email protected]>

---------

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

* INTMDB-424: Add AWS and Azure serverless private link examples (#1043)

* Add AWS and Azure serverless private link examples

* Remove unused variable

* INTMDB-560: cloud_provider_access_authorization and encryption_at_rest improvements (#1045)

* Add additional logging and retries based on error code

* Lint add catch error handler at end if fails after retry

* Fix missing groupID

* Update resource_mongodbatlas_encryption_at_rest.go

* Correct import statement error handler to match docs (#1046)

* INTMDB-570: ERROR: Pager Duty API key must consist of 32 hexadecimal digits (#1054)

* Update codeowner to use APIx-Integrations (#1050)

* Add support for retaining service key values

* Fix matcher test

* Update third party testing

* Lint

---------

Co-authored-by: Andrea Angiolillo <[email protected]>

* INTMDB 508 - Configurable Timeouts for Resources dependent on Advanced Cluster IDLE (#1047)

* PrivateEndpointRegionalMode now takes timeout values for CUD and respects them on waiting for advanced clusters to IDLE

* Added timeouts documentation for private endpoint regional mode

* provider_backup_enabled deprecated to cloud_backup (#1036)

* Update CHANGELOG.md

* Chore(deps): Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#1026)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v3.3.1...v3.4.0)

---
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]>

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

* provider_backup_enabled deprecated to cloud_backup

* replace with cloud_backup parameter

---------

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

* INTMDB-517: Event Trigger Error Handler Update (#1061)

* Event Trigger Docs Update

* Update event_trigger.html.markdown

* Update event_triggers.html.markdown

* Update codeowner to use APIx-Integrations (#1050)

* Chore(deps): Bump github.com/gruntwork-io/terratest (#1051)

Bumps [github.com/gruntwork-io/terratest](https://github.com/gruntwork-io/terratest) from 0.41.9 to 0.41.10.
- [Release notes](https://github.com/gruntwork-io/terratest/releases)
- [Commits](gruntwork-io/terratest@v0.41.9...v0.41.10)

---
updated-dependencies:
- dependency-name: github.com/gruntwork-io/terratest
  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(deps): Bump github.com/hashicorp/hcl/v2 from 2.15.0 to 2.16.0 (#1055)

Bumps [github.com/hashicorp/hcl/v2](https://github.com/hashicorp/hcl) from 2.15.0 to 2.16.0.
- [Release notes](https://github.com/hashicorp/hcl/releases)
- [Changelog](https://github.com/hashicorp/hcl/blob/main/CHANGELOG.md)
- [Commits](hashicorp/hcl@v2.15.0...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/hcl/v2
  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>

* Update resource_mongodbatlas_event_trigger.go

---------

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

* INTMDB-571: POST Create Access List Entries for One Organization API Key endpoint supports list, but Terraform does not (#1065)

* Add example for multiple IP and  CIDR blocks

* Tidy up variables

* Update examples/atlas-ip-access-list/main.tf

Co-authored-by: Zuhair Ahmed <[email protected]>

* Update examples/atlas-ip-access-list/main.tf

Co-authored-by: Zuhair Ahmed <[email protected]>

---------

Co-authored-by: Zuhair Ahmed <[email protected]>

* INTMDB-572: HELP-42215 - PATCH Update Advanced Configuration Options for One Cluster / Advance Cluster (#1066)

* improve detection of empty struct

* Make cluster update when actual changes are present

* Update alert_configuration.html.markdown (#1068)

* Update access_list_api_key.html.markdown (#1058)

* Update alert_configuration.html.markdown

* Update website/docs/r/alert_configuration.html.markdown

* Doc Clean Up Cloud Provider Access (#1035)

* Update CHANGELOG.md

* Chore(deps): Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#1026)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v3.3.1...v3.4.0)

---
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]>

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

* Doc Clean Up Cloud Provider Access

* Update cloud_provider_access.markdown

---------

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

* Update project_api_key.html.markdown (#1044)

* Update project_api_key.html.markdown

Remove spare bracket

* Update project_api_key.html.markdown

Indent

* typo in readme (#1073)

* Update access_list_api_key.html.markdown (#1058)

* typo in readme

* INTMDB-600: Add support for conditional timeout for search index build (#1077)

* Update access_list_api_key.html.markdown (#1058)

* Add support for conditional timeout for search index build

* fix lint

---------

Co-authored-by: Zuhair Ahmed <[email protected]>

* Trigger index rebuild on cluster or project change (#1078)

* Improved encryption at rest example (#1060)

* create key in KMS and restrict IAM policy to key

* added readme

* removed other encryption examples as they're redundant

* fixed formatting

* INTMDB-410: PrivateLink Endpoint Examples + Documentation Cleanup (#1082)

* Clarified examples and documentation around using privatelink endpoints and getting connection strings in a single terraform apply on clusters/serverless instances

* fixed tflint failure

* Updated serverless-instance to provide more clarity on outputting connection strings

* Update .github_changelog_generator

* Update CHANGELOG.md

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Zuhair Ahmed <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrea Angiolillo <[email protected]>
Co-authored-by: Dosty Everts <[email protected]>
Co-authored-by: Thomas Victoria <[email protected]>
Co-authored-by: robbertkauffman <[email protected]>
  • Loading branch information
7 people authored Mar 6, 2023
1 parent f532138 commit 98b2660
Show file tree
Hide file tree
Showing 112 changed files with 1,731 additions and 815 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/automated-test-acceptances.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Acceptance Tests
env:
SKIP_TEST_EXTERNAL_CREDENTIALS: ${{ secrets.SKIP_TEST_EXTERNAL_CREDENTIALS }}
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Acceptance Tests
env:
SKIP_TEST_EXTERNAL_CREDENTIALS: ${{ secrets.SKIP_TEST_EXTERNAL_CREDENTIALS }}
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Acceptance Tests
env:
SKIP_TEST_EXTERNAL_CREDENTIALS: ${{ secrets.SKIP_TEST_EXTERNAL_CREDENTIALS }}
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Acceptance Tests
env:
SKIP_TEST_EXTERNAL_CREDENTIALS: ${{ secrets.SKIP_TEST_EXTERNAL_CREDENTIALS }}
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Acceptance Tests
env:
SKIP_TEST_EXTERNAL_CREDENTIALS: ${{ secrets.SKIP_TEST_EXTERNAL_CREDENTIALS }}
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Acceptance Tests
env:
SKIP_TEST_EXTERNAL_CREDENTIALS: ${{ secrets.SKIP_TEST_EXTERNAL_CREDENTIALS }}
Expand Down Expand Up @@ -406,7 +406,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Acceptance Tests
env:
SKIP_TEST_EXTERNAL_CREDENTIALS: ${{ secrets.SKIP_TEST_EXTERNAL_CREDENTIALS }}
Expand Down Expand Up @@ -468,7 +468,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Acceptance Tests Gov
env:
SKIP_TEST_EXTERNAL_CREDENTIALS: ${{ secrets.SKIP_TEST_EXTERNAL_CREDENTIALS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automated-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Website
run: make tools && make website-lint
- name: Test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: go build
run: go build -o terraform-plugin-dir/terraform-provider-mongodbatlas-dev_v99.99.99_x5 .
- name: override plugin
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.46.2
args: --timeout 7m0s
version: v1.50.0
args: --timeout 9m0s
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
-
name: Import GPG key
id: import_gpg
Expand Down
4 changes: 2 additions & 2 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
future-release=v1.8.0
since-tag=v1.7.0
future-release=v1.8.1
since-tag=v1.8.0
date-format=%B %d, %Y
base=CHANGELOG.md
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## [v1.8.1](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.8.1) (March 02, 2023)

[Full Changelog](https://github.com/mongodb/terraform-provider-mongodbatlas/compare/v1.8.1-pre2...v1.8.1)

**Merged pull requests:**

- Chore\(deps\): Bump github.com/hashicorp/hcl/v2 from 2.16.0 to 2.16.1 [\#1062](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/1062) ([dependabot[bot]](https://github.com/apps/dependabot))
- Update access\_list\_api\_key.html.markdown [\#1058](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/1058) ([Zuhairahmed](https://github.com/Zuhairahmed))
- Chore\(deps\): Bump github.com/hashicorp/hcl/v2 from 2.15.0 to 2.16.0 [\#1055](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/1055) ([dependabot[bot]](https://github.com/apps/dependabot))
- Chore\(deps\): Bump github.com/gruntwork-io/terratest from 0.41.9 to 0.41.10 [\#1051](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/1051) ([dependabot[bot]](https://github.com/apps/dependabot))
- Update CODEOWNERS to use APIx-Integrations [\#1050](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/1050) ([andreaangiolillo](https://github.com/andreaangiolillo))
- Chore\(deps\): Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 [\#1026](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/1026) ([dependabot[bot]](https://github.com/apps/dependabot))

## [v1.8.1-pre2](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.8.1-pre2) (February 22, 2023)

[Full Changelog](https://github.com/mongodb/terraform-provider-mongodbatlas/compare/v1.8.1-pre1...v1.8.1-pre2)

**Closed issues:**

- Warning: Deprecated attribute [\#1042](https://github.com/mongodb/terraform-provider-mongodbatlas/issues/1042)
- GCP Network Peering remains pending when created via terraform [\#917](https://github.com/mongodb/terraform-provider-mongodbatlas/issues/917)

## [v1.8.1-pre1](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.8.1-pre1) (February 06, 2023)

[Full Changelog](https://github.com/mongodb/terraform-provider-mongodbatlas/compare/v1.8.0...v1.8.1-pre1)

**Closed issues:**

- Unable to create third party integration of type Datadog with version 1.8.0 [\#1038](https://github.com/mongodb/terraform-provider-mongodbatlas/issues/1038)
- mongodbatlas\_third\_party\_integration - api\_token keeps updating on every apply [\#963](https://github.com/mongodb/terraform-provider-mongodbatlas/issues/963)
- Unable to add mongodbatlas provider to CDK [\#952](https://github.com/mongodb/terraform-provider-mongodbatlas/issues/952)
- \[Bug\] `update_snapshots` doesn't save at TF state with `mongodbatlas_cloud_backup_schedule` resource [\#904](https://github.com/mongodb/terraform-provider-mongodbatlas/issues/904)
- Cannot ignore changes for replication\_specs when autoscaling is enabled [\#888](https://github.com/mongodb/terraform-provider-mongodbatlas/issues/888)

## [v1.8.0](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.8.0) (2023-1-26)

[Full Changelog](https://github.com/mongodb/terraform-provider-mongodbatlas/compare/v1.7.0...v1.8.0)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ The integration tests helps the validation for resources interacting with third

### Autoclose stale issues and PRs

- After 30 days of no activity (no comments or commits on an issue/PR) we automatically tag it as "stale" and add a message: ```This issue/PR has gone 30 days without any activity and meets the project's definition of "stale". This will be auto-closed if there is no new activity over the next 60 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!```
- After 60 more days of no activity we automatically close the issue/PR.
- After 30 days of no activity (no comments or commits on an issue/PR) we automatically tag it as "stale" and add a message: ```This issue/PR has gone 30 days without any activity and meets the project's definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!```
- After 30 more days of no activity we automatically close the issue/PR.

## Thanks

Expand Down
2 changes: 1 addition & 1 deletion examples/Atlas_Database_Users/atlas_cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "mongodbatlas_cluster" "cluster" {
}
}
# Provider Settings "block"
provider_backup_enabled = true
cloud_backup = true
auto_scaling_disk_gb_enabled = true
provider_name = "AWS"
disk_size_gb = 10
Expand Down
2 changes: 1 addition & 1 deletion examples/MongoDB-Atlas-AWS-VPC-Peering/atlas.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "mongodbatlas_cluster" "cluster-atlas" {
read_only_nodes = 0
}
}
provider_backup_enabled = true
cloud_backup = true
auto_scaling_disk_gb_enabled = true
mongo_db_major_version = "5.0"

Expand Down
2 changes: 1 addition & 1 deletion examples/MongoDB-Atlas-GCP-VPC-Peering/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "mongodbatlas_cluster" "cluster" {
key = "environment"
value = "prod"
}
provider_backup_enabled = true
cloud_backup = true
auto_scaling_disk_gb_enabled = true
mongo_db_major_version = "4.4"
auto_scaling_compute_enabled = true
Expand Down
40 changes: 40 additions & 0 deletions examples/atlas-cluster/nvme-upgrade/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# MongoDB Atlas Provider -- Cluster NVME (Non-Volatile Memory Express) Upgrade
This example creates a project and cluster. It is intended to show how to upgrade from Standard, to PROVISIONED storage tier.

Variables Required:
- `atlas_org_id`: ID of the Atlas organization
- `public_key`: Atlas public key
- `private_key`: Atlas private key
- `provider_name`: Name of provider to use for cluster (TENANT, AWS, GCP)
- `backing_provider_name`: If provider_name is tenant, the backing provider (AWS, GCP)
- `provider_instance_size_name`: Size of the cluster (Shared: M0, M2, M5, Dedicated: M10+.)
- `provider_volume_type`: Provider storage type STANDARD vs PROVISIONED (NVME)
- `provider_disk_iops`: The maximum input/output operations per second (IOPS) the system can perform. The possible values depend on the selected `provider_instance_size_name` and `disk_size_gb`. This setting requires that `provider_instance_size_name` to be M30 or greater and cannot be used with clusters with local NVMe SSDs. The default value for `provider_disk_iops` is the same as the cluster tier's Standard IOPS value, as viewable in the Atlas console. It is used in cases where a higher number of IOPS is needed and possible. If a value is submitted that is lower or equal to the default IOPS value for the cluster tier Atlas ignores the requested value and uses the default. More details available under the providerSettings.diskIOPS parameter: [MongoDB API Clusters](https://docs.atlas.mongodb.com/reference/api/clusters-create-one/)
* You do not need to configure IOPS for a STANDARD disk configuration but only for a PROVISIONED configuration.

For this example, first we'll start out on the standard tier, then upgrade to a NVME storage tier.


Utilize the following to execute a working example, replacing the org id, public and private key with your values:

Apply with the following `terraform.tfvars` to first create a shared tier cluster:
```
atlas_org_id = "627a9687f7f7f7f774de306f14"
public_key = <REDACTED>
private_key = <REDACTED>
provider_name = "AWS"
provider_instance_size_name = "M40"
provider_volume_type = "STANDARD"
provider_disk_iops = 3000
```

Apply with the following `terraform.tfvars` to upgrade the standard storage tier cluster you just created to provisioned storage NVME tier:
```
atlas_org_id = "627a9687f7f7f7f774de306f14"
public_key = <REDACTED>
private_key = <REDACTED>
provider_name = "AWS"
provider_instance_size_name = "M40_NVME"
provider_volume_type = "PROVISIONED"
provider_disk_iops = 135125
```
21 changes: 21 additions & 0 deletions examples/atlas-cluster/nvme-upgrade/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
provider "mongodbatlas" {
public_key = var.public_key
private_key = var.private_key
}

resource "mongodbatlas_cluster" "cluster" {
project_id = mongodbatlas_project.project.id
name = "NVMEToUpgrade"
cluster_type = "REPLICASET"
provider_name = var.provider_name
provider_region_name = "US_EAST_1"
provider_instance_size_name = var.provider_instance_size_name
provider_volume_type = var.provider_volume_type
provider_disk_iops = var.provider_disk_iops
cloud_backup = true
}

resource "mongodbatlas_project" "project" {
name = "NVMEUpgradeTest"
org_id = var.atlas_org_id
}
29 changes: 29 additions & 0 deletions examples/atlas-cluster/nvme-upgrade/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
variable "atlas_org_id" {
description = "Atlas organization id"
default = ""
}
variable "public_key" {
description = "Public API key to authenticate to Atlas"
}
variable "private_key" {
description = "Private API key to authenticate to Atlas"
}
variable "provider_name" {
description = "Atlas cluster provider name"
default = "AWS"
}

variable "provider_instance_size_name" {
description = "Atlas cluster provider instance name"
default = "M40"
}

variable "provider_volume_type" {
description = "Atlas cluster provider storage volume name"
default = "STANDARD"
}

variable "provider_disk_iops" {
description = "Atlas cluster provider disk iops"
default = 100
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ terraform {
required_providers {
mongodbatlas = {
source = "mongodb/mongodbatlas"
# version = "0.7-dev"
}
}
required_version = ">= 0.13"
}
}
3 changes: 3 additions & 0 deletions examples/atlas-encryption-at-rest/aws/aws-kms.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "aws_kms_key" "kms_key" {
description = "MongoDB Atlas KMS test key"
}
48 changes: 27 additions & 21 deletions examples/atlas-encryption-at-rest/aws/aws-roles.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_iam_role_policy" "test_policy" {
name = "mongo_setup_policy"
name = "mongodb_atlas_kms_test_policy"
role = aws_iam_role.test_role.id

policy = <<-EOF
Expand All @@ -8,34 +8,40 @@ resource "aws_iam_role_policy" "test_policy" {
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
"Action": [
"kms:Decrypt",
"kms:Encrypt",
"kms:DescribeKey"
],
"Resource": [
"${aws_kms_key.kms_key.arn}"
]
}
]
}
EOF
}

resource "aws_iam_role" "test_role" {
name = "mongo_setup_test_role"
name = "mongodb_atlas_kms_test_role"

assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws_config[0].atlas_aws_account_arn}"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws_config[0].atlas_assumed_role_external_id}"
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws_config[0].atlas_aws_account_arn}"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws_config[0].atlas_assumed_role_external_id}"
}
}
}
}
]
}
EOF
}
]
}
EOF
}
Loading

0 comments on commit 98b2660

Please sign in to comment.