terraform-aws-alb icon indicating copy to clipboard operation
terraform-aws-alb copied to clipboard

Separate module for listener rules

Open prandelicious opened this issue 1 year ago β€’ 0 comments

Is your request related to a new offering from AWS?

No, this is not related to a new offering from AWS

Is your request related to a problem? Please describe.

This is a feature request.

Describe the solution you'd like.

I want to separate the creation of load balancers to a different module and want the creation of listener and listener rules "closer" to the resource or module that will be using it. This is useful in cases where a single ALB is shared in a non-production environment for cost-savings. For example, for traffic going to a development environment, I can re-route traffic to different versions of apps running in ECS via separate target group and listener rules (e.g. https://dev.domain.com/test-version-1 --> target-group-1, https://dev.domain.com/test-version-2 --> target-group-2)

Describe alternatives you've considered.

Create the target group and listener rules directly using their respective Terraform resource and just use the HTTPS listener ARN value from the terraform-aws-alb module for association.

Additional context

prandelicious avatar May 03 '24 10:05 prandelicious