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
InstanceSecurityGroup: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
GroupDescription: Allow traffic from the security group assigned to the load balancer | |
VpcId: !Ref Vpc | |
SecurityGroupIngress: | |
- SourceSecurityGroupId: !Ref PublicLoadBalancerSG | |
IpProtocol: -1 |
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
PrivateLoadBalancerSG: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
GroupDescription: Access to the private facing load balancer | |
VpcId: !Ref Vpc | |
SecurityGroupIngress: | |
- SourceSecurityGroupId: !Ref 'PublicEC2InstanceSecurityGroup' # only accept traffic from public accessible instances in the security group | |
IpProtocol: -1 | |
SecurityGroupEgress: | |
- CidrIp: 0.0.0.0/0 |