-
Notifications
You must be signed in to change notification settings - Fork 68
/
variables.tf
167 lines (144 loc) · 5.58 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/**
* Copyright 2018-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
*
* 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 = "The project ID to deploy to"
}
variable "region" {
type = string
description = "The region to deploy to"
}
variable "icmp_idle_timeout_sec" {
type = string
description = "Timeout (in seconds) for ICMP connections. Defaults to 30s if not set. Changing this forces a new NAT to be created."
default = "30"
}
variable "min_ports_per_vm" {
type = string
description = "Minimum number of ports allocated to a VM from this NAT config. Defaults to 64 if not set. Changing this forces a new NAT to be created."
default = "64"
}
variable "max_ports_per_vm" {
type = string
description = "Maximum number of ports allocated to a VM from this NAT. This field can only be set when enableDynamicPortAllocation is enabled.This will be ignored if enable_dynamic_port_allocation is set to false."
default = null
}
variable "name" {
type = string
description = "Defaults to 'cloud-nat-RANDOM_SUFFIX'. Changing this forces a new NAT to be created."
default = ""
}
variable "nat_ips" {
type = list(string)
description = "List of self_links of external IPs. Changing this forces a new NAT to be created. Value of `nat_ip_allocate_option` is inferred based on nat_ips. If present set to MANUAL_ONLY, otherwise AUTO_ONLY."
default = []
}
variable "drain_nat_ips" {
type = list(string)
description = "A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT."
default = []
}
variable "network" {
type = string
description = "VPN name, only if router is not passed in and is created by the module."
default = ""
}
variable "create_router" {
type = bool
description = "Create router instead of using an existing one, uses 'router' variable for new resource name."
default = false
}
variable "router" {
type = string
description = "The name of the router in which this NAT will be configured. Changing this forces a new NAT to be created."
}
variable "router_asn" {
type = string
description = "Router ASN, only if router is not passed in and is created by the module."
default = "64514"
}
variable "router_keepalive_interval" {
type = string
description = "Router keepalive_interval, only if router is not passed in and is created by the module."
default = "20"
}
variable "source_subnetwork_ip_ranges_to_nat" {
type = string
description = "Defaults to ALL_SUBNETWORKS_ALL_IP_RANGES. How NAT should be configured per Subnetwork. Valid values include: ALL_SUBNETWORKS_ALL_IP_RANGES, ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, LIST_OF_SUBNETWORKS. Changing this forces a new NAT to be created."
default = "ALL_SUBNETWORKS_ALL_IP_RANGES"
}
variable "tcp_established_idle_timeout_sec" {
type = string
description = "Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set. Changing this forces a new NAT to be created."
default = "1200"
}
variable "tcp_transitory_idle_timeout_sec" {
type = string
description = "Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set. Changing this forces a new NAT to be created."
default = "30"
}
variable "tcp_time_wait_timeout_sec" {
type = string
description = "Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set."
default = "120"
}
variable "udp_idle_timeout_sec" {
type = string
description = "Timeout (in seconds) for UDP connections. Defaults to 30s if not set. Changing this forces a new NAT to be created."
default = "30"
}
variable "subnetworks" {
description = "Specifies one or more subnetwork NAT configurations"
type = list(object({
name = string,
source_ip_ranges_to_nat = list(string)
secondary_ip_range_names = list(string)
}))
default = []
}
variable "log_config_enable" {
type = bool
description = "Indicates whether or not to export logs"
default = false
}
variable "log_config_filter" {
type = string
description = "Specifies the desired filtering of logs on this NAT. Valid values are: \"ERRORS_ONLY\", \"TRANSLATIONS_ONLY\", \"ALL\""
default = "ALL"
}
variable "enable_dynamic_port_allocation" {
type = bool
description = "Enable Dynamic Port Allocation. If minPorts is set, minPortsPerVm must be set to a power of two greater than or equal to 32."
default = false
}
variable "enable_endpoint_independent_mapping" {
type = bool
description = "Specifies if endpoint independent mapping is enabled."
default = false
}
variable "rules" {
description = "Specifies one or more rules associated with this NAT."
type = list(object({
description = string
match = string
rule_number = number
action = object({
source_nat_active_ips = list(string)
source_nat_drain_ips = list(string)
})
}))
default = []
}