fix: Update mongodbatlas_cloud_backup_schedule to add the ID field to policyItems #1357
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Ticket: INTMDB-970
This bug was discovered as part of HELP-4841: currently
mongodbatlas_cloud_backup_schedule
is updating backup policies without providing theid
fields forpolicyItems
. This prevents atlas from updating old snaphosts to use the new policy.This PR updates the logic to include the ID field to policyItems` when updating the resource.
Type of change:
Required Checklist:
Further comments
Testing
Updated acceptance test
Running tool: /Users/andrea.angiolillo/.asdf/shims/go test -timeout 300000s -run ^TestAccBackupRSCloudBackupSchedule_basic$ github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas ok github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas 772.266s
Tested locally and checked that the policy retemption date was updated