Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Merges Azure KMS Encryption at Rest Private Endpoint feature to master #2569

Merged
merged 22 commits into from
Sep 9, 2024

Conversation

maastha
Copy link
Collaborator

@maastha maastha commented Sep 9, 2024

Description

Merges Azure KMS Encryption at Rest Private Endpoint feature to master

Link to any related issue(s): CLOUDP-267671

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • 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 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

maastha and others added 20 commits August 12, 2024 11:28
…azure_key_vault_config.require_private_networking` field (#2509)
…esource (#2512)

* wip - implementing CRUD

* include changelog entry

* small adjustments

* supporting state transition logic

* implement acceptance test

* add unit testing for state transitions

* handle return error message if failed status is present

* add acceptance test transitioning for public to private network

* improve messaging for failed status

* fix prechecks

* use global const for resource name

* avoid hardcoded value

* adjust state transition logic for delete

* adjusting target version in migration test to 1.19.0

* adjust default refresh to 30 seconds for quicker response
…ingular data source (#2527)

* implement singular data source

* including changelog entry
…_endpoint` resource (#2540)

* Include example for ear with private endpoint

* fix example

* adjust readme

* Update examples/mongodbatlas_encryption_at_rest_private_endpoint/azure/README.md

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

* Update examples/mongodbatlas_encryption_at_rest_private_endpoint/azure/README.md

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

* add example cli command

* make use of variables to make value of resource id more compact

---------

Co-authored-by: maastha <[email protected]>
…ts` data source (#2536)

* temporary change to cloud provider access and getting latest sdk

* implements plural data source

* adapted cloud provider access with latest changes from dev preview

* fix unit test

* adding changelog entry

* add changes to verify plural data source in basic test case

* doc adjust to cloud_provider attribute
…source & adds `valid` attribute for cloud provider configs in the resource (#2538)
… resource and data sources (#2547)

* adding documentation for encryption_at_rest_private_endpoint resource and data sources

* align generated docs

* minor typo fix

* Adjust description of project_id to make it more concise

* align note stating feature is available by request as defined in general docs
… branch to adopt latest SDK (#2549)

* test: Reduce instance size and use of provisioned disk iops for test that verifies transition for symmetric to asymmetric configuration (#2503)

* doc: Include changelog entries to mention 2 new guides (#2506)

* add entry for 2 new guides

* add link

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

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

* doc: Update Atlas SP db_role_to_execute info. (#2508)

* (DOCSP-41590) Updating Atlas SP db_role_to_execute info.

* Update docs/resources/stream_connection.md

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

---------

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

* doc: Contributing Guidelines Updates (#2494)

* Contributing Guidelines Updates

* Update README.md

* Update README.md

* Update contributing/README.md

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

---------

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

* test: Simply migration test checks after 1.18.0 release and adjust version constraint in advanced_cluster examples uing new schema (#2510)

* doc: Add references to the terraform modules in the resources documentations (#2513)

* add references to the modules in the resources documentations

* fix pr comments

* chore: Bump hashicorp/setup-terraform from 3.1.1 to 3.1.2 (#2515)

Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/hashicorp/setup-terraform/releases)
- [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md)
- [Commits](hashicorp/setup-terraform@651471c...b9cd54a)

---
updated-dependencies:
- dependency-name: hashicorp/setup-terraform
  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: Add mention of support ticket when opening a pull request (#2507)

* Add mention of creating support ticket when opening PR

* rephrasing to avoid mention of priority

* including suggestion

* doc: Updates`mongodbatlas_advanced_cluster` ISS migration guide & resource doc with expected 500 error on update (#2525)

* chore: Updates mongodbatlas_advanced_cluster tests to expect temporary SERVICE_UNAVAILABLE error when migrating from old to new schema (#2523)

* doc: Fixes wordings in the new advanced_cluster sharding guide. (#2524)

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

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

* chore: upgrades go SDK from `v20240805001` to `v20240805002` (#2534)

* chore: Updates to Go 1.23 (#2535)

* update asdf TF version

* update to Go 1.23

* update linter

* update golang-ci linter

* disable Go telemetry

* revert TF change

* chore: Bump go.mongodb.org/atlas from 0.36.0 to 0.37.0 (#2532)

Bumps [go.mongodb.org/atlas](https://github.com/mongodb/go-client-mongodb-atlas) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/mongodb/go-client-mongodb-atlas/releases)
- [Changelog](https://github.com/mongodb/go-client-mongodb-atlas/blob/master/CHANGELOG.md)
- [Commits](mongodb/go-client-mongodb-atlas@v0.36.0...v0.37.0)

---
updated-dependencies:
- dependency-name: go.mongodb.org/atlas
  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/hcl/v2 from 2.21.0 to 2.22.0 (#2530)

Bumps [github.com/hashicorp/hcl/v2](https://github.com/hashicorp/hcl) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/hashicorp/hcl/releases)
- [Changelog](https://github.com/hashicorp/hcl/blob/main/CHANGELOG.md)
- [Commits](hashicorp/hcl@v2.21.0...v2.22.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 asdf TF version to 1.9.5 (#2537)

* chore: Changes deprecation message for labels attribute (#2542)

* chore: Upgrades go SDK from `v20240805002` to `v20240805003` (#2545)

* major version update calling gomajor tool

* manual change to reincorporate v20240530005

* reverts temp changes in cloud provider resources, fixes sdk versions in new implementations

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: svc-apix-bot <[email protected]>
Co-authored-by: lmkerbey-mdb <[email protected]>
Co-authored-by: kanchana-mongodb <[email protected]>
Co-authored-by: Zuhair Ahmed <[email protected]>
Co-authored-by: kyuan-mongodb <[email protected]>
Co-authored-by: rubenVB01 <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: maastha <[email protected]>
Co-authored-by: Marco Suma <[email protected]>
Co-authored-by: Espen Albert <[email protected]>
Co-authored-by: Leo Antoli <[email protected]>
Co-authored-by: Oriol <[email protected]>
…ance test using azapi to approve private endpoint & check ACTIVE status (#2558)
…documentation (#2559)

* minor typo fix

* improve initial description in ear

* adjust ear docs with mention of azure private link

* private link doc adjustments

* improve example

* improve example

* add mention in ear examples about policies

* add note on update operation

* link adjustments and add header for handling existing clusters

* add note on private endpoint

* add note in data sources

* Update docs/resources/encryption_at_rest_private_endpoint.md

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

* add clarification of preview flag for data sources

---------

Co-authored-by: maastha <[email protected]>
@maastha maastha marked this pull request as ready for review September 9, 2024 09:55
@maastha maastha requested review from a team as code owners September 9, 2024 09:55
Copy link
Contributor

github-actions bot commented Sep 9, 2024

APIx bot: a message has been sent to Docs Slack channel

- name: Doc for encryption_at_rest
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: Doc for project_ip_addresses
run: export resource_name=project_ip_addresses && make generate-doc
Copy link
Member

@lantoli lantoli Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the same way for all resources, I understand we have to do it if Makefile target was changed to introduce the param, so I think project_ip_addresses needs to be changed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -62,3 +62,8 @@ func IsStringPresent(strPtr *string) bool {
func MongoDBRegionToAWSRegion(region string) string {
return strings.ReplaceAll(strings.ToLower(region), "_", "-")
}

// AWSRegionToMongoDBRegion converts region in us-east-1-like format to US_EAST_1-like
func AWSRegionToMongoDBRegion(region string) string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conversion.ValRegion does something similar, is it possible to unifiy both functions so we only have one logic to transform between region formats?

RetryStrategyIdleState = "IDLE"
RetryStrategyDeletedState = "DELETED"
RetryStrategyPendingState = "PENDING"
RetryStrategyCompletedState = "COMPLETED"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these consts are in retrystrategypackage so starting with RetryStrategy... seems redundant

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will address this in follow-up PRs as would not like to make this PR bigger for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, thanks

Copy link
Member

@AgustinBettati AgustinBettati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we can consider merging with a merge commit if we want to preserve more specific git history.

Copy link
Collaborator

@pierwill pierwill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with one suggestion.

docs/data-sources/encryption_at_rest.md Outdated Show resolved Hide resolved
@maastha maastha merged commit 467250f into master Sep 9, 2024
35 checks passed
svc-apix-Bot added a commit that referenced this pull request Sep 9, 2024
lantoli added a commit that referenced this pull request Sep 10, 2024
* master:
  doc: Adds 1.19.0 release upgrade guide (#2564)
  chore: Updates CHANGELOG.md for #2528
  feat: Supports change_stream_options_pre_and_post_images_expire_after_seconds in `mongodbatlas_cluster` and `mongodbatlas_advanced_cluster` (#2528)
  chore: Disables preview mode for EAR private endpoint so it may be normally accessible (#2571)
  doc: Adds support for SDK_BRANCH in schema generation (#2562)
  update git workflow (#2572)
  chore: Updates CHANGELOG.md for #2566
  feat: Adds `mongodbatlas_stream_processor` resource and data sources (#2566)
  chore: Updates CHANGELOG.md for #2569
  chore: Merges Azure KMS Encryption at Rest Private Endpoint feature to master (#2569)
  chore: Updates CHANGELOG.md for #2568
  doc: Includes sync_creation into mongodbatlas_online_archive resource documentation (#2567)
  fix: Sets correct `zone_id` when `use_replication_spec_per_shard` is false and refactors `replica_set_scaling_strategy` handling with old schema of advanced cluster (#2568)
  chore: Updates CHANGELOG.md for #2539
  feat: Support `replica_set_scaling_strategy` in `mongodbatlas_advanced_cluster` (#2539)
  adding changelog entry for 1.18.1 to avoid confusion (#2561)

# Conflicts:
#	internal/provider/provider.go
lantoli added a commit that referenced this pull request Sep 10, 2024
* master:
  doc: Adds 1.19.0 release upgrade guide (#2564)
  chore: Updates CHANGELOG.md for #2528
  feat: Supports change_stream_options_pre_and_post_images_expire_after_seconds in `mongodbatlas_cluster` and `mongodbatlas_advanced_cluster` (#2528)
  chore: Disables preview mode for EAR private endpoint so it may be normally accessible (#2571)
  doc: Adds support for SDK_BRANCH in schema generation (#2562)
  update git workflow (#2572)
  chore: Updates CHANGELOG.md for #2566
  feat: Adds `mongodbatlas_stream_processor` resource and data sources (#2566)
  chore: Updates CHANGELOG.md for #2569
  chore: Merges Azure KMS Encryption at Rest Private Endpoint feature to master (#2569)
  chore: Updates CHANGELOG.md for #2568
  doc: Includes sync_creation into mongodbatlas_online_archive resource documentation (#2567)
  fix: Sets correct `zone_id` when `use_replication_spec_per_shard` is false and refactors `replica_set_scaling_strategy` handling with old schema of advanced cluster (#2568)
  chore: Updates CHANGELOG.md for #2539
  feat: Support `replica_set_scaling_strategy` in `mongodbatlas_advanced_cluster` (#2539)
  adding changelog entry for 1.18.1 to avoid confusion (#2561)

# Conflicts:
#	internal/provider/provider.go
lantoli added a commit that referenced this pull request Sep 10, 2024
* master:
  doc: Adds 1.19.0 release upgrade guide (#2564)
  chore: Updates CHANGELOG.md for #2528
  feat: Supports change_stream_options_pre_and_post_images_expire_after_seconds in `mongodbatlas_cluster` and `mongodbatlas_advanced_cluster` (#2528)
  chore: Disables preview mode for EAR private endpoint so it may be normally accessible (#2571)
  doc: Adds support for SDK_BRANCH in schema generation (#2562)
  update git workflow (#2572)
  chore: Updates CHANGELOG.md for #2566
  feat: Adds `mongodbatlas_stream_processor` resource and data sources (#2566)
  chore: Updates CHANGELOG.md for #2569
  chore: Merges Azure KMS Encryption at Rest Private Endpoint feature to master (#2569)
  chore: Updates CHANGELOG.md for #2568
  doc: Includes sync_creation into mongodbatlas_online_archive resource documentation (#2567)
  fix: Sets correct `zone_id` when `use_replication_spec_per_shard` is false and refactors `replica_set_scaling_strategy` handling with old schema of advanced cluster (#2568)
  chore: Updates CHANGELOG.md for #2539
  feat: Support `replica_set_scaling_strategy` in `mongodbatlas_advanced_cluster` (#2539)
  adding changelog entry for 1.18.1 to avoid confusion (#2561)

# Conflicts:
#	internal/provider/provider.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants