From 0995f6153d692c43b1150b8089408c1473d310ef Mon Sep 17 00:00:00 2001 From: "Mark F. Garner" <52957846+MarkFGarner@users.noreply.github.com> Date: Mon, 8 Mar 2021 15:59:47 +0000 Subject: [PATCH] add lifecycle rules to autoscaling group (#30) resolves target_group issue when using aws_autoscaling_group with aws_autoscaling_attachment recommend by Hashicorp: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_attachment Co-authored-by: mark.garner1 --- main.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.tf b/main.tf index 14cfe0e..511f2a5 100644 --- a/main.tf +++ b/main.tf @@ -144,6 +144,10 @@ resource "aws_autoscaling_group" "kong" { min_size = var.asg_min_size target_group_arns = var.target_group_arns + lifecycle { + ignore_changes = [load_balancers, target_group_arns] + } + dynamic "tag" { for_each = local.tags content {