Files
hunfabric/modules/net-vpc-factory/variables.tf
Ludovico Magnocavallo 85b0871085 Add net-vpc-factory and starter-gcd dataset to 0-org-setup, fix context in net-vpc-factory (#3860)
* feat(fast/0-org-setup): integrate net-vpc-factory into stage 0

* initial starter dataset

* starter pack

* fix(fast/0-org-setup): correct factory vpcs paths definition and update test inventory

* feat(fast/0-org-setup): add VPC and subnet outputs and update stage tfvars

* test(fast/0-org-setup): update gcd starter defaults and regenerate inventory

* fix(modules/net-vpc-factory): remove internal defaults logic and pass context correctly

* fix typo in dataset fw rule, add missing boilerplate, set sane defaults for net vpc factory

* terraform fmt

* tfdoc, copyright year

* schema docs

* yamllint
2026-04-13 09:42:03 +02:00

109 lines
3.7 KiB
HCL

/**
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
variable "context" {
description = "Context-specific interpolations."
type = object({
cidr_ranges_sets = optional(map(list(string)), {})
iam_principals = optional(map(string), {})
locations = optional(map(string), {})
project_ids = optional(map(string), {})
})
default = {}
nullable = false
}
variable "data_defaults" {
description = "Optional default values used when corresponding vpc data from files are missing."
type = object({
project_id = optional(string)
description = optional(string, "Terraform managed")
auto_create_subnetworks = optional(bool, false)
delete_default_routes_on_create = optional(bool, true)
mtu = optional(number, 1500)
routing_mode = optional(string, "GLOBAL")
firewall_policy_enforcement_order = optional(string, "AFTER_CLASSIC_FIREWALL")
create_googleapis_routes = optional(object({
directpath = optional(bool)
directpath-6 = optional(bool)
private = optional(bool)
private-6 = optional(bool)
restricted = optional(bool)
restricted-6 = optional(bool)
}), {})
dns_policy = optional(object({
inbound = optional(bool)
logging = optional(bool)
outbound = optional(object({
private_ns = optional(list(string))
public_ns = optional(list(string))
}))
}))
ipv6_config = optional(object({
enable_ula_internal = optional(bool)
internal_range = optional(string)
}), {})
})
default = {}
nullable = false
}
variable "data_overrides" {
description = "Optional values that override corresponding data from files. Takes precedence over file data and `data_defaults`."
type = object({
project_id = optional(string)
description = optional(string)
auto_create_subnetworks = optional(bool)
delete_default_routes_on_create = optional(bool)
mtu = optional(number)
routing_mode = optional(string)
firewall_policy_enforcement_order = optional(string)
create_googleapis_routes = optional(object({
directpath = optional(bool)
directpath-6 = optional(bool)
private = optional(bool)
private-6 = optional(bool)
restricted = optional(bool)
restricted-6 = optional(bool)
}))
dns_policy = optional(object({
inbound = optional(bool)
logging = optional(bool)
outbound = optional(object({
private_ns = optional(list(string))
public_ns = optional(list(string))
}))
}))
ipv6_config = optional(object({
enable_ula_internal = optional(bool)
internal_range = optional(string)
}))
})
default = {}
nullable = false
}
variable "factories_config" {
description = "Path to folder with YAML resource description data files."
type = object({
basepath = string
paths = optional(object({
vpcs = optional(string, "vpcs")
}), {})
})
nullable = false
}