Created
October 17, 2019 19:41
-
-
Save s0enke/a23f0bc9534b5c50c29eec423793509e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: "2010-09-09" | |
Resources: | |
BackupRole: | |
Type: "AWS::IAM::Role" | |
Properties: | |
RoleName: SampleBackupRole | |
AssumeRolePolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: "Allow" | |
Principal: | |
Service: | |
- "backup.amazonaws.com" | |
Action: | |
- "sts:AssumeRole" | |
ManagedPolicyArns: | |
- "arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup" | |
BackupVault: | |
Type: "AWS::Backup::BackupVault" | |
Properties: | |
BackupVaultName: "SampleBackupVault" | |
BackupPlan: | |
Type: "AWS::Backup::BackupPlan" | |
Properties: | |
BackupPlan: | |
BackupPlanName: "SampleBackupVault" | |
BackupPlanRule: | |
- RuleName: "RuleForDailyBackups" | |
TargetBackupVault: !Ref BackupVault | |
ScheduleExpression: "cron(0 5 ? * * *)" | |
BackupSelection: | |
Type: "AWS::Backup::BackupSelection" | |
Properties: | |
BackupSelection: | |
SelectionName: SampleBackupSelection | |
IamRoleArn: !GetAtt BackupRole.Arn | |
ListOfTags: | |
- ConditionType: "STRINGEQUALS" | |
ConditionKey: "BackupMe" | |
ConditionValue: "daily" | |
BackupPlanId: !Ref BackupPlan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment