hashicorp / terraform-aws-consul

A Terraform Module for how to run Consul on AWS using Terraform and Packer
Apache License 2.0
401 stars 488 forks source link

Need to add target_group_arns to ASG configuration #69

Closed aivanov1 closed 6 years ago

aivanov1 commented 6 years ago

In the case of adding an Application Load Balancer (ALB) to front the Consul cluster, we need to have the ALB's Target Group pointing to the ASG. Since target_group_arns is not part of ASG's configuration, the Terraform module is trying to remove any attached Target Group, which is not what we want, e.g.

Terraform will perform the following actions:

  ~ module.prod_consul_1.module.consul_servers.aws_autoscaling_group.autoscaling_group
      target_group_arns.#:         "1" => "0"
      target_group_arns.842221997: "arn:aws:elasticloadbalancing:us-east-2:423487953385:targetgroup/my-lb-tg/2f4d7259f471d85a" => ""
aivanov1 commented 6 years ago

https://github.com/hashicorp/terraform-aws-consul/pull/71

aivanov1 commented 6 years ago

Turns out this is an issue in v0.2.2 and has been addressed in this change by removing the target_group_arns argument from the ASG. See above closed pull request for details.