From ce9afe339c9ce473e06aff6f0dbce85ad3463bed Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Sat, 2 May 2020 03:12:12 -0400 Subject: [PATCH] Enable dynamic port routing --- infrastructure/cloudformation/dt/load_balancing.yaml | 6 ++---- infrastructure/cloudformation/dt/task.yaml | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/infrastructure/cloudformation/dt/load_balancing.yaml b/infrastructure/cloudformation/dt/load_balancing.yaml index a0f1f2d..3c4a1bf 100644 --- a/infrastructure/cloudformation/dt/load_balancing.yaml +++ b/infrastructure/cloudformation/dt/load_balancing.yaml @@ -37,10 +37,8 @@ Resources: NlbTargetGroup: Type: AWS::ElasticLoadBalancingV2::TargetGroup Properties: - HealthCheckProtocol: TCP - HealthCheckPort: 80 Port: 7777 - Protocol: TCP_UDP + Protocol: UDP TargetGroupAttributes: - Key: deregistration_delay.timeout_seconds Value: '20' @@ -57,7 +55,7 @@ Resources: TargetGroupArn: !Ref NlbTargetGroup LoadBalancerArn: !Ref PublicNLB Port: 7777 - Protocol: TCP_UDP + Protocol: UDP Outputs: diff --git a/infrastructure/cloudformation/dt/task.yaml b/infrastructure/cloudformation/dt/task.yaml index 1c5ac65..498f09b 100644 --- a/infrastructure/cloudformation/dt/task.yaml +++ b/infrastructure/cloudformation/dt/task.yaml @@ -33,10 +33,10 @@ Resources: Image: !Sub "josephbmanley/defend-together:${DockerTag}" MemoryReservation: 250 PortMappings: - - HostPort: 7777 + - HostPort: 0 ContainerPort: 7777 Protocol: udp - - HostPort: 80 + - HostPort: 0 ContainerPort: 80 Protocol: tcp LogConfiguration: