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 年前485 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则