From 061814a4ba5ee2d6a3903e942fc0ce3de3a48f1b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Feb 2026 05:43:30 +0000 Subject: [PATCH 1/2] Initial plan From db40c8a616c8e7bb1a39f9e9e353b89414d5ba51 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Feb 2026 05:45:01 +0000 Subject: [PATCH 2/2] fix(terraform): guard NAT gateway outputs with try() for when NAT is disabled Co-authored-by: basebandit <8973567+basebandit@users.noreply.github.com> --- infrastructure/staging/outputs.tf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/infrastructure/staging/outputs.tf b/infrastructure/staging/outputs.tf index 8c7b984..3390f5f 100644 --- a/infrastructure/staging/outputs.tf +++ b/infrastructure/staging/outputs.tf @@ -34,7 +34,8 @@ output "vpc_public_subnet_cidr_blocks" { } output "vpc_nat_gateway_static_public_ip" { - value = module.vpc.nat_public_ips[0] + value = try(module.vpc.nat_public_ips[0], null) + description = "Public IP of the NAT Gateway (null if NAT gateway is disabled)" } output "private_subnet_ids" { @@ -53,8 +54,8 @@ output "internet_gateway_id" { } output "nat_gateway_id" { - value = module.vpc.natgw_ids[0] - description = "ID of the NAT Gateway" + value = try(module.vpc.natgw_ids[0], null) + description = "ID of the NAT Gateway (null if NAT gateway is disabled)" } # ===================================================