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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인