-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvariables.tf
261 lines (211 loc) · 8.91 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
####################################
#### vSphere Access Credentials ####
####################################
variable "vsphere_server" {
description = "vsphere server to connect to"
}
# 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_id" {
description = "ID of the vsphere datacenter to deploy to"
}
variable "vsphere_cluster_id" {
description = "ID of vsphere cluster to deploy to"
}
variable "vsphere_resource_pool_id" {
description = "Path of resource pool to deploy to. i.e. /path/to/pool"
default = "/"
}
variable "private_network_id" {
description = "ID of network to provision VMs on. All node VMs will be provisioned on the same network"
}
variable "public_network_id" {
description = "ID network to provision the bastion VMs on."
}
variable "datastore_id" {
description = "Name of datastore to use for the VMs"
default = ""
}
variable "datastore_cluster_id" {
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 RHEL 7"
}
variable "folder_path" {
description = "folder path to place VMs in"
}
variable "instance_name" {
description = "Name of the ICP installation, will be used as basename for VMs"
}
variable "private_domain" {
description = "Specify domain of private interface"
}
variable "public_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 "private_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 "public_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 "private_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 "private_gateway" {
description = "Default gateway for the newly provisioned VMs. Leave blank to use DHCP"
default = ""
}
variable "public_gateway" {
description = "Default gateway for the newly provisioned VMs. Leave blank to use DHCP"
default = ""
}
variable "private_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 "public_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 "private_dns_servers" {
description = "DNS Servers to configure on VMs that are on private network"
default = ["8.8.8.8", "8.8.4.4"]
}
variable "public_dns_servers" {
description = "DNS Servers to configure on VMs that are on public network"
default = ["8.8.8.8", "8.8.4.4"]
}
variable "public_domain" {
description = "domain of public interface"
default = ""
}
variable "bastion_ip_address" {
description = "specify bastion ip addresses individually if they are not contiguous, will override static ip block selection"
type = "list"
default = []
}
variable "master_ip_address" {
description = "specify master ip addresses individually if they are not contiguous, will override static ip block selection"
type = "list"
default = []
}
variable "infra_ip_address" {
description = "specify infra ip addresses individually if they are not contiguous, will override static ip block selection"
type = "list"
default = []
}
variable "worker_ip_address" {
description = "specify worker ip addresses individually if they are not contiguous, will override static ip block selection"
type = "list"
default = []
}
variable "storage_ip_address" {
description = "specify storage ip addresses individually if they are not contiguous, will override static ip block selection"
type = "list"
default = []
}
#################################
##### ICP Instance details ######
#################################
variable "bastion" {
type = "map"
default = {
nodes = "1"
vcpu = "2"
memory = "4096"
disk_size = "" # Specify size or leave empty to use same size 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.
}
}
variable "master" {
type = "map"
default = {
nodes = "1"
vcpu = "8"
memory = "32768"
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.
}
}
variable "infra" {
type = "map"
default = {
nodes = "1"
vcpu = "8"
memory = "32768"
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.
}
}
variable "worker" {
type = "map"
default = {
nodes = "3"
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.
}
}
variable "storage" {
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.
gluster_num_disks = 1
gluster_disk_size = "250"
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.
}
}
variable "template_ssh_user" {
description = "Username which terraform will use to connect to newly created VMs during provisioning"
default = "root"
}
variable "template_ssh_password" {
description = "Password which terraform will use to connect to newly created VMs during provisioning"
default = ""
}
variable "template_ssh_private_key" {
description = "private ssh key contents to connect to newly created VMs during provisioning"
default = "/dev/null"
}
variable "ssh_user" {
description = "Username which terraform add ssh private/public keys to for passwordless ssh"
default = "root"
}
variable "ssh_private_key" {
description = "contents of SSH private key to add to bastion node"
}
variable "ssh_public_key" {
description = "contents of SSH public key to add to all cluster nodes for passwordless SSH"
}