-
Notifications
You must be signed in to change notification settings - Fork 29
/
variables.tf
232 lines (194 loc) · 5.11 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
####################
# Global variables #
####################
variable "cluster_name" {
type = string
default = "rke2"
description = "Name of the cluster"
}
variable "ssh_keypair_name" {
type = string
default = null
description = "SSH keypair name"
}
variable "ssh_key_file" {
type = string
default = "~/.ssh/id_rsa"
description = "Local path to SSH key"
}
variable "system_user" {
type = string
default = "ubuntu"
description = "Default OS image user"
}
variable "use_ssh_agent" {
type = bool
default = "true"
description = "Whether to use ssh agent"
}
variable "write_kubeconfig" {
type = bool
default = "false"
description = "Write kubeconfig file to disk"
}
variable "output_kubernetes_config" {
type = bool
default = "false"
description = "Output Kubernetes config to state (for use with Kubernetes provider)"
}
variable "proxy_url" {
type = string
default = null
description = "URL of proxy server"
}
variable "no_proxy" {
type = list(string)
default = []
description = "Hosts that should not be proxied"
}
######################
# Secgroup variables #
######################
variable "secgroup_rules" {
type = list(any)
default = [{ "source" = "0.0.0.0/0", "protocol" = "tcp", "port" = 22 },
{ "source" = "0.0.0.0/0", "protocol" = "tcp", "port" = 6443 },
{ "source" = "0.0.0.0/0", "protocol" = "tcp", "port" = 80 },
{ "source" = "0.0.0.0/0", "protocol" = "tcp", "port" = 443 }
]
description = "Security group rules"
}
#####################
# Network variables #
#####################
variable "nodes_net_cidr" {
type = string
default = "192.168.42.0/24"
description = "Neutron network CIDR"
}
variable "public_net_name" {
type = string
description = "External network name"
}
variable "dns_servers" {
type = list(string)
default = null
description = "DNS servers"
}
variable "dns_domain" {
type = string
default = null
description = "DNS domain for DNS integration. DNS domain names must have a dot at the end"
}
##################
# Node variables #
##################
variable "image_id" {
type = string
default = ""
description = "ID of image nodes (must fullfill [RKE2 requirements](https://docs.rke2.io/install/requirements/))"
}
variable "image_name" {
type = string
default = ""
description = "ID of image nodes (must fullfill [RKE2 requirements](https://docs.rke2.io/install/requirements/))"
}
variable "instance_tags" {
type = list(string)
default = []
description = "Tags added to the instance"
}
variable "nodes_count" {
type = number
default = 1
description = "Number of server nodes (should be odd number...)"
}
variable "flavor_name" {
type = string
description = "Server flavor name"
}
variable "server_group_affinity" {
type = string
default = "soft-anti-affinity"
description = "Server group affinity"
}
variable "nodes_config_drive" {
type = bool
default = "false"
description = "Whether to use the config_drive feature to configure the instances"
}
variable "user_data_file" {
type = string
default = null
description = "User data file to provide when launching the instance"
}
variable "boot_from_volume" {
type = bool
default = false
description = "Boot nodes from volume"
}
variable "boot_volume_size" {
type = number
default = 20
description = "The size of the boot volume"
}
variable "boot_volume_type" {
type = string
default = ""
description = "The type of the boot volume"
}
variable "availability_zones" {
type = list(string)
default = []
description = "The list of AZs to deploy nodes into"
}
variable "rke2_version" {
type = string
default = ""
description = "RKE2 version"
}
variable "rke2_config" {
type = string
default = ""
description = "RKE2 config contents"
}
variable "containerd_config_file" {
type = string
default = ""
description = "containerd config file for servers"
}
variable "registries_conf" {
type = string
default = ""
description = "Containerd registries config in gz+b64"
}
variable "additional_san" {
type = list(string)
default = []
description = "RKE2 additional SAN"
}
variable "additional_configs_path" {
type = string
default = ""
description = "RKE2 additional config files"
}
variable "additional_configs_gzb64" {
type = map(string)
default = {}
description = "RKE2 additional configs in gz+b64 in the form { \"config_file_name\": \"gzb64_manifests\" }"
}
variable "manifests_path" {
type = string
default = ""
description = "RKE2 addons manifests directory"
}
variable "manifests_gzb64" {
type = map(string)
default = {}
description = "RKE2 addons manifests in gz+b64 in the form { \"addon_name\": \"gzb64_manifests\" }"
}
variable "do_upgrade" {
type = bool
default = false
description = "Trigger upgrade provisioner"
}