-
Hello, We are using the module available at terraform-aws-service-catalog.git//modules/services/ecs-service to create our ecs services. However, it creates an alb for each and every service in the same ecs cluster. I had a look at the variables.tf, and at a glance I do not see the option to be able to specify an existing loadbalancer. Could you please let me know if there is any workaround where I can have multiple services using the same load balancer. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @sewmiuraj, each service created by the ecs-service module creates a You'll need to configure the rules in each service so things like the paths are appropriate for each service. Is this helpful with your problem? |
Beta Was this translation helpful? Give feedback.
Hi @sewmiuraj, each service created by the ecs-service module creates a
target_group
for an alb, but not an alb. You can connect those two using a listener such as creating a newaws_lb_listener
, or you can try using the listener map from the output of the of our alb module as the input for the variabledefault_listener_arns
like below:https://github.com/gruntwork-io/terraform-aws-service-catalog/blob/c7b283053fcc46d752ff506f335e67f8311ad211/examples/for-production/infrastructure-live/_envcommon/services/ecs-sample-app-frontend.hcl#L135
https://github.com/gruntwork-io/terraform-aws-service-catalog/blob/c7b283053fcc46d752ff506f335e67f8311ad211/examples/for-production/infrastructure-live/_…