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
gefragt vor 5 Jahren486 Aufrufe
1 Antwort
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
beantwortet vor 5 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen