From ef8235c27775e5a529b830c810ba4f90b291ea54 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Thu, 30 Nov 2023 08:29:59 -0500 Subject: [PATCH] fix: Ignore changes to `load_balancers` and `target_group_arns` (#252) --- .pre-commit-config.yaml | 2 +- main.tf | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 145baf9..1995474 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.83.5 + rev: v1.83.6 hooks: - id: terraform_fmt - id: terraform_validate diff --git a/main.tf b/main.tf index 362ca1e..6041bed 100644 --- a/main.tf +++ b/main.tf @@ -610,6 +610,10 @@ resource "aws_autoscaling_group" "this" { lifecycle { create_before_destroy = true + ignore_changes = [ + load_balancers, + target_group_arns, + ] } } @@ -885,7 +889,11 @@ resource "aws_autoscaling_group" "idc" { lifecycle { create_before_destroy = true - ignore_changes = [desired_capacity] + ignore_changes = [ + desired_capacity, + load_balancers, + target_group_arns, + ] } }