From d00cc3d67be977e5bba29ed3448cee98d69413c3 Mon Sep 17 00:00:00 2001 From: admin <33664051+martinstibbe@users.noreply.github.com> Date: Tue, 17 Jan 2023 18:57:56 -0600 Subject: [PATCH 1/3] skip update_snapshots on read as API does not return current value --- mongodbatlas/resource_mongodbatlas_cloud_backup_schedule.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mongodbatlas/resource_mongodbatlas_cloud_backup_schedule.go b/mongodbatlas/resource_mongodbatlas_cloud_backup_schedule.go index a95e7ce1f8..721032ccfa 100644 --- a/mongodbatlas/resource_mongodbatlas_cloud_backup_schedule.go +++ b/mongodbatlas/resource_mongodbatlas_cloud_backup_schedule.go @@ -289,10 +289,6 @@ func resourceMongoDBAtlasCloudBackupScheduleRead(ctx context.Context, d *schema. return diag.Errorf(errorSnapshotBackupScheduleSetting, "restore_window_days", clusterName, err) } - if err := d.Set("update_snapshots", backupPolicy.UpdateSnapshots); err != nil { - return diag.Errorf(errorSnapshotBackupScheduleSetting, "update_snapshots", clusterName, err) - } - if err := d.Set("next_snapshot", backupPolicy.NextSnapshot); err != nil { return diag.Errorf(errorSnapshotBackupScheduleSetting, "next_snapshot", clusterName, err) } From 1b5be58299f7a4e92b89afa3ed01c879f1098735 Mon Sep 17 00:00:00 2001 From: admin <33664051+martinstibbe@users.noreply.github.com> Date: Tue, 17 Jan 2023 19:06:12 -0600 Subject: [PATCH 2/3] Doc update --- website/docs/r/cloud_backup_schedule.html.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/docs/r/cloud_backup_schedule.html.markdown b/website/docs/r/cloud_backup_schedule.html.markdown index b06300db21..a47f4c6662 100644 --- a/website/docs/r/cloud_backup_schedule.html.markdown +++ b/website/docs/r/cloud_backup_schedule.html.markdown @@ -143,7 +143,10 @@ resource "mongodbatlas_cloud_backup_schedule" "test" { * `reference_hour_of_day` - (Optional) UTC Hour of day between 0 and 23, inclusive, representing which hour of the day that Atlas takes snapshots for backup policy items. * `reference_minute_of_hour` - (Optional) UTC Minutes after `reference_hour_of_day` that Atlas takes snapshots for backup policy items. Must be between 0 and 59, inclusive. * `restore_window_days` - (Optional) Number of days back in time you can restore to with point-in-time accuracy. Must be a positive, non-zero integer. -* `update_snapshots` - (Optional) Specify true to apply the retention changes in the updated backup policy to snapshots that Atlas took previously. +* `update_snapshots` - (Optional) Specify true to apply the retention changes in the updated backup policy to snapshots that Atlas took previously. + + **Note** This parameter is not updated on return from API + * `policy_item_hourly` - (Optional) Hourly policy item * `policy_item_daily` - (Optional) Daily policy item * `policy_item_weekly` - (Optional) Weekly policy item From 2592b444dd8c1a42ad0f4f9b83c8735822488dd8 Mon Sep 17 00:00:00 2001 From: Zuhair Ahmed Date: Wed, 18 Jan 2023 22:30:49 -0500 Subject: [PATCH 3/3] Update website/docs/r/cloud_backup_schedule.html.markdown --- website/docs/r/cloud_backup_schedule.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/cloud_backup_schedule.html.markdown b/website/docs/r/cloud_backup_schedule.html.markdown index a47f4c6662..29aecfff17 100644 --- a/website/docs/r/cloud_backup_schedule.html.markdown +++ b/website/docs/r/cloud_backup_schedule.html.markdown @@ -145,7 +145,7 @@ resource "mongodbatlas_cloud_backup_schedule" "test" { * `restore_window_days` - (Optional) Number of days back in time you can restore to with point-in-time accuracy. Must be a positive, non-zero integer. * `update_snapshots` - (Optional) Specify true to apply the retention changes in the updated backup policy to snapshots that Atlas took previously. - **Note** This parameter is not updated on return from API + **Note** This parameter does not return updates on return from API, this is a feature of the MongoDB Atlas Admin API itself and not Terraform. For more details about this resource see: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Cloud-Backup-Schedule * `policy_item_hourly` - (Optional) Hourly policy item * `policy_item_daily` - (Optional) Daily policy item