Created
March 5, 2020 13:55
-
-
Save AndrewBestbier/587f223cb01e5bcd56f8fdd8b66d6e2d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ApplicationLoadBalancer: | |
| Type: AWS::ElasticLoadBalancingV2::LoadBalancer # (1) | |
| Properties: | |
| SecurityGroups: | |
| - !Ref ApplicationLoadBalancerSecurityGroup # (2) | |
| Subnets: # (3) | |
| - !Ref PublicSubnetA | |
| - !Ref PublicSubnetB | |
| ApplicationLoadBalancerSecurityGroup: | |
| Type: AWS::EC2::SecurityGroup # (4) | |
| Properties: | |
| GroupDescription: SSH and HTTP | |
| VpcId: !Ref VPC | |
| SecurityGroupIngress: # (5) | |
| - CidrIp: 0.0.0.0/0 | |
| FromPort: 80 | |
| IpProtocol: tcp | |
| ToPort: 80 | |
| Listener: | |
| Type: AWS::ElasticLoadBalancingV2::Listener # (6) | |
| Properties: | |
| DefaultActions: | |
| - Type: forward | |
| TargetGroupArn: !Ref TargetGroup # (7) | |
| LoadBalancerArn: !Ref ApplicationLoadBalancer | |
| Port: 80 | |
| Protocol: HTTP | |
| TargetGroup: | |
| Type: AWS::ElasticLoadBalancingV2::TargetGroup # (8) | |
| Properties: | |
| Port: 80 | |
| Protocol: HTTP | |
| VpcId: !Ref VPC | |
| AutoScalingGroup: | |
| Type: AWS::AutoScaling::AutoScalingGroup | |
| Properties: | |
| LaunchConfigurationName: !Ref AppLaunchConfig | |
| VPCZoneIdentifier: | |
| - !Ref PublicSubnetA | |
| - !Ref PublicSubnetB | |
| DesiredCapacity: 3 | |
| MinSize: 3 | |
| MaxSize: 3 | |
| TargetGroupARNs: | |
| - !Ref TargetGroup # (9) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment