Created
February 19, 2019 23:59
-
-
Save eulersson/994d8a3da0602f0ae373e3260f00a535 to your computer and use it in GitHub Desktop.
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
FargateContainerSecurityGroup: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
GroupDescription: Access to Fargate containers. | |
VpcId: !Ref VPC | |
IngressFromPublicALBSecurityGroup: | |
Type: AWS::EC2::SecurityGroupIngress | |
Properties: | |
Description: Ingress from the public Application Load Balancer. | |
GroupId: !Ref FargateContainerSecurityGroup | |
IpProtocol: -1 # Means all protocols (TCD, UDP or any ICMP/ICMPv6 number). | |
SourceSecurityGroupId: !Ref PublicLoadBalancerSecurityGroup | |
IngressFromSelfSecurityGroup: | |
Type: AWS::EC2::SecurityGroupIngress | |
Properties: | |
Description: Ingress from other containers in the same security group. | |
GroupId: !Ref FargateContainerSecurityGroup | |
IpProtocol: -1 | |
SourceSecurityGroupId: !Ref FargateContainerSecurityGroup | |
PublicLoadBalancerSecurityGroup: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
GroupDescription: Access to the public facing load balancer. | |
VpcId: !Ref VPC | |
SecurityGroupIngress: | |
- CidrIp: 0.0.0.0/0 # Allows all IPs. Traffic from anywhere. | |
IpProtocol: -1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment