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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ