diff --git a/modules/storage/aws-backup/main.tf b/modules/storage/aws-backup/main.tf index 0b92017..0a6b982 100644 --- a/modules/storage/aws-backup/main.tf +++ b/modules/storage/aws-backup/main.tf @@ -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 = {