ALB service catalog module does not handle Target Group / Rules
Hi Gruntworkers! I looked at the [ALB service module](https://github.com/gruntwork-io/terraform-aws-service-catalog/tree/master/modules/networking/alb) and realized that this module is *only* creating an ALB + Listener and does not provide the capability to create rules/target groups. Looking at the `lb-listener-rules` module in the [terraform-aws-load-balancer repository](https://github.com/gruntwork-io/terraform-aws-load-balancer/tree/master/modules/lb-listener-rules), I noticed that target group creation is not handled either. Is there a particular reason to keep this granularity? What would be your recommendation between: - wrapping ALB service + lb-listener-rules in one single module - keeping the segmentation between Listener and Target Group by using a second "service module" for Rules + TG. Thanks in advance for your help!!
This is intentionally done by design. The listener rules and target groups are typically dependent on the service having already been deployed. For example, you typically need to link a Target Group to the underlying ASG so that the ASG can update it with instances as they are deployed. This leads to a situation where the TG and listener rules share the same lifecycle as the underlying service. Given that, it makes much more sense to create and manage the listener rules and TGs with the underlying service, and our service modules for the various services handles this. Check out the [ecs-service](https://github.com/gruntwork-io/terraform-aws-service-catalog/blob/master/modules/services/ecs-service/main.tf#L282-L301) service module for example, where we make a call to the `lb-listener-rules` module. If this design doesn't suit your need and you would like to manage the ALB + listener + TG separately from the services, then I recommend creating [a wrapper module](https://docs.gruntwork.io/reference/services/intro/create-your-own-service-catalog#extend-gruntwork-services) to extend the existing module, or [your own service catalog](https://docs.gruntwork.io/reference/services/intro/create-your-own-service-catalog#create-totally-new-services) to implement the needed changes.