AWS ALB : Add Multiple Target group and attached instances to these target ALB target group

Hi ,

We are trying to add multiple target groups and also trying to attach multiple target within the same alb attach resource. We have use count index for traget group arn. However we would not manage to iterate for the instance list to add the instances into all target group.

Do anyone have any suggestion or code snippet with multiple target group and adding multiple instance using same resource block . Thanks in advance.

Adding multiple target groups and attaching multiple instances to these target groups in an AWS Application Load Balancer (ALB) using Terraform involves a couple of steps. You need to define your target groups, your instances, and then attach these instances to the target groups. [See my DM]