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

feat: Adds support for disabling Backup Compliance Policy on resource delete #2953

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AgustinBettati
Copy link
Member

@AgustinBettati AgustinBettati commented Jan 10, 2025

Description

Link to any related issue(s): CLOUDP-294102 (supporting new delete operation), CLOUDP-293109 (docs clarification)

Tested locally (cloud-dev) that the removal of the resource effectively disabled the Backup Compliance Policy in Atlas UI. In cloud-dev there is no pre-requisite of Disablement Approval. Internal KB has all the details of the process, mentioning how API delete operation fits in.

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

@AgustinBettati AgustinBettati marked this pull request as ready for review January 10, 2025 11:45
@AgustinBettati AgustinBettati requested review from a team as code owners January 10, 2025 11:45
Copy link
Contributor

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

Copy link
Collaborator

@themantissa themantissa left a comment

Choose a reason for hiding this comment

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

Small docs change, one question

@@ -6,7 +6,7 @@ When enabled, the Backup Compliance Policy will be applied as the minimum backup

-> **NOTE:** Groups and projects are synonymous terms. You might find `groupId` in the official documentation.

-> **IMPORTANT NOTE:** Once enable a Backup Compliance Policy, no user, regardless of role, can disable the Backup Compliance Policy via Terraform, or any other method, without contacting MongoDB support. This means that once enabled some resources defined in Terraform will no longer be modifiable. See the full list of [Backup Compliance Policy Prohibited Actions and Considerations](https://www.mongodb.com/docs/atlas/backup/cloud-backup/backup-compliance-policy/#configure-a-backup-compliance-policy)
-> **IMPORTANT NOTE:** Once a Backup Compliance Policy is enabled, no user, regardless of role, can disable the Backup Compliance Policy via Terraform, or any other method, without contacting MongoDB support. Only once approved for disablement from support, the resource can be removed and the delete operation will successfully disable the Backup Compliance Policy. This means that once enabled some resources defined in Terraform will no longer be modifiable. See the full list of [Backup Compliance Policy Prohibited Actions and Considerations](https://www.mongodb.com/docs/atlas/backup/cloud-backup/backup-compliance-policy/#configure-a-backup-compliance-policy).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tiny edit to make more clear

Suggested change
-> **IMPORTANT NOTE:** Once a Backup Compliance Policy is enabled, no user, regardless of role, can disable the Backup Compliance Policy via Terraform, or any other method, without contacting MongoDB support. Only once approved for disablement from support, the resource can be removed and the delete operation will successfully disable the Backup Compliance Policy. This means that once enabled some resources defined in Terraform will no longer be modifiable. See the full list of [Backup Compliance Policy Prohibited Actions and Considerations](https://www.mongodb.com/docs/atlas/backup/cloud-backup/backup-compliance-policy/#configure-a-backup-compliance-policy).
-> **IMPORTANT NOTE:** Once a Backup Compliance Policy is enabled, no user, regardless of role, can disable the Backup Compliance Policy via Terraform, or any other method, without contacting MongoDB support. However, if BCP is approved for disablement via the support process, the resource can be removed and the delete operation will successfully disable the Backup Compliance Policy. With Backup Compliance Policy enabled some resources defined in Terraform will no longer be modifiable. See the full list of [Backup Compliance Policy Prohibited Actions and Considerations](https://www.mongodb.com/docs/atlas/backup/cloud-backup/backup-compliance-policy/#configure-a-backup-compliance-policy).

"MongoDB Support and complete an extensive verification process. ")

d.SetId("")
connV2 := meta.(*config.MongoDBClient).AtlasV2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question - did we check if the error is clear from the API endpoint if we run delete and it's not marked as deletable? Not quite our purview but we can push back on the creating team if it's not clear (since that could be really confusing for Terraform users if it's not).

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.

3 participants