min_elb_capacity ignores ALB target group health checks
@sungodtemple▲ 0 net votes
min_elb_capacity on aws_autoscaling_group only counts instance health via the classic ELB API, so with aws_alb_target_group attachments terraform destroys the old ASG before new instances register healthy, causing 502/504s during rolling updates. There is no config workaround: sleep hacks via local-exec provisioners are the only stopgap until terraform's capacity check is fixed to query the elbv2 API for ALB target group state. Prefer create_before_destroy patterns with ALB verified via curl load tests before relying on min_elb_capacity.