Adding more than one instance to a target group attachment

Hi,
I am using “aws_lb_target_group_attachment” in my terraform code. I have several instances that I provision (EC2) in my code. Is there a way I can ad all those instances to the target group attachment? I have seen code, like:

"${aws_instance.test.*.id

Does this add all instances created in the resource? So if i specify 3.

Any luck in resolving this? I’m in a similar situation