Skip to content

Commit 80024d0

Browse files
committed
Fixing error on module
1 parent 2af3472 commit 80024d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

main.tf

+8
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ resource "aws_lb_target_group" "lb_http_tgs" {
119119
tags = {
120120
Name = "${var.name_preffix}-lb-http-tg-${count.index}"
121121
}
122+
lifecycle {
123+
create_before_destroy = true
124+
}
125+
depends_on = [ aws_lb.lb ]
122126
}
123127

124128
resource "aws_lb_target_group" "lb_https_tgs" {
@@ -152,6 +156,10 @@ resource "aws_lb_target_group" "lb_https_tgs" {
152156
tags = {
153157
Name = "${var.name_preffix}-lb-https-tg-${count.index}"
154158
}
159+
lifecycle {
160+
create_before_destroy = true
161+
}
162+
depends_on = [ aws_lb.lb ]
155163
}
156164

157165
# ---------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)