-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathvariables.tf
149 lines (131 loc) · 4.13 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
/**
* Copyright 2020 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 "peer_external_gateway" {
description = "Configuration of an external VPN gateway to which this VPN is connected."
type = object({
name = optional(string)
redundancy_type = optional(string)
interfaces = list(object({
id = number
ip_address = string
}))
})
default = null
}
variable "peer_gcp_gateway" {
description = "Self Link URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected."
type = string
default = null
}
variable "name" {
description = "VPN gateway name, and prefix used for dependent resources."
type = string
}
variable "stack_type" {
description = "The IP stack type will apply to all the tunnels associated with this VPN gateway."
type = string
default = "IPV4_ONLY"
}
variable "network" {
description = "VPC used for the gateway and routes."
type = string
}
variable "project_id" {
description = "Project where resources will be created."
type = string
}
variable "region" {
description = "Region used for resources."
type = string
}
variable "route_priority" {
description = "Route priority, defaults to 1000."
type = number
default = 1000
}
variable "router_advertise_config" {
description = "Router custom advertisement configuration, ip_ranges is a map of address ranges and descriptions."
type = object({
groups = list(string)
ip_ranges = map(string)
mode = optional(string)
})
default = null
}
variable "router_asn" {
description = "Router ASN used for auto-created router."
type = number
default = 64514
}
variable "keepalive_interval" {
description = "The interval in seconds between BGP keepalive messages that are sent to the peer."
type = number
default = 20
}
variable "router_name" {
description = "Name of router, leave blank to create one."
type = string
default = ""
}
variable "tunnels" {
description = "VPN tunnel configurations, bgp_peer_options is usually null."
type = map(object({
bgp_peer = object({
address = string
asn = number
})
bgp_session_name = optional(string)
bgp_peer_options = optional(object({
ip_address = optional(string)
advertise_groups = optional(list(string))
advertise_ip_ranges = optional(map(string))
advertise_mode = optional(string)
route_priority = optional(number)
}))
bgp_session_range = optional(string)
ike_version = optional(number)
vpn_gateway_interface = optional(number)
peer_external_gateway_self_link = optional(string, null)
peer_external_gateway_interface = optional(number)
shared_secret = optional(string, "")
}))
default = {}
}
variable "vpn_gateway_self_link" {
description = "self_link of existing VPN gateway to be used for the vpn tunnel. create_vpn_gateway should be set to false"
type = string
default = null
}
variable "create_vpn_gateway" {
description = "create a VPN gateway"
default = true
type = bool
}
variable "labels" {
description = "Labels for vpn components"
type = map(string)
default = {}
}
variable "external_vpn_gateway_description" {
description = "An optional description of external VPN Gateway"
type = string
default = "Terraform managed external VPN gateway"
}
variable "ipsec_secret_length" {
type = number
description = "The lnegth the of shared secret for VPN tunnels"
default = 8
}