From 9987d6fc18a589c26762eb48b0bb8d442e5ce555 Mon Sep 17 00:00:00 2001 From: Mitch Alessio Date: Tue, 11 Feb 2025 17:43:47 -0500 Subject: [PATCH] Enable Load Balancer deletion protection if the environment is non-ephemeral --- ops/terraform/services/server/main.tf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ops/terraform/services/server/main.tf b/ops/terraform/services/server/main.tf index 62c92ff74b..4c3e705bb9 100644 --- a/ops/terraform/services/server/main.tf +++ b/ops/terraform/services/server/main.tf @@ -180,10 +180,11 @@ module "fhir_asg" { } lb_config = { - name = "bfd-${local.env}-${local.legacy_service}-nlb" - internal = !local.lb_is_public - load_balancer_type = "network" - ip_address_type = "ipv4" + name = "bfd-${local.env}-${local.legacy_service}-nlb" + internal = !local.lb_is_public + load_balancer_type = "network" + ip_address_type = "ipv4" + enable_deletion_protection = !local.is_ephemeral_env load_balancer_security_group_config = { egress = { description = "To VPC instances"