forked from hassenius/terraform-icp-vmware
-
Notifications
You must be signed in to change notification settings - Fork 15
/
variables.tf
327 lines (262 loc) · 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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
####################################
#### vSphere Access Credentials ####
####################################
variable "vsphere_server" {
description = "vsphere server to connect to"
default = "___INSERT_YOUR_OWN____"
}
# Set username/password as environment variables VSPHERE_USER and VSPHERE_PASSWORD
variable "allow_unverified_ssl" {
description = "Allows terraform vsphere provider to communicate with vsphere servers with self signed certificates"
default = "true"
}
##############################################
##### vSphere deployment specifications ######
##############################################
variable "vsphere_datacenter" {
description = "Name of the vsphere datacenter to deploy to"
default = "___INSERT_YOUR_OWN____"
}
variable "vsphere_cluster" {
description = "Name of vsphere cluster to deploy to"
default = "___INSERT_YOUR_OWN____"
}
variable "vsphere_resource_pool" {
description = "Path of resource pool to deploy to. i.e. /path/to/pool"
default = "/"
}
variable "network_label" {
description = "Name or label of network to provision VMs on. All VMs will be provisioned on the same network"
default = "___INSERT_YOUR_OWN____"
}
variable "datastore" {
description = "Name of datastore to use for the VMs"
default = ""
}
variable "datastore_etcd" {
description = "Name of datastore to use for the ETCD on the Master nodes"
default = ""
}
## Note
# Because of https://github.com/terraform-providers/terraform-provider-vsphere/issues/271 templates must be converted to VMs on ESX 5.5 (and possibly other)
variable "template" {
description = "Name of template or VM to clone for the VM creations. Tested on Ubuntu 16.04 LTS"
default = "___INSERT_YOUR_OWN____"
}
variable "folder" {
description = "Name of VM Folder to provision the new VMs in. The folder will be created"
default = ""
}
variable "instance_name" {
description = "Name of the ICP installation, will be used as basename for VMs"
default = "icptest"
}
variable "domain" {
description = "Specify domain name to be used for linux customization on the VMs, or leave blank to use <instance_name>.icp"
default = ""
}
variable "staticipblock" {
description = "Specify start unused static ip cidr block to assign IP addresses to the cluster, e.g. 172.16.0.0/16. Set to 0.0.0.0/0 for DHCP."
default = "0.0.0.0/0"
}
variable "staticipblock_offset" {
description = "Specify the starting offset of the staticipblock to begin assigning IP addresses from. e.g. with staticipblock 172.16.0.0/16, offset of 10 will cause IP address assignment to begin at 172.16.0.11."
default = 0
}
variable "gateway" {
description = "Default gateway for the newly provisioned VMs. Leave blank to use DHCP"
default = ""
}
variable "netmask" {
description = "Netmask in CIDR notation when using static IPs. For example 16 or 24. Set to 0 to retrieve from DHCP"
default = 0
}
variable "dns_servers" {
description = "DNS Servers to configure on VMs"
default = ["8.8.8.8", "8.8.4.4"]
}
variable "cluster_vip" {
description = "Virtual IP for Master Console"
default = "127.0.1.1"
}
variable "proxy_vip" {
description = "Virtual IP for Proxy Nodes"
default = "127.0.1.1"
}
variable "cluster_lb_address" {
description = "External LoadBalancer address for Master Console"
default = "none"
}
variable "proxy_lb_address" {
description = "External Load Balancer address for Proxy Node"
default = "none"
}
variable "cluster_vip_iface" {
description = "Network Interface for Virtual IP for Master Console"
default = "eth0"
}
variable "proxy_vip_iface" {
description = "Network Interface for Virtual IP for Proxy Nodes"
default = "eth0"
}
#################################
##### ICP Instance details ######
#################################
variable "master" {
type = "map"
default = {
nodes = "1"
vcpu = "8"
memory = "16384"
disk_size = "" # Specify size or leave empty to use same size as template.
docker_disk_size = "100" # Specify size for docker disk, default 100.
datastore_disk_size = "50" # Specify size datastore directory, default 50.
datastore_etcd_size = "50" # Specify size etcd datastore directory, default 50.
thin_provisioned_etcd = "" # True or false. Whether to use thin provisioning on the disk. Leave blank to use same as template
thin_provisioned = "" # True or false. Whether to use thin provisioning on the disk. Leave blank to use same as template
eagerly_scrub = "" # True or false. If set to true disk space is zeroed out on VM creation. Leave blank to use same as template
keep_disk_on_remove = "false" # Set to 'true' to not delete a disk on removal.
start_iprange = "" # Leave blank for DHCP, else masters will be allocated range starting from this address
}
}
variable "proxy" {
type = "map"
default = {
nodes = "1"
vcpu = "2"
memory = "4096"
disk_size = "" # Specify size or leave empty to use same size as template.
docker_disk_size = "100" # Specify size for docker disk, default 100.
thin_provisioned = "" # True or false. Whether to use thin provisioning on the disk. Leave blank to use same as template
eagerly_scrub = "" # True or false. If set to true disk space is zeroed out on VM creation. Leave blank to use same as template
keep_disk_on_remove = "false" # Set to 'true' to not delete a disk on removal.
start_iprange = "" # Leave blank for DHCP, else proxies will be allocated range starting from this address
}
}
variable "worker" {
type = "map"
default = {
nodes = "1"
vcpu = "4"
memory = "16384"
disk_size = "" # Specify size or leave empty to use same size as template.
docker_disk_size = "100" # Specify size for docker disk, default 100.
thin_provisioned = "" # True or false. Whether to use thin provisioning on the disk. Leave blank to use same as template
eagerly_scrub = "" # True or false. If set to true disk space is zeroed out on VM creation. Leave blank to use same as template
keep_disk_on_remove = "false" # Set to 'true' to not delete a disk on removal.
start_iprange = "" # Leave blank for DHCP, else workers will be allocated range starting from this address
}
}
variable "management" {
type = "map"
default = {
nodes = "1"
vcpu = "8"
memory = "16384"
disk_size = "" # Specify size or leave empty to use same size as template.
docker_disk_size = "100" # Specify size for docker disk, default 100.
log_disk_size = "50" # Specify size for /opt/ibm/cfc for log storage, default 50
thin_provisioned = "" # True or false. Whether to use thin provisioning on the disk. Leave blank to use same as template
eagerly_scrub = "" # True or false. If set to true disk space is zeroed out on VM creation. Leave blank to use same as template
keep_disk_on_remove = "false" # Set to 'true' to not delete a disk on removal.
start_iprange = "" # Leave blank for DHCP, else workers will be allocated range starting from this address
}
}
variable "va" {
type = "map"
default = {
nodes = "3"
vcpu = "8"
memory = "16384"
disk_size = "" # Specify size or leave empty to use same size as template.
docker_disk_size = "100" # Specify size for docker disk, default 100.
es_disk_size = "50" # Specify size for /var/lib/icp for elasticsearch data storage, default 50
thin_provisioned = "" # True or false. Whether to use thin provisioning on the disk. Leave blank to use same as template
eagerly_scrub = "" # True or false. If set to true disk space is zeroed out on VM creation. Leave blank to use same as template
keep_disk_on_remove = "false" # Set to 'true' to not delete a disk on removal.
start_iprange = "" # Leave blank for DHCP, else workers will be allocated range starting from this address
}
}
variable "docker_package_location" {
description = "URI for docker package location, e.g. http://<myhost>/icp-docker-18.03_x86_64.bin or nfs:<myhost>/icp-docker-18.03_x86_64.bin"
default = ""
}
variable "image_location" {
description = "URI for image package location, e.g. http://<myhost>/ibm-cloud-private-x86_64-3.1.0.tar.gz or nfs:<myhost>/ibm-cloud-private-x86_64-3.1.0.tar.gz"
default = ""
}
variable "private_registry" {
description = "Private docker registry where the ICP installation image is located"
default = ""
}
variable "registry_username" {
description = "Username for the private docker restistry the ICP image will be grabbed from"
default = ""
}
variable "registry_password" {
description = "Password for the private docker restistry the ICP image will be grabbed from"
default = ""
}
variable "registry_mount_src" {
description = "Mount point containing the shared registry directory for /var/lib/registry"
default = ""
}
variable "registry_mount_type" {
description = "Mount Type of registry shared storage filesystem"
default = "nfs"
}
variable "registry_mount_options" {
description = "Additional mount options for registry shared directory"
default = "defaults"
}
variable "audit_mount_src" {
description = "Mount point containing the shared registry directory for /var/lib/icp/audit"
default = ""
}
variable "audit_mount_type" {
description = "Mount Type of registry shared storage filesystem"
default = "nfs"
}
variable "audit_mount_options" {
description = "Additional mount options for audit shared directory"
default = "defaults"
}
variable "icppassword" {
description = "Password for the initial admin user in ICP"
default = "admin"
}
variable "ssh_user" {
description = "Username which terraform will use to connect to newly created VMs during provisioning"
default = "root"
}
variable "ssh_password" {
description = "Password which terraform will use to connect to newly created VMs during provisioning"
default = ""
}
variable "ssh_keyfile" {
description = "Location of private ssh key to connect to newly created VMs during provisioning"
default = "/dev/null"
}
variable "icp_inception_image" {
description = "ICP image to use for installation"
default = "ibmcom/icp-inception-amd64:3.1.0-ee"
}
variable "network_cidr" {
description = "Pod network CIDR"
default = "192.168.0.0/16"
}
variable "service_network_cidr" {
description = "Service network CIDR"
default = "10.10.10.0/24"
}
variable "parallel_image_pull" {
description = "Parallel Image Pull"
default = "false"
}
# The following services can be disabled for 3.1
# custom-metrics-adapter, image-security-enforcement, istio, metering, monitoring, service-catalog, storage-minio, storage-glusterfs, and vulnerability-advisor
variable "disabled_management_services" {
description = "List of management services to disable"
type = "list"
default = ["istio", "vulnerability-advisor", "storage-glusterfs", "storage-minio"]
}