# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without limitation the rights to use, copy, modify, # merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AWSTemplateFormatVersion: 2010-09-09 Description: > Additional Region for Distributed Load Test Using AWS Fargate. It deploys a Fargate Cluster, a VPC and a CloudWatch Log group. Parameters: DockerRegistryURL: Type: String Description: > URL of the ECR repository created in the master CloudFormation template. It should be in the form of account_id.dkr.ecr.region.amazonaws.com/registry_name TaskExecutionRoleArn: Type: String Description: > IAM Execution Role ARN for the Fargate tasks, it should have been created by the master CloudFormation template and available in the Outputs section. Resources: Vpc: Type: AWS::CloudFormation::Stack Properties: TemplateURL: "https://s3.amazonaws.com/distributed-load-testing-using-aws-fargate/templates/fargate-vpc.yaml" FargateCluster: Type: AWS::CloudFormation::Stack DependsOn: Vpc Properties: TemplateURL: "https://s3.amazonaws.com/distributed-load-testing-using-aws-fargate/templates/fargate-cluster.yaml" Parameters: VpcId: !GetAtt Vpc.Outputs.VpcId TaskExecutionRoleArn: !Ref TaskExecutionRoleArn DockerImage: !Join - '' - - !Ref DockerRegistryURL - ':latest' Outputs: FargateClusterName: Value: !GetAtt FargateCluster.Outputs.FargateClusterName TaskSecurityGroup: Value: !GetAtt FargateCluster.Outputs.TaskSecurityGroup TaskDefinitionArn: Value: !GetAtt FargateCluster.Outputs.TaskDefinitionArn VpcId: Value: !GetAtt Vpc.Outputs.VpcId SubnetA: Value: !GetAtt Vpc.Outputs.SubnetA SubnetB: Value: !GetAtt Vpc.Outputs.SubnetB SubnetC: Value: !GetAtt Vpc.Outputs.SubnetC