feat: Add create_before_destroy lifecycle hook to security groups created (#1985)

This commit is contained in:
Bryant Biggs
2022-04-04 10:34:29 -04:00
committed by GitHub
parent 39a7c0c1f0
commit 6db89f8f20
4 changed files with 20 additions and 0 deletions

View File

@@ -129,6 +129,10 @@ resource "aws_security_group" "cluster" {
{ "Name" = local.cluster_sg_name },
var.cluster_security_group_tags
)
lifecycle {
create_before_destroy = true
}
}
resource "aws_security_group_rule" "cluster" {

View File

@@ -372,6 +372,12 @@ resource "aws_security_group" "this" {
{ "Name" = local.security_group_name },
var.security_group_tags
)
# https://github.com/hashicorp/terraform-provider-aws/issues/2445
# https://github.com/hashicorp/terraform-provider-aws/issues/9692
lifecycle {
create_before_destroy = true
}
}
resource "aws_security_group_rule" "this" {

View File

@@ -458,6 +458,12 @@ resource "aws_security_group" "this" {
},
var.security_group_tags
)
# https://github.com/hashicorp/terraform-provider-aws/issues/2445
# https://github.com/hashicorp/terraform-provider-aws/issues/9692
lifecycle {
create_before_destroy = true
}
}
resource "aws_security_group_rule" "this" {

View File

@@ -161,6 +161,10 @@ resource "aws_security_group" "node" {
},
var.node_security_group_tags
)
lifecycle {
create_before_destroy = true
}
}
resource "aws_security_group_rule" "node" {