terraform-aws-kops-alb icon indicating copy to clipboard operation
terraform-aws-kops-alb copied to clipboard

Failure attaching AutoScaling Group

Open emptyway opened this issue 7 years ago • 1 comments

Unable to run the cluster on multiple zones.

Error: Error applying plan:

1 error(s) occurred:

  • aws_autoscaling_attachment.alb_external: 1 error(s) occurred:

  • aws_autoscaling_attachment.alb_external: Failure attaching AutoScaling Group nodes-us-east-1a.test.k8s.local,nodes-us-east-1b.test.k8s.local,nodes-us-east-1c.test.k8s.local with ALB Target Group: arn:aws:elasticloadbalancing:us-east-1:xxxxxxxx:targetgroup/alb-ext-xxxxxxxx/xxxxxxxx: ValidationError: AutoScalingGroup name not found - null status code: 400, request id: xxxxx-xxxx-xxxx-xxxx-xxxxxx

emptyway avatar Oct 06 '18 02:10 emptyway

btw. my workaround was to create separates resources for each zone.

resource "aws_autoscaling_attachment" "alb_external-a" {
  autoscaling_group_name = "${data.aws_autoscaling_groups.kops_nodes.names[0]}"
  alb_target_group_arn   = "${aws_lb_target_group.alb_external.arn}"
}


resource "aws_autoscaling_attachment" "alb_external-b" {
  autoscaling_group_name = "${data.aws_autoscaling_groups.kops_nodes.names[1]}"
  alb_target_group_arn   = "${aws_lb_target_group.alb_external.arn}"
}


resource "aws_autoscaling_attachment" "alb_external-c" {
  autoscaling_group_name = "${data.aws_autoscaling_groups.kops_nodes.names[2]}"
  alb_target_group_arn   = "${aws_lb_target_group.alb_external.arn}"
}

emptyway avatar Oct 15 '18 13:10 emptyway