terraform/modules/vpc/variables.tf (37 lines of code) (raw):

# # Copyright 2023 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 # # https://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 "project_id" { description = "The ID of the project where this VPC will be created" type = string } variable "network_name" { description = "The name of the network being created" type = string validation { condition = length(var.network_name) <= 63 && can(regex("[a-z]([-a-z0-9]*[a-z0-9])?", var.network_name)) error_message = "The network_name should be less than 63 characters." } } variable "routing_mode" { type = string default = "GLOBAL" description = "The network routing mode (default 'GLOBAL')" } variable "description" { type = string description = "An optional description of this resource. The resource must be recreated to modify this field." default = "" } variable "auto_create_subnetworks" { type = bool description = "When set to true, the network is created in 'auto subnet mode' and it will create a subnet for each region automatically across the 10.128.0.0/9 address range. When set to false, the network is created in 'custom subnet mode' so the user can explicitly connect subnetwork resources." default = false } variable "delete_default_internet_gateway_routes" { type = bool description = "If set, ensure that all routes within the network specified whose names begin with 'default-route' and with a next hop of 'default-internet-gateway' are deleted" default = false } variable "mtu" { type = number description = "The network MTU (If set to 0, meaning MTU is unset - defaults to '1460'). Recommended values: 1460 (default for historic reasons), 1500 (Internet default), or 8896 (for Jumbo packets). Allowed are all values in the range 1300 to 8896, inclusively." default = 0 }