Closed Kikivsantos closed 2 weeks ago
Thanks for opening this issue! Please make sure you've followed our guidelines when opening the issue. In short, to help us reproduce the issue we need:
The ticket CLOUDP-252499 was created for internal tracking.
This issue has gone 7 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 7 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!
Hi @Kikivsantos, Thank you for creating this issue:)
I was not able to reproduce this. I tried with below config:
resource "mongodbatlas_cloud_backup_schedule" "test" {
for_each = local.atlas_clusters
project_id = mongodbatlas_project.atlas-project.id
cluster_name = mongodbatlas_advanced_cluster.automated_backup_test_cluster[each.key].name
reference_hour_of_day = 3
reference_minute_of_hour = 45
restore_window_days = 4
policy_item_hourly {
frequency_interval = 1 #accepted values = 1, 2, 4, 6, 8, 12 -> every n hours
retention_unit = "days"
retention_value = 1
}
policy_item_daily {
frequency_interval = 1 #accepted values = 1 -> every 1 day
retention_unit = "days"
retention_value = 2
}
policy_item_weekly {
frequency_interval = 4 # accepted values = 1 to 7 -> every 1=Monday,2=Tuesday,3=Wednesday,4=Thursday,5=Friday,6=Saturday,7=Sunday day of the week
retention_unit = "weeks"
retention_value = 4
}
policy_item_monthly {
frequency_interval = 5 # accepted values = 1 to 28 -> 1 to 28 every nth day of the month
# accepted values = 40 -> every last day of the month
retention_unit = "months"
retention_value = 12
}
policy_item_yearly {
frequency_interval = 1 # accepted values = 1 to 12 -> 1st day of nth month
retention_unit = "years"
retention_value = 5
}
depends_on = [
mongodbatlas_advanced_cluster.automated_backup_test_cluster
]
}
and I do see the yearly schedule showing up during update plan:
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# mongodbatlas_cloud_backup_schedule.test["cluster_1"] will be updated in-place
~ resource "mongodbatlas_cloud_backup_schedule" "test" {
id = "Y2x1c3Rlcl9uYW1l:bTEwLWF3cy0xZQ==-cHJvamVjdF9pZA==:NjY3MDE0ZjA5MzU3M2YwOGI0NmM5Y2Nm"
# (10 unchanged attributes hidden)
~ policy_item_monthly {
id = "6670175293573f08b46ca183"
~ retention_value = 60 -> 12
# (3 unchanged attributes hidden)
}
~ policy_item_weekly {
id = "6670175293573f08b46ca182"
~ retention_value = 1 -> 4
# (3 unchanged attributes hidden)
}
+ policy_item_yearly {
+ frequency_interval = 1
+ retention_unit = "years"
+ retention_value = 5
}
# (2 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
If you are still running into this issue would request you to please share configuration and log files in line with our one-click reproducible issues principle.
Thank you!
Is there an existing issue for this?
Provider Version
v1.16.2
Terraform Version
latest
Terraform Edition
Terraform Open Source (OSS)
Current Behavior
I'm changing the snapshot retention from weekly = 1 week -> To 4 weeks monthly = 60 months -> To 12 months
The changes on the weekly and monthly snapshots works fine. but the yearly snapshot is not comming in the plan as it should.
Terraform configuration to reproduce the issue
variable.tf:
terragrunt.hcl (calls the terraform module):
terragrunt plan: