---
AWSTemplateFormatVersion:           "2010-09-09"

Description:                        >
  This template creates the Backup vault required for the "Centralized cross-account cross-region backup management using AWS Backup" blog in each member account.
Metadata:
  'AWS::CloudFormation::Interface':
    ParameterGroups:
      - Label:
          default:                  AWS Backup Configuration
        Parameters:
          - crossregionbackupvault
    ParameterLabels:
      crossregionbackupvault:
        default:                    Backup vault name (Case sensitive. Must contain from 2 to 50 alphanumeric and '-_' characters.)

Parameters:
  crossregionbackupvault:
    AllowedPattern:                 ^[a-zA-Z0-9\-\_\.]{1,50}$
    ConstraintDescription:          Backup vault name is case sensitive. Must contain from 2 to 50 alphanumeric and '-_' characters.
    Type:                           String


Resources:
  mycrossregionbackupvault:
    Type:                           AWS::Backup::BackupVault
    Properties:
      BackupVaultName:
        Ref:                        crossregionbackupvault


Outputs:
  mycrossregionbackupvault:
    Value:
      Ref:                          crossregionbackupvault
