Skip to content

Commit

Permalink
Merge pull request #3 from TechHoldingLLC/remove-prevent-destroy-life…
Browse files Browse the repository at this point in the history
…cycle

remove prevent destory lifecycle rule
  • Loading branch information
piyushsonigra authored Mar 1, 2024
2 parents df0f2db + 991f11b commit 158b6ca
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,13 @@ resource "aws_vpc" "vpc" {
tags = {
Name = var.name
}

lifecycle {
prevent_destroy = true
}
}

resource "aws_internet_gateway" "igw" {
vpc_id = aws_vpc.vpc.id
tags = {
Name = var.name
}
lifecycle {
prevent_destroy = true
}
}

resource "aws_subnet" "public_subnet" {
Expand All @@ -45,9 +38,6 @@ resource "aws_subnet" "private_subnet" {
tags = {
Name = "${var.name}-default-private-${element(data.aws_availability_zones.available.names, count.index)}"
}
lifecycle {
prevent_destroy = true
}
}

resource "aws_eip" "ngw_eip" {
Expand All @@ -56,9 +46,6 @@ resource "aws_eip" "ngw_eip" {
tags = {
Name = "${var.name}-ngw-eip-${element(data.aws_availability_zones.available.names, count.index)}"
}
lifecycle {
prevent_destroy = true
}
}

resource "aws_nat_gateway" "ngw" {
Expand All @@ -68,9 +55,6 @@ resource "aws_nat_gateway" "ngw" {
tags = {
Name = "${var.name}-ngw-${element(data.aws_availability_zones.available.names, count.index)}"
}
lifecycle {
prevent_destroy = true
}
depends_on = [
aws_route_table_association.public_route_table_assoc
]
Expand All @@ -87,9 +71,6 @@ resource "aws_route" "igw_route" {
destination_cidr_block = "0.0.0.0/0"
gateway_id = aws_internet_gateway.igw.id
route_table_id = aws_route_table.public_route_table.id
lifecycle {
prevent_destroy = true
}
}

resource "aws_route_table_association" "public_route_table_assoc" {
Expand Down

0 comments on commit 158b6ca

Please sign in to comment.