# # This template demonstrates how to configure Amazon Route53 Application Recovery Controller Readiness Checks # For a full description of how it works, please read # https://aws.amazon.com/fr/blogs/aws/amazon-route-53-application-recovery-controller/ # AWSTemplateFormatVersion: '2010-09-09' Description: 'This template creates an Amazon Route53 Application Recovery Controller Readiness Check for the Tic Tac Toe demo app' Parameters: Region1: Default: us-east-1 Description: The region for the first cell Type: String Region2: Default: us-west-2 Description: The region for the second cell Type: String LoadBalancer1: Description: The ARN of the Application Load Balancer in cell 1 Type: String LoadBalancer2: Description: The ARN of the Application Load Balancer in cell 2 Type: String AutoScalingGroup1: Description: The ARN of the Auto Scaling Group in cell 1 Type: String AutoScalingGroup2: Description: The ARN of the Auto Scaling Group in cell 2 Type: String DynamoDBTable: Description: The ARN of the DynamoDB Global Table Type: String ProjectId: AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*' ConstraintDescription: Must begin with a letter and contain only alphanumeric characters. Default: TicTacToe Description: The name of the project MaxLength: '64' MinLength: '1' Type: String Resources: # # The Application Recovery Controller cells # Cell1: Type: AWS::Route53RecoveryReadiness::Cell Properties: CellName: !Sub ${ProjectId}-Cell1-${Region1} Cell2: Type: AWS::Route53RecoveryReadiness::Cell Properties: CellName: !Sub ${ProjectId}-Cell2-${Region2} # # The Application Recovery Controller recovery groups # RecoveryGroup: Type: AWS::Route53RecoveryReadiness::RecoveryGroup Properties: RecoveryGroupName: !Sub ${ProjectId}-RecoveryGroup Cells: - !GetAtt Cell1.CellArn - !GetAtt Cell2.CellArn # # The Application Recovery Controller resource set # # the application load balancers ResourceSetALB: Type: AWS::Route53RecoveryReadiness::ResourceSet Properties: ResourceSetName: !Sub ${ProjectId}-ResourceSet-ALB Resources: - ResourceArn: !Ref LoadBalancer1 ReadinessScopes: - !GetAtt Cell1.CellArn - ResourceArn: !Ref LoadBalancer2 ReadinessScopes: - !GetAtt Cell2.CellArn ResourceSetType: AWS::ElasticLoadBalancingV2::LoadBalancer # the auto scaling groups ResourceSetASG: Type: AWS::Route53RecoveryReadiness::ResourceSet Properties: ResourceSetName: !Sub ${ProjectId}-ResourceSet-ASG Resources: - ResourceArn: !Ref AutoScalingGroup1 ReadinessScopes: - !GetAtt Cell1.CellArn - ResourceArn: !Ref AutoScalingGroup2 ReadinessScopes: - !GetAtt Cell2.CellArn ResourceSetType: AWS::AutoScaling::AutoScalingGroup # the DynamoDB table ResourceSetDynamoDB: Type: AWS::Route53RecoveryReadiness::ResourceSet Properties: ResourceSetName: !Sub ${ProjectId}-ResourceSet-DDB Resources: - ResourceArn: !Ref DynamoDBTable ReadinessScopes: - !GetAtt Cell1.CellArn ResourceSetType: AWS::DynamoDB::Table # # The Application Recovery Controller readiness checks # # the application load balancers ReadinessCheckALB: Type: AWS::Route53RecoveryReadiness::ReadinessCheck Properties: ReadinessCheckName: !Sub ${ProjectId}-ReadinessCheck-ALB ResourceSetName: !Ref ResourceSetALB # the auto scaling groups ReadinessCheckASG: Type: AWS::Route53RecoveryReadiness::ReadinessCheck Properties: ReadinessCheckName: !Sub ${ProjectId}-ReadinessCheck-ASG ResourceSetName: !Ref ResourceSetASG # the DynamoDB table ReadinessCheckDynamoDB: Type: AWS::Route53RecoveryReadiness::ReadinessCheck Properties: ReadinessCheckName: !Sub ${ProjectId}-ReadinessCheck-DynamoDB ResourceSetName: !Ref ResourceSetDynamoDB