This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated AMIs and Auto-formatted YAML files
- Loading branch information
1 parent
06dbee0
commit 10f18ef
Showing
8 changed files
with
1,115 additions
and
1,129 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,66 @@ | ||
Description: > | ||
This template deploys an Application Load Balancer that exposes our various ECS services. | ||
We create them in a seperate nested template, so it can be referenced by all of the other nested templates. | ||
This template deploys an Application Load Balancer that exposes our various ECS services. | ||
We create them in a seperate nested template, so it can be referenced by all of the other nested templates. | ||
Parameters: | ||
EnvironmentName: | ||
Description: An environment name that will be prefixed to resource names | ||
Type: String | ||
|
||
EnvironmentName: | ||
Description: An environment name that will be prefixed to resource names | ||
Type: String | ||
VPC: | ||
Type: AWS::EC2::VPC::Id | ||
Description: Choose which VPC the Application Load Balancer should be deployed to | ||
|
||
VPC: | ||
Type: AWS::EC2::VPC::Id | ||
Description: Choose which VPC the Application Load Balancer should be deployed to | ||
Subnets: | ||
Description: Choose which subnets the Application Load Balancer should be deployed to | ||
Type: List<AWS::EC2::Subnet::Id> | ||
|
||
Subnets: | ||
Description: Choose which subnets the Application Load Balancer should be deployed to | ||
Type: List<AWS::EC2::Subnet::Id> | ||
|
||
SecurityGroup: | ||
Description: Select the Security Group to apply to the Application Load Balancer | ||
Type: AWS::EC2::SecurityGroup::Id | ||
SecurityGroup: | ||
Description: Select the Security Group to apply to the Application Load Balancer | ||
Type: AWS::EC2::SecurityGroup::Id | ||
|
||
Resources: | ||
LoadBalancer: | ||
Type: AWS::ElasticLoadBalancingV2::LoadBalancer | ||
Properties: | ||
Name: !Ref EnvironmentName | ||
Subnets: !Ref Subnets | ||
SecurityGroups: | ||
- !Ref SecurityGroup | ||
Tags: | ||
- Key: Name | ||
Value: !Ref EnvironmentName | ||
|
||
LoadBalancer: | ||
Type: AWS::ElasticLoadBalancingV2::LoadBalancer | ||
Properties: | ||
Name: !Ref EnvironmentName | ||
Subnets: !Ref Subnets | ||
SecurityGroups: | ||
- !Ref SecurityGroup | ||
Tags: | ||
- Key: Name | ||
Value: !Ref EnvironmentName | ||
|
||
LoadBalancerListener: | ||
Type: AWS::ElasticLoadBalancingV2::Listener | ||
Properties: | ||
LoadBalancerArn: !Ref LoadBalancer | ||
Port: 80 | ||
Protocol: HTTP | ||
DefaultActions: | ||
- Type: forward | ||
TargetGroupArn: !Ref DefaultTargetGroup | ||
|
||
# We define a default target group here, as this is a mandatory Parameters | ||
# when creating an Application Load Balancer Listener. This is not used, instead | ||
# a target group is created per-service in each service template (../services/*) | ||
DefaultTargetGroup: | ||
Type: AWS::ElasticLoadBalancingV2::TargetGroup | ||
Properties: | ||
Name: !Sub ${EnvironmentName}-default | ||
VpcId: !Ref VPC | ||
Port: 80 | ||
Protocol: HTTP | ||
|
||
Outputs: | ||
LoadBalancerListener: | ||
Type: AWS::ElasticLoadBalancingV2::Listener | ||
Properties: | ||
LoadBalancerArn: !Ref LoadBalancer | ||
Port: 80 | ||
Protocol: HTTP | ||
DefaultActions: | ||
- Type: forward | ||
TargetGroupArn: !Ref DefaultTargetGroup | ||
|
||
LoadBalancer: | ||
Description: A reference to the Application Load Balancer | ||
Value: !Ref LoadBalancer | ||
# We define a default target group here, as this is a mandatory Parameters | ||
# when creating an Application Load Balancer Listener. This is not used, instead | ||
# a target group is created per-service in each service template (../services/*) | ||
DefaultTargetGroup: | ||
Type: AWS::ElasticLoadBalancingV2::TargetGroup | ||
Properties: | ||
Name: !Sub ${EnvironmentName}-default | ||
VpcId: !Ref VPC | ||
Port: 80 | ||
Protocol: HTTP | ||
|
||
LoadBalancerUrl: | ||
Description: The URL of the ALB | ||
Value: !GetAtt LoadBalancer.DNSName | ||
Outputs: | ||
LoadBalancer: | ||
Description: A reference to the Application Load Balancer | ||
Value: !Ref LoadBalancer | ||
|
||
Listener: | ||
Description: A reference to a port 80 listener | ||
Value: !Ref LoadBalancerListener | ||
LoadBalancerUrl: | ||
Description: The URL of the ALB | ||
Value: !GetAtt LoadBalancer.DNSName | ||
|
||
|
||
Listener: | ||
Description: A reference to a port 80 listener | ||
Value: !Ref LoadBalancerListener |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,55 @@ | ||
Description: > | ||
This template contains the security groups required by our entire stack. | ||
We create them in a seperate nested template, so they can be referenced | ||
by all of the other nested templates. | ||
This template contains the security groups required by our entire stack. | ||
We create them in a seperate nested template, so they can be referenced | ||
by all of the other nested templates. | ||
Parameters: | ||
|
||
EnvironmentName: | ||
Description: An environment name that will be prefixed to resource names | ||
Type: String | ||
|
||
VPC: | ||
Type: AWS::EC2::VPC::Id | ||
Description: Choose which VPC the security groups should be deployed to | ||
EnvironmentName: | ||
Description: An environment name that will be prefixed to resource names | ||
Type: String | ||
|
||
Resources: | ||
|
||
# This security group defines who/where is allowed to access the ECS hosts directly. | ||
# By default we're just allowing access from the load balancer. If you want to SSH | ||
# into the hosts, or expose non-load balanced services you can open their ports here. | ||
ECSHostSecurityGroup: | ||
Type: AWS::EC2::SecurityGroup | ||
Properties: | ||
VpcId: !Ref VPC | ||
GroupDescription: Access to the ECS hosts and the tasks/containers that run on them | ||
SecurityGroupIngress: | ||
# Only allow inbound access to ECS from the ELB | ||
- SourceSecurityGroupId: !Ref LoadBalancerSecurityGroup | ||
IpProtocol: -1 | ||
Tags: | ||
- Key: Name | ||
Value: !Sub ${EnvironmentName}-ECS-Hosts | ||
VPC: | ||
Type: AWS::EC2::VPC::Id | ||
Description: Choose which VPC the security groups should be deployed to | ||
|
||
# This security group defines who/where is allowed to access the Application Load Balancer. | ||
# By default, we've opened this up to the public internet (0.0.0.0/0) but can you restrict | ||
# it further if you want. | ||
LoadBalancerSecurityGroup: | ||
Type: AWS::EC2::SecurityGroup | ||
Properties: | ||
VpcId: !Ref VPC | ||
GroupDescription: Access to the load balancer that sits in front of ECS | ||
SecurityGroupIngress: | ||
# Allow access from anywhere to our ECS services | ||
- CidrIp: 0.0.0.0/0 | ||
IpProtocol: -1 | ||
Tags: | ||
- Key: Name | ||
Value: !Sub ${EnvironmentName}-LoadBalancers | ||
Resources: | ||
# This security group defines who/where is allowed to access the ECS hosts directly. | ||
# By default we're just allowing access from the load balancer. If you want to SSH | ||
# into the hosts, or expose non-load balanced services you can open their ports here. | ||
ECSHostSecurityGroup: | ||
Type: AWS::EC2::SecurityGroup | ||
Properties: | ||
VpcId: !Ref VPC | ||
GroupDescription: Access to the ECS hosts and the tasks/containers that run on them | ||
SecurityGroupIngress: | ||
# Only allow inbound access to ECS from the ELB | ||
- SourceSecurityGroupId: !Ref LoadBalancerSecurityGroup | ||
IpProtocol: -1 | ||
Tags: | ||
- Key: Name | ||
Value: !Sub ${EnvironmentName}-ECS-Hosts | ||
|
||
# This security group defines who/where is allowed to access the Application Load Balancer. | ||
# By default, we've opened this up to the public internet (0.0.0.0/0) but can you restrict | ||
# it further if you want. | ||
LoadBalancerSecurityGroup: | ||
Type: AWS::EC2::SecurityGroup | ||
Properties: | ||
VpcId: !Ref VPC | ||
GroupDescription: Access to the load balancer that sits in front of ECS | ||
SecurityGroupIngress: | ||
# Allow access from anywhere to our ECS services | ||
- CidrIp: 0.0.0.0/0 | ||
IpProtocol: -1 | ||
Tags: | ||
- Key: Name | ||
Value: !Sub ${EnvironmentName}-LoadBalancers | ||
|
||
Outputs: | ||
ECSHostSecurityGroup: | ||
Description: A reference to the security group for ECS hosts | ||
Value: !Ref ECSHostSecurityGroup | ||
|
||
ECSHostSecurityGroup: | ||
Description: A reference to the security group for ECS hosts | ||
Value: !Ref ECSHostSecurityGroup | ||
|
||
LoadBalancerSecurityGroup: | ||
Description: A reference to the security group for load balancers | ||
Value: !Ref LoadBalancerSecurityGroup | ||
|
||
LoadBalancerSecurityGroup: | ||
Description: A reference to the security group for load balancers | ||
Value: !Ref LoadBalancerSecurityGroup |
Oops, something went wrong.