terraform-aws-modules / terraform-aws-alb

Terraform module to create AWS Application/Network Load Balancer (ALB/NLB) resources πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/alb/aws
Apache License 2.0
433 stars 672 forks source link

One listener, multiple target groups #374

Closed shriyo101 closed 4 days ago

shriyo101 commented 2 months ago

Is your request related to a new offering from AWS?

yes

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

Is your request related to a problem? Please describe.

I was trying to add one listener and wanted to add ips as targets currently I do have that setup done manually, but was not able to achieve it in terraform module v9.9.0

Describe the solution you'd like.

Able to add a listener pointing to multiple targets.

Describe alternatives you've considered.

Additional context

ex: forward = { target_group_key = ["t1", "t2"] }

surry355f1 commented 1 month ago

Having the same issue as well. Any traction on this?

surry355f1 commented 1 month ago

@shriyo101 , I managed to achieve something workable for now. It doesn't solve the issue of 1 listener > multiple target groups. But it does solve 1 listener to multiple IPs. Have a look at additional_target_group_attachments: https://github.com/terraform-aws-modules/terraform-aws-alb/issues/316

Theres an example in the above as well as: https://github.com/terraform-aws-modules/terraform-aws-alb/blob/master/examples/complete-alb/main.tf

hth

shriyo101 commented 1 month ago

HI @surry355f1

I did try https://github.com/terraform-aws-modules/terraform-aws-alb/issues/316 but it dint not work as expected. Hence raised this ticket..

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 4 days ago

This issue was automatically closed because of stale in 10 days