Skip to content

Commit

Permalink
Merge branch 'CLOUDP-246459-ear-kms-dev' into CLOUDP-267668-ear-ds-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
maastha committed Sep 4, 2024
2 parents 8cd84dc + 4a20878 commit af022c3
Show file tree
Hide file tree
Showing 208 changed files with 703 additions and 344 deletions.
2 changes: 1 addition & 1 deletion .changelog/2478.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource/mongodbatlas_advanced_cluster: Supports defining cluster shards with in
```

```release-note:note
resource/mongodbatlas_advanced_cluster: Using this new version impacts the possibility of editing the definition of multi shard clusters in the Atlas UI. This impact is limited to the first weeks of August.
resource/mongodbatlas_advanced_cluster: Using this new version impacts the possibility of editing the definition of multi shard clusters in the Atlas UI. This impact is limited to the first weeks of September.
```

```release-note:enhancement
Expand Down
7 changes: 7 additions & 0 deletions .changelog/2505.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:new-guide
[Migration Guide: Advanced Cluster New Sharding Schema](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema). This enables Independent Shard Scaling.
```

```release-note:new-guide
[Migration Guide: Cluster to Advanced Cluster](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/cluster-to-advanced-cluster-migration-guide)
```
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Link to any related issue(s):
- [ ] I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
- [ ] I have added any necessary documentation (if appropriate)
- [ ] I have run make fmt and formatted my code
- [ ] If changes include deprecations or removals, I defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.
- [ ] If changes include deprecations or removals I have added appropriate changelog entries.
- [ ] If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

## Further comments
40 changes: 20 additions & 20 deletions .github/workflows/acceptance-tests-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -316,7 +316,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand Down Expand Up @@ -356,7 +356,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand Down Expand Up @@ -394,7 +394,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -418,7 +418,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -440,7 +440,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand Down Expand Up @@ -485,7 +485,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -507,7 +507,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -529,7 +529,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -551,7 +551,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand Down Expand Up @@ -589,7 +589,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -616,7 +616,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand Down Expand Up @@ -645,7 +645,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand Down Expand Up @@ -690,7 +690,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand Down Expand Up @@ -727,7 +727,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -752,7 +752,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -774,7 +774,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -796,7 +796,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -823,7 +823,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand All @@ -847,7 +847,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86
with:
version: v1.59.1 # Also update GOLANGCI_VERSION variable in GNUmakefile when updating this version
version: v1.60.3 # Also update GOLANGCI_VERSION variable in GNUmakefile when updating this version
- name: actionlint
run: |
make tools
Expand All @@ -70,13 +70,15 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- run: make tools # all resources with auto-generated doc must be specified below here
- name: Doc for control_plane_ip_addresses
run: export resource_name=control_plane_ip_addresses && make generate-doc
run: make generate-doc resource_name=control_plane_ip_addresses
- name: Doc for push_based_log_export
run: export resource_name=push_based_log_export && make generate-doc
run: make generate-doc resource_name=push_based_log_export
- name: Doc for search_deployment
run: export resource_name=search_deployment && make generate-doc
run: make generate-doc resource_name=search_deployment
- name: Doc for encryption_at_rest
run: export resource_name=encryption_at_rest && make generate-doc
run: make generate-doc resource_name=encryption_at_rest
- name: Doc for encryption_at_rest_private_endpoint
run: make generate-doc resource_name=encryption_at_rest_private_endpoint
- name: Find mutations
id: self_mutation
run: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: ${{ vars.TF_VERSION_LATEST }}
terraform_wrapper: false
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ linters:
- nakedret
- nolintlint
- rowserrcheck
- exportloopref
- copyloopvar
- staticcheck
- stylecheck
- typecheck
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
golang 1.22.5
terraform 1.9.2
golang 1.23.0
terraform 1.9.5
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## (Unreleased)

## 1.18.1 (August 26, 2024)

## 1.18.0 (August 14, 2024)

BREAKING CHANGES:

* data-source/mongodbatlas_cloud_backup_snapshot_export_bucket: Changes `id` attribute from optional to computed only ([#2499](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2499))
Expand All @@ -20,7 +24,12 @@ NOTES:
* data-source/mongodbatlas_advanced_cluster: Deprecates `replication_specs.#.id`, `replication_specs.#.num_shards`, `disk_size_gb`, `advanced_configuration.0.default_read_concern`, and `advanced_configuration.0.fail_index_key_too_long`. To learn more, see the [1.18.0 Migration Guide](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/1.18.0-upgrade-guide). ([#2420](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2420))
* data-source/mongodbatlas_advanced_clusters: Deprecates `replication_specs.#.id`, `replication_specs.#.num_shards`, `disk_size_gb`, `advanced_configuration.0.default_read_concern`, and `advanced_configuration.0.fail_index_key_too_long`. To learn more, see the [1.18.0 Migration Guide](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/1.18.0-upgrade-guide). ([#2420](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2420))
* resource/mongodbatlas_advanced_cluster: Deprecates `replication_specs.#.id`, `replication_specs.#.num_shards`, `disk_size_gb`, `advanced_configuration.0.default_read_concern`, and `advanced_configuration.0.fail_index_key_too_long`. To learn more, see the [1.18.0 Migration Guide](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/1.18.0-upgrade-guide). ([#2420](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2420))
* resource/mongodbatlas_advanced_cluster: Using this new version impacts the possibility of editing the definition of multi shard clusters in the Atlas UI. This impact is limited to the first weeks of August. ([#2478](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2478))
* resource/mongodbatlas_advanced_cluster: Using this new version impacts the possibility of editing the definition of multi shard clusters in the Atlas UI. This impact is limited to the first weeks of September. ([#2478](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2478))

FEATURES:

* **New Guide:** [Migration Guide: Advanced Cluster New Sharding Schema](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema). This enables Independent Shard Scaling. ([#2505](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2505))
* **New Guide:** [Migration Guide: Cluster to Advanced Cluster](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/cluster-to-advanced-cluster-migration-guide) ([#2505](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2505))

ENHANCEMENTS:

Expand Down
9 changes: 6 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GITTAG=$(shell git describe --always --tags)
VERSION=$(GITTAG:v%=%)
LINKER_FLAGS=-s -w -X 'github.com/mongodb/terraform-provider-mongodbatlas/version.ProviderVersion=${VERSION}'

GOLANGCI_VERSION=v1.59.1 # Also update golangci-lint GH action in code-health.yml when updating this version
GOLANGCI_VERSION=v1.60.3 # Also update golangci-lint GH action in code-health.yml when updating this version

export PATH := $(shell go env GOPATH)/bin:$(PATH)
export SHELL := env PATH=$(PATH) /bin/bash
Expand Down Expand Up @@ -74,6 +74,7 @@ lint:
.PHONY: tools
tools: ## Install dev tools
@echo "==> Installing dependencies..."
go telemetry off # disable sending telemetry data, more info: https://go.dev/doc/telemetry
go install github.com/icholy/gomajor@latest
go install github.com/terraform-linters/[email protected]
go install github.com/rhysd/actionlint/cmd/actionlint@latest
Expand Down Expand Up @@ -123,8 +124,10 @@ scaffold-schemas:


.PHONY: generate-doc
generate-doc: ## Generate the resource documentation via tfplugindocs
./scripts/generate-doc.sh ${resource_name}
# e.g. run: make generate-doc resource_name=search_deployment
# generate the resource documentation via tfplugindocs
generate-doc:
@scripts/generate-doc.sh ${resource_name}

.PHONY: update-tf-compatibility-matrix
update-tf-compatibility-matrix: ## Update Terraform Compatibility Matrix documentation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Feature requests can be submitted at https://feedback.mongodb.com/forums/924145-
## Requirements
- [HashiCorp Terraform Version Compatibility Matrix](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs#hashicorp-terraform-versionhttpswwwterraformiodownloadshtml-compatibility-matrix)

- [Go Version](https://golang.org/doc/install) 1.22 (to build the provider plugin)
- [Go Version](https://golang.org/doc/install) 1.23 (to build the provider plugin)

## Using the Provider

Expand Down
2 changes: 1 addition & 1 deletion contributing/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribution guidelines

Thanks for your interest in contributing to MongoDB Atlas Terraform Provider, the following documents define guidelines necessary to participate in the community.
Thanks for your interest in contributing to MongoDB Atlas Terraform Provider, the following documents define guidelines necessary to participate in the community. Please note that we no longer develop or maintain any resources or data sources we marked as deprecated in our [documentation](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs).

- [Development Setup](development-setup.md)
- [Development Best Practices](development-best-practices.md)
Expand Down
4 changes: 2 additions & 2 deletions contributing/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
### Prerequisite Tools

- [Git](https://git-scm.com/)
- [Go (at least Go 1.22)](https://golang.org/dl/)
- [Go (at least Go 1.23)](https://golang.org/dl/)

### Environment

Expand Down Expand Up @@ -51,7 +51,7 @@ For more explained information about plugin override check [Development Override
- Make sure that the PR title follows [*Conventional Commits*](https://www.conventionalcommits.org/).
- Add comments around your new code that explain what's happening.
- Commit and push your changes to your branch then submit a pull request against the `master` branch.
- A repo maintainer will review your pull request.
- A repo maintainer will review your pull request. **Note**: If you have an active [MongoDB Atlas Support](https://www.mongodb.com/services/support/atlas-support-plans) contract, we recommend also creating a support ticket for any questions related to this process.

### Merging a Pull Request
Due to security reasons, there are restrictions on how external contributions can be handled, especially concerning the use of repository secrets and running tests from forks.
Expand Down
2 changes: 1 addition & 1 deletion contributing/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ We autogenerate the documentation of our provider resources and data sources via
- Add the resource/data source templates to the [templates](https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/templates) folder. See [README.md](https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/templates/README.md) for more info.
- Run the Makefile command `generate-doc`
```bash
export resource_name=search_deployment && make generate-doc
make generate-doc resource_name=search_deployment
```
2 changes: 1 addition & 1 deletion docs/data-sources/advanced_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ data "mongodbatlas_advanced_cluster" "example" {
}
```

## Example using latest sharding schema with independent shard scaling in the cluster
## Example using latest sharding configurations with independent shard scaling in the cluster

```terraform
resource "mongodbatlas_advanced_cluster" "example" {
Expand Down
Loading

0 comments on commit af022c3

Please sign in to comment.