Skip to content

Commit

Permalink
add lifecycle rules to autoscaling group (#30)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
MarkFGarner and mark.garner1 authored Mar 8, 2021
1 parent 8a9f05a commit 0995f61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0995f61

Please sign in to comment.