UPD: added cold storage support for monthly backup rule

This commit is contained in:
xpk 2024-04-30 10:54:57 +08:00
parent 3c9b01ead4
commit 05846d9b3d
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86

View File

@ -117,7 +117,8 @@ resource "aws_backup_plan" "ab-plan" {
}
}
# monthly backup (takes precedence than daily)
# monthly backup (when overlap with daily, only monthly backup will be created.
# see https://docs.aws.amazon.com/aws-backup/latest/devguide/creating-a-backup-plan.html)
rule {
rule_name = "Monthly"
target_vault_name = each.value.name
@ -127,6 +128,7 @@ resource "aws_backup_plan" "ab-plan" {
lifecycle {
delete_after = var.monthly-backup-retention
cold_storage_after = var.daily-backup-retention # move to cold storage after daily retention
}
recovery_point_tags = {