Multiple rules in AWS Backup plan

0

Hello,

I am working on a CloudFormation template for "AWS Backup" service. I need to create a backup plan that consists of two backup rules. Each rule will have different retention and start time. I can't seem to specify multiple rules. If I try something like below it only creates the last rule (backrule-prod-ebs-12m) and I need it to create both rules. I can do it without issues in the Console.

Any thoughts?

Thank you

  backupplanebsprod:
    Type: "AWS::Backup::BackupPlan"
    Properties:
      BackupPlan:
        BackupPlanName: "backplan-ebs-prod"
        BackupPlanRule:
          -
            RuleName: "backrule-prod-ebs-60d"
            TargetBackupVault: !Ref backupvaultebs
            ScheduleExpression: "cron(0 5 ? * * *)"

            RuleName: "backrule-prod-ebs-12m"
            TargetBackupVault: !Ref backupvaultebs
            ScheduleExpression: "cron(0 5 ? * * *)"
dynamox
已提問 5 年前檢視次數 486 次
1 個回答
0

This worked

  backupplanebsprod:
    Type: "AWS::Backup::BackupPlan"
    Properties:
      BackupPlan:
        BackupPlanName: "backplan-ebs-prod"
        BackupPlanRule:

         -  RuleName: "backrule-prod-ebs-60d"
            TargetBackupVault: !Ref backupvaultebs
            ScheduleExpression: "cron(0 5 ? * * *)"
 
         -  RuleName: "backrule-prod-ebs-12m"
            TargetBackupVault: !Ref backupvaultebs
            ScheduleExpression: "cron(0 5 ? * * *)"
 
dynamox
已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南