From ce8dad22ea5ac3a46973a36af0df56fdc73b7ea6 Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Mon, 28 Sep 2026 16:32:45 -0400 Subject: [PATCH] chore(infra): prevent destroy of the office VPC path (PLAT-77) file-share will place its subnet in this VPC. A replace of the VPC, IGW, or office VPN would take that share down with the collector. --- terraform/vpc.tf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/terraform/vpc.tf b/terraform/vpc.tf index 3fbdf18..49a0f2e 100644 --- a/terraform/vpc.tf +++ b/terraform/vpc.tf @@ -10,6 +10,12 @@ resource "aws_vpc" "this" { tags = { Name = "syslog-server-vpc" } + + # file-share (PLAT-77) places its subnet in this VPC. Replacing it takes + # that share down with the collector. + lifecycle { + prevent_destroy = true + } } resource "aws_internet_gateway" "this" { @@ -18,6 +24,10 @@ resource "aws_internet_gateway" "this" { tags = { Name = "syslog-server-igw" } + + lifecycle { + prevent_destroy = true + } } resource "aws_subnet" "public" { @@ -66,6 +76,10 @@ resource "aws_vpn_gateway" "office" { tags = { Name = "syslog-server-office" } + + lifecycle { + prevent_destroy = true + } } resource "aws_customer_gateway" "ronkonkoma" { @@ -87,6 +101,10 @@ resource "aws_vpn_connection" "office" { tags = { Name = "syslog-server-office" } + + lifecycle { + prevent_destroy = true + } } resource "aws_vpn_connection_route" "office_lans" {