turnerlabs / terraform-ecs-fargate

A Terraform template used for provisioning web application stacks on AWS ECS Fargate
Apache License 2.0
425 stars 158 forks source link

Add NLB Support Via Additional Files #2

Closed wilsonodk closed 6 years ago

wilsonodk commented 6 years ago

This pull request is one approach to adding support for network load balancers.

First, it modifies all the files to support generic aws_lb versus the more specific aws_alb.

Next, when needed, it creates an separate file for use with a network load balancer. It does this by using the naming convention of ${component}.tcp.tf. The file to choose will be based on whether the protocol is HTTP(S) or TCP.

One major caveat to this approach is that in env/dev/ecs.tf, on line 113, when using TCP as the protocol this value will need to be changed. It should be noted, that when using these templates and only doing HTTPS, the same things is true. Because these templates assume that HTTP and HTTPS will be used together.

Please give your feedback on this approach. With this approach, it would probably be easier to have Harbor Compose automatically support NLB on Harbor Shipment's that use protocol TCP. However, it will likely make just using the templates in stand-alone mode a bit more complex.

jritsema commented 6 years ago

Closing in favor of https://github.com/turnerlabs/terraform-ecs-fargate-nlb