Files

34 lines
767 B
Terraform

variable "name" {
description = "The name of the network."
type = string
}
variable "project_id" {
description = "The GCP project ID. If not provided, the default project will be used."
type = string
nullable = true
default = null
}
# A Cloud NAT will be created in the same region as the first subnet.
variable "subnets" {
description = "A list of subnets with names and CIDRs."
type = list(object({
name = string
cidr = string
region = string
}))
validation {
condition = var.subnets[0].region != null
error_message = "The region for the first subnet must be specified."
}
}
variable "nat" {
description = "Enable Cloud NAT for the network."
type = bool
default = false
}