This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathvariables.tf
295 lines (255 loc) · 8.46 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
variable "auth_token" {
description = "This is your Equinix Metal API Auth token"
type = string
sensitive = true
}
variable "organization_id" {
description = "Your Equinix Metal Organization Id"
type = string
default = "null"
}
variable "project_name" {
default = "vmware-on-metal-1"
type = string
description = "If 'create_project' is true this will be the project name used."
}
variable "create_project" {
description = "if true create the Equinix Metal project, if not skip and use the provided project"
type = bool
default = true
}
variable "project_id" {
description = "Equinix Metal Project ID to use in case create_project is false"
type = string
default = "null"
}
variable "private_subnets" {
description = <<-EOF
This is the network topology for your vSphere Env
Valid vsphere_service_types are:
faultToleranceLogging
vmotion
vSphereReplication
vSphereReplicationNFC
vSphereProvisioning
vsan
management
The subnet name "Management" is reserved for ESXi hosts.
Whichever subnet is labeled with vsphere_service_type: management will share a vLan with ESXi hosts.
EOF
type = list(object({
name = string,
nat = bool,
vsphere_service_type = optional(string),
routable = bool,
cidr = string,
reserved_ip_count = optional(number, 100)
}))
default = [
{
"name" : "VM Private Net 1",
"nat" : true,
"vsphere_service_type" : "management",
"routable" : true,
"cidr" : "172.16.0.0/24"
},
{
"name" : "vMotion",
"nat" : false,
"vsphere_service_type" : "vmotion",
"routable" : false,
"cidr" : "172.16.1.0/24"
},
{
"name" : "vSAN",
"nat" : false,
"vsphere_service_type" : "vsan",
"routable" : false,
"cidr" : "172.16.2.0/24"
}
]
}
variable "public_subnets" {
description = "This will dynamically create public subnets in vSphere"
type = list(object({
name = string,
nat = bool,
vsphere_service_type = optional(string),
routable = bool,
ip_count = number
}))
default = [
{
"name" : "VM Public Net 1",
"nat" : false,
"routable" : true,
"ip_count" : 8
}
]
}
variable "router_hostname" {
description = "This is the hostname for the router."
type = string
default = "edge-gateway01"
}
variable "esxi_hostname" {
description = "This is the hostname prefix for your esxi hosts. A number will be added to the end."
type = string
default = "esx"
}
variable "router_size" {
description = "This is the size/plan/flavor of your router machine"
type = string
default = "c3.small.x86"
}
variable "esxi_size" {
description = "This is the size/plan/flavor of your ESXi machine(s)"
type = string
default = "c3.medium.x86"
}
variable "metro" {
description = "This is the Metro Location of your deployment. (Facility will be used if empty)"
type = string
default = ""
}
variable "router_os" {
description = "This is the operating System for you router machine (Only Ubuntu 18.04 has been tested)"
type = string
default = "ubuntu_18_04"
}
variable "vmware_os" {
description = "This is the version of vSphere that you want to deploy (ESXi 6.5, 6.7, & 7.0 have been tested)"
type = string
default = "vmware_esxi_7_0"
}
variable "billing_cycle" {
description = "This is billing cycle to use. The hasn't beend built to allow reserved isntances yet."
type = string
default = "hourly"
}
variable "esxi_host_count" {
description = "This is the number of ESXi host you'd like in your cluster."
type = number
default = 3
}
variable "vcenter_portgroup_name" {
description = "This is the VM Portgroup you would like vCenter to be deployed to. See 'private_subnets' & 'public_subnets' above. By deploying on a public subnet, you will not need to use the VPN to access vCenter."
type = string
default = "VM Public Net 1"
}
variable "domain_name" {
description = "This is the domain to use for internal DNS"
type = string
default = "metal.local"
}
variable "vpn_user" {
description = "This is the username for the L2TP VPN"
type = string
default = "vm_admin"
}
variable "vcenter_datacenter_name" {
description = "This will be the name of the vCenter Datacenter object."
type = string
default = "Metal"
}
variable "vcenter_cluster_name" {
description = "This will be the name of the vCenter Cluster object."
type = string
default = "Metal-1"
}
variable "vcenter_domain" {
description = "This will be the vSphere SSO domain."
type = string
default = "vsphere.local"
}
variable "vcenter_user_name" {
description = "This will be the admin user for vSphere SSO"
type = string
default = "Administrator"
}
variable "s3_url" {
description = "This is the URL endpoint to connect your s3 client to"
type = string
default = "https://s3.example.com"
}
variable "s3_access_key" {
description = "This is the access key for your S3 endpoint"
type = string
sensitive = true
default = "S3_ACCESS_KEY"
}
variable "s3_secret_key" {
description = "This is the secret key for your S3 endpoint"
type = string
sensitive = true
default = "S3_SECRET_KEY"
}
variable "s3_version" {
description = "S3 API Version (S3v2, S3v4)"
type = string
default = "S3v4"
}
variable "object_store_tool" {
description = "Which tool should you use to download objects from the object store? ('mc' and 'gcs' have been tested.)"
type = string
default = "mc"
}
variable "object_store_bucket_name" {
description = "This is the name of the bucket on your Object Store"
type = string
default = "vmware"
}
variable "gcs_key_name" {
description = "If you are using GCS to download your vCenter ISO this is the name of the GCS key"
type = string
default = "storage-reader-key.json"
}
variable "path_to_gcs_key" {
description = "If you are using GCS to download your vCenter ISO this is the absolute path to the GCS key (ex: /home/example/storage-reader-key.json)"
type = string
default = ""
}
variable "relative_path_to_gcs_key" {
description = "(Deprecated: use path_to_gcs_key) If you are using GCS to download your vCenter ISO this is the path to the GCS key"
type = string
default = ""
}
variable "vcenter_iso_name" {
description = "The name of the vCenter ISO in your Object Store"
type = string
}
variable "reservations" {
description = <<-EOF
A map of hostnames to reservation ids. Any hostname not defined will use the default behavior of not using a reservation. Mapped values may be UUIDs of reservations, 'next-available', or empty string.
Warning: Mixing "next-available" and known reservations may result in race conditions. The host requests are submitted at the same time and the "next-available" chosen by the Equinix Metal API may be one of the resources defined by UUID in this list.
Examples:
- {"edge-gateway01": "next-available"}
- {"esx01": "f3bf4e58-99e7-47ef-a0eb-8cbf727bc76f", "esx02": "b3f6b4eb-64b9-4cf1-9e39-f11a8ba9da20"}
EOF
type = map(any)
default = {}
}
variable "vcva_deployment_option" {
description = <<-EOF
Size of the vCenter appliance: tiny, tiny-lstorage, ..., small, etc.
Each option has different CPU, memory, and storage requirements.
For the full list of options, see
https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vcenter.install.doc/GUID-457EAE1F-B08A-4E64-8506-8A3FA84A0446.html#GUID-457EAE1F-B08A-4E64-8506-8A3FA84A0446__row_5D65E7455996456CBDCB3EF9A7DCDC62__entry__1
EOF
type = string
default = "small"
}
variable "update_esxi" {
description = "if true update the ESXi version before proceeding to vCenter installation"
type = bool
default = false
}
variable "esxi_update_filename" {
description = <<-EOF
The specific update version that your servers will be updated to.
Note that the Equinix Metal portal and API will still show ESXi 6.5 as the OS but this script adds a tag with the update filename specified below.
You can check all ESXi update versions/filenames here: https://esxi-patches.v-front.de/
EOF
type = string
default = "ESXi-7.0U3d-19482537-standard"
}