split Cloud NAT flag

This commit is contained in:
Lorenzo Caggioni
2022-02-03 10:39:08 +01:00
parent f23885cacd
commit 2f86fd882c
4 changed files with 7 additions and 5 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"