int128 / terraform-aws-kops-alb

Terraform module for ALB, Route53 and nginx-ingress with kops on AWS
https://registry.terraform.io/modules/int128/kops-alb
Apache License 2.0
52 stars 23 forks source link

Failure attaching AutoScaling Group #5

Open emptyway opened 6 years ago

emptyway commented 6 years ago

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 commented 6 years ago

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}"
}