Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save antklim/58bdf9d889b2f9a0ec109a9fd5f638e6 to your computer and use it in GitHub Desktop.
Save antklim/58bdf9d889b2f9a0ec109a9fd5f638e6 to your computer and use it in GitHub Desktop.
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
Value: !Sub ${Namespace}-${Environment}-LB
EC2HostSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Access to EC2 hosts which run services
VpcId: !Ref VPC
SecurityGroupIngress:
- SourceSecurityGroupId: !Ref LoadBalancerSecurityGroup
IpProtocol: -1
Tags:
- Key: Name
Value: !Sub ${Namespace}-${Environment}-ec2-hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment