Hi@akhtar,
You can use aws_elb_attachment resource in Terraform. This is used to attach ELB with an instance. I have attached one example below for your reference.
resource "aws_elb_attachment" "baz" {
elb = aws_elb.bar.id
instance = aws_instance.foo.id
}