-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
122 lines (113 loc) · 2.75 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
# =======================================
# IPsec Security Gateway (SGW) deployment
# Input variables
# =======================================
# =================
# Global parameters
# =================
variable "cloud_id" {
description = "YC cloud-id. Taken from environment variable."
}
variable "folder_id" {
description = "YC folder-id. Taken from environment variable."
}
variable "ipsec_policy" {
description = "IPsec parameters for both sides"
type = object(
{
policy_name = string
ike_proposal = string
esp_proposal = string
psk = string
})
default = {
policy_name = null
ike_proposal = null
esp_proposal = null
psk = null
}
}
# =================================
# Yandex Cloud side: strongSwan SGW
# =================================
variable "yc_sgw" {
description = "YC IPsec SGW"
type = object(
{
name = string
folder_name = string
image_folder_id = string
image_name = string
zone = string
subnet = string
inside_ip = string
admin_name = string
admin_key_path = string
})
default = {
name = null
folder_name = null
image_folder_id = "standard-images"
image_name = null
zone = null
subnet = null
inside_ip = null
admin_name = null
admin_key_path = null
}
}
variable "yc_subnets" {
description = "YC IP subnet prefixes"
type = object(
{
net_name = string
prefix_list = list(string)
rt_name = string
rt_internet_access = bool
force_subnets_update = bool
})
default = {
net_name = null
prefix_list = null
rt_name = null
rt_internet_access = false
force_subnets_update = false
}
}
# =================================
# Remote side: 3rd party IPsec SGW
# =================================
variable "remote_sgw" {
description = "Remote IPsec Security Gateway (SGW)"
type = object(
{
name = string
type = string
outside_ip = string
})
default = {
name = null
type = "unknown"
outside_ip = null
}
validation {
condition = contains([
"unknown",
"cisco-iosxe",
"cisco-asa",
"mikrotik-chr"
], lower(var.remote_sgw.type)
)
error_message = "Only few SGW types are supported. See variables.tf for details."
}
}
variable "remote_subnets" {
description = "Yandex Cloud Subnet prefixes list"
type = list(string)
default = null
}
variable "labels" {
description = "A set of key/value label pairs to assign."
type = map(string)
default = null
}