Skip to content

feat: Changes export and auto_export_enabled to Optional only in mongodbatlas_cloud_backup_schedule resource #3500

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

Open
wants to merge 8 commits into
base: CLOUDP-320243-dev-2.0.0
Choose a base branch
from

Conversation

oarbusi
Copy link
Collaborator

@oarbusi oarbusi commented Jul 16, 2025

Description

Changes export and auto_export_enabled to Optional only in mongodbatlas_cloud_backup_schedule resource.

We are considering this a breaking change because of the following scenario:

  • using current version attributes export/auto_export_enabled (with enabled true) is removed -> no plan changes generated, still present in state
  • updating to new version that is optional-only -> user receives a non-empty plan

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

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

@oarbusi oarbusi marked this pull request as ready for review July 17, 2025 12:27
@oarbusi oarbusi requested review from a team as code owners July 17, 2025 12:27
Copy link
Contributor

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

Comment on lines 133 to 134
// TODO: uncomment before merging this, this is temporary to make sure the test is working
// mig.SkipIfVersionBelow(t, "2.0.0")
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed in 5a30622

Copy link

@JuliaMongo JuliaMongo left a comment

Choose a reason for hiding this comment

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

With one question.

* true - Enables automatic export of cloud backup snapshots to the Export Bucket.
* false - Disables automatic export of cloud backup snapshots to the Export Bucket. (default)
* `use_org_and_group_names_in_export_prefix` - Specify true to use organization and project names instead of organization and project UUIDs in the path for the metadata files that Atlas uploads to your bucket after it finishes exporting the snapshots. To learn more about the metadata files that Atlas uploads, see [Export Cloud Backup Snapshot](https://www.mongodb.com/docs/atlas/backup/cloud-backup/export/#std-label-cloud-provider-snapshot-export).
* `copy_settings` - List that contains a document for each copy setting item in the desired backup policy. See [below](#copy_settings)
* `export` - Policy for automatically exporting Cloud Backup Snapshots. `auto_export_enabled` must be set to true when defining this attribute. See [below](#export)
* `export` - Policy for automatically exporting Cloud Backup Snapshots. See [below](#export)

Choose a reason for hiding this comment

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

Why did we remove the line about the auto_export_enabled?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because "auto_export_enabled must be set to true when defining this attribute." is no longer true. It's not necessary to set auto_export_enabled to true when setting export

Choose a reason for hiding this comment

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

Oh so you can have a policy, but still have the export as disabled. I see. Still a bit confusing, but at least consistent with the other change.

@@ -0,0 +1,3 @@
```release-note:breaking-change
resource/mongodbatlas_cloud_backup_schedule: Changes `export` and `auto_export_enabled` to Optional only
Copy link
Collaborator

Choose a reason for hiding this comment

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

are we going to have an entry in the 2.0.0 upgrade guide about this explaining why and what's going to happen ? I am wondering if you are tracking that work to be done with some CLOUD? easy to forget considering we're going to have a lot of open conversations

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