diff --git a/examples/data-solutions/dp-foundation/02-load.tf b/examples/data-solutions/dp-foundation/02-load.tf index 1510aa654..497a309aa 100644 --- a/examples/data-solutions/dp-foundation/02-load.tf +++ b/examples/data-solutions/dp-foundation/02-load.tf @@ -105,7 +105,7 @@ module "lod-vpc-firewall" { } module "lod-nat" { - count = var.network_config.network != null ? 0 : 1 + count = var.network_config.enable_cloud_nat ? 0 : 1 source = "../../../modules/net-cloudnat" project_id = module.lod-prj.project_id region = var.location_config.region diff --git a/examples/data-solutions/dp-foundation/03-orchestration.tf b/examples/data-solutions/dp-foundation/03-orchestration.tf index dd4e30e72..53d28cd4b 100644 --- a/examples/data-solutions/dp-foundation/03-orchestration.tf +++ b/examples/data-solutions/dp-foundation/03-orchestration.tf @@ -132,7 +132,7 @@ module "orc-vpc-firewall" { } module "orc-nat" { - count = var.network_config.network != null ? 0 : 1 + count = var.network_config.enable_cloud_nat ? 0 : 1 source = "../../../modules/net-cloudnat" project_id = module.orc-prj.project_id region = var.location_config.region diff --git a/examples/data-solutions/dp-foundation/04-transformation.tf b/examples/data-solutions/dp-foundation/04-transformation.tf index d2d059f87..f1bafefef 100644 --- a/examples/data-solutions/dp-foundation/04-transformation.tf +++ b/examples/data-solutions/dp-foundation/04-transformation.tf @@ -99,7 +99,7 @@ module "trf-vpc-firewall" { } module "trf-nat" { - count = var.network_config.network != null ? 0 : 1 + count = var.network_config.enable_cloud_nat ? 0 : 1 source = "../../../modules/net-cloudnat" project_id = module.trf-prj.project_id region = var.location_config.region diff --git a/examples/data-solutions/dp-foundation/variables.tf b/examples/data-solutions/dp-foundation/variables.tf index eeba9eb73..beaef5a24 100644 --- a/examples/data-solutions/dp-foundation/variables.tf +++ b/examples/data-solutions/dp-foundation/variables.tf @@ -58,7 +58,8 @@ variable "groups" { variable "network_config" { description = "Shared VPC to use. If not null networks will be created in projects." type = object({ - network = string + enable_cloud_nat = bool + network = string vpc_subnet_range = object({ load = string transformation = string @@ -66,7 +67,8 @@ variable "network_config" { }) }) default = { - network = null + enable_cloud_nat = false + network = null vpc_subnet_range = { load = "10.10.0.0/24" transformation = "10.10.0.0/24"