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
ECSLaunchConfiguration: | |
DependsOn: ECSCluster | |
Type: AWS::AutoScaling::LaunchConfiguration | |
Properties: | |
... | |
UserData: | |
"Fn::Base64": !Sub | | |
#!/bin/bash | |
export HTTP_PROXY=${ProxyHost}:${ProxyPort} |
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
Parameters: | |
Environment: | |
Description: An environment name that will be prefixed to resource names | |
Type: String | |
Namespace: | |
Description: An infrastructure namespace that will be prefixed to resource names | |
Type: String | |
Default: simple-api |
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
VPC: | |
Type: AWS::EC2::VPC | |
Properties: | |
CidrBlock: !Ref VpcCIDR | |
Tags: | |
- Key: Name | |
Value: !Sub ${Namespace}-${Environment}-VPC | |
InternetGateway: | |
Type: AWS::EC2::InternetGateway |
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
Mappings: | |
AWSRegionToAMI: | |
ap-southeast-2: | |
AMI: ami-942dd1f6 |
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
PublicSubnet1: | |
Type: AWS::EC2::Subnet | |
Properties: | |
VpcId: !Ref VPC | |
AvailabilityZone: !Select [ 0, !GetAZs ] | |
CidrBlock: !Ref PublicSubnet1CIDR | |
MapPublicIpOnLaunch: true | |
Tags: | |
- Key: Name | |
Value: !Sub ${Namespace}-${Environment}-public-subnet-az1 |
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
NatGateway1EIP: | |
Type: AWS::EC2::EIP | |
DependsOn: InternetGatewayAttachment | |
Properties: | |
Domain: vpc | |
NatGateway2EIP: | |
Type: AWS::EC2::EIP | |
DependsOn: InternetGatewayAttachment | |
Properties: |
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
PublicRouteTable: | |
Type: AWS::EC2::RouteTable | |
Properties: | |
VpcId: !Ref VPC | |
Tags: | |
- Key: Name | |
Value: !Sub ${Namespace}-${Environment}-public-routes | |
PrivateRouteTable1: | |
Type: AWS::EC2::RouteTable |
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
LoadBalancerSecurityGroup: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
GroupDescription: Access to load balancer that sits in front of EC2 hosts | |
VpcId: !Ref VPC | |
SecurityGroupIngress: | |
- CidrIp: 0.0.0.0/0 | |
IpProtocol: -1 | |
Tags: | |
- Key: Name |
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
LoadBalancer: | |
Type: AWS::ElasticLoadBalancingV2::LoadBalancer | |
Properties: | |
Name: !Sub ${Namespace}-${Environment}-ALB | |
Subnets: | |
- !Ref PublicSubnet1 | |
- !Ref PublicSubnet2 | |
SecurityGroups: | |
- !Ref LoadBalancerSecurityGroup | |
Tags: |
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
AutoScalingGroup: | |
Type: AWS::AutoScaling::AutoScalingGroup | |
Properties: | |
VPCZoneIdentifier: | |
- !Ref PrivateSubnet1 | |
- !Ref PrivateSubnet2 | |
LaunchConfigurationName: !Ref LaunchConfiguration | |
MinSize: 4 | |
MaxSize: 4 | |
DesiredCapacity: 4 |
OlderNewer