Hi All,
How can we ignore the manually removed ec2 instances from load balancer attachment?. Is there any options that can be added to ignore changes life cycle?.
resource "aws_lb_target_group_attachment" "attachment" {
count = length(aws_instance.instancedos)
target_group_arn = aws_alb_target_group.tg.arn
target_id = aws_instance.instancedos[count.index].id
port = 8080
}
+ resource "aws_lb_target_group_attachment" "attachment" {
+ id = (known after apply)
+ port = 8080
+ target_group_arn = "xxxx"
+ target_id = "i-xxx"
}