mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-18 01:27:55 +01:00
feat: Add create_before_destroy lifecycle hook to security groups created (#1985)
This commit is contained in:
4
main.tf
4
main.tf
@@ -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" {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user