From 1c39271ba77f6034ce1cf468f1553ce816ce332d Mon Sep 17 00:00:00 2001 From: Steven Nemetz Date: Thu, 4 Jan 2018 10:06:18 -0800 Subject: [PATCH] Add lifecycle for all target groups --- main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.tf b/main.tf index c782482..f1bdc2c 100644 --- a/main.tf +++ b/main.tf @@ -237,6 +237,9 @@ resource "aws_lb_target_group" "application-http" { enabled = "${var.cookie_duration > 0 ? true : false}" } tags = "${module.label.tags}" + lifecycle { + create_before_destroy = true + } } resource "aws_lb_target_group" "application-https" { @@ -301,6 +304,9 @@ resource "aws_lb_target_group" "network" { matcher = "200-399" } tags = "${module.label.tags}" + lifecycle { + create_before_destroy = true + } } resource "aws_lb_listener" "http" {