Skip to content

Commit 27bfd89

Browse files
authored
add lifecycle rule to the ALB listener rules
Added a Terraform lifecycle rule to the ALB listener rules to facilitate changes. This should make it possible to make changes that require the target group to be replaced. Without this, the listener rule prevents Terraform from deleting the target group.
1 parent 141ea8f commit 27bfd89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ resource "aws_alb_listener_rule" "tg" {
147147
values = ["${var.subdomain}.${var.domain_name}"]
148148
}
149149
}
150+
151+
lifecycle {
152+
replace_triggered_by = [aws_alb_target_group.tg]
153+
}
150154
}
151155

152156
/*

0 commit comments

Comments
 (0)