Last active
February 20, 2019 00:02
-
-
Save eulersson/f037414c82e286a3320548fc5e11b9ff 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
TargetGroup: | |
Type: AWS::ElasticLoadBalancingV2::TargetGroup | |
Properties: | |
Name: ecsfs-target-group | |
Port: 80 | |
Protocol: HTTP | |
TargetType: ip | |
VpcId: !Ref VPC | |
ListenerHTTP: | |
Type: AWS::ElasticLoadBalancingV2::Listener | |
Properties: | |
DefaultActions: | |
- TargetGroupArn: !Ref TargetGroup | |
Type: forward | |
LoadBalancerArn: !Ref LoadBalancer | |
Port: 80 | |
Protocol: HTTP | |
LoadBalancer: | |
Type: AWS::ElasticLoadBalancingV2::LoadBalancer | |
Properties: | |
Scheme: internet-facing | |
SecurityGroups: | |
- !Ref PublicLoadBalancerSecurityGroup | |
Subnets: | |
- !Ref PublicSubnetOne | |
- !Ref PublicSubnetTwo | |
DNSRecord: | |
Type: AWS::Route53::RecordSet | |
Condition: HasHostedZoneName | |
Properties: | |
HostedZoneName: !Ref HostedZoneName | |
Name: !Join ['.', [ecsfs, !Ref HostedZoneName]] | |
Type: A | |
AliasTarget: | |
DNSName: !GetAtt LoadBalancer.DNSName | |
HostedZoneId: !GetAtt LoadBalancer.CanonicalHostedZoneID | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment