Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save antklim/d605c2dad0bae759789dcdd7a26115d0 to your computer and use it in GitHub Desktop.
Save antklim/d605c2dad0bae759789dcdd7a26115d0 to your computer and use it in GitHub Desktop.
LoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Name: !Sub ${Namespace}-${Environment}-ALB
Subnets:
- !Ref PublicSubnet1
- !Ref PublicSubnet2
SecurityGroups:
- !Ref LoadBalancerSecurityGroup
Tags:
- Key: Name
Value: !Sub ${Namespace}-${Environment}-ALB
LoadBalancerListener:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
LoadBalancerArn: !Ref LoadBalancer
Port: 80
Protocol: HTTP
DefaultActions:
- Type: forward
TargetGroupArn: !Ref DefaultTargetGroup
DefaultTargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
Name: !Sub ${Namespace}-${Environment}-default-TG
VpcId: !Ref VPC
Port: 80
Protocol: HTTP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment