3-networks-hub-and-spoke/modules/base_shared_vpc/variables.tf (156 lines of code) (raw):

/** * Copyright 2022 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 "project_id" { type = string description = "Project ID for Private Shared VPC." } variable "dns_hub_project_id" { type = string description = "The DNS hub project ID" } variable "environment_code" { type = string description = "A short form of the folder level resources (environment) within the Google Cloud organization." } variable "nat_enabled" { type = bool description = "Toggle creation of NAT cloud router." default = false } variable "nat_bgp_asn" { type = number description = "BGP ASN for first NAT cloud routes." default = 64514 } variable "nat_num_addresses_region1" { type = number description = "Number of external IPs to reserve for first Cloud NAT." default = 2 } variable "nat_num_addresses_region2" { type = number description = "Number of external IPs to reserve for second Cloud NAT." default = 2 } variable "bgp_asn_subnet" { type = number description = "BGP ASN for Subnets cloud routers." } variable "default_region1" { type = string description = "First subnet region. The shared vpc modules only configures two regions." } variable "default_region2" { type = string description = "Default region 2 for subnets and Cloud Routers" } variable "region1_enabled" { type = bool description = "True if region1 enabled." } variable "region2_enabled" { type = bool description = "True if region2 enabled." } variable "router_ha_enabled" { type = bool description = "Toggle creation of 2'nd cloud router in each region." default = true } variable "subnets" { type = list(object({ subnet_name = string subnet_ip = string subnet_region = string subnet_private_access = optional(string, "false") subnet_private_ipv6_access = optional(string) subnet_flow_logs = optional(string, "false") subnet_flow_logs_interval = optional(string, "INTERVAL_5_SEC") subnet_flow_logs_sampling = optional(string, "0.5") subnet_flow_logs_metadata = optional(string, "INCLUDE_ALL_METADATA") subnet_flow_logs_filter = optional(string, "true") subnet_flow_logs_metadata_fields = optional(list(string), []) description = optional(string) purpose = optional(string) role = optional(string) stack_type = optional(string) ipv6_access_type = optional(string) })) description = "The list of subnets being created" default = [] } variable "vpc_routes" { description = "VPC Route Configuration" type = any } variable "secondary_ranges" { type = map(list(object({ range_name = string, ip_cidr_range = string }))) description = "Secondary ranges that will be used in some of the subnets" default = {} } variable "dns_enable_inbound_forwarding" { type = bool description = "Toggle inbound query forwarding for VPC DNS." default = true } variable "dns_enable_logging" { type = bool description = "Toggle DNS logging for VPC DNS." default = true } variable "firewall_enable_logging" { type = bool description = "Toggle firewall logging for VPC Firewalls." default = true } variable "domain" { type = string description = "The DNS name of peering managed zone, for instance 'example.com.'" } variable "private_service_cidr" { type = string description = "CIDR range for private service networking. Used for Cloud SQL and other managed services." default = null } variable "private_service_connect_ip" { type = string description = "Internal IP to be used as the private service connect endpoint." } variable "windows_activation_enabled" { type = bool description = "Enable Windows license activation for Windows workloads." default = false } variable "enable_all_vpc_internal_traffic" { type = bool description = "Enable firewall policy rule to allow internal traffic (ingress and egress)." default = false } variable "base_net_hub_project_id" { type = string description = "The base net hub project ID" default = "" } variable "mode" { type = string description = "Network deployment mode, should be set to `hub` or `spoke` when `enable_hub_and_spoke` architecture chosen, keep as `null` otherwise." default = null } variable "enable_transitivity_traffic" { type = bool description = "Enable a firewall policy rule to allow traffic between Hub and Spokes (ingress only)." default = true }