forked from jenkins-x-terraform/terraform-jx-azure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
406 lines (374 loc) · 13.5 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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
variable "cluster_name" {
description = "Variable to provide your desired name for the cluster. The script will create a random name if this is empty"
type = string
default = ""
}
variable "location" {
type = string
default = "australiaeast"
description = "The Azure region in to which to provision the cluster"
}
// ----------------------------------------------------------------------------
// JX Boot variables
// ----------------------------------------------------------------------------
variable "jx_git_url" {
description = "URL for the Jenkins X cluster git repository"
type = string
}
variable "jx_bot_username" {
description = "Bot username used to interact with the Jenkins X cluster git repository"
type = string
}
variable "jx_bot_token" {
description = "Bot token used to interact with the Jenkins X cluster git repository"
type = string
}
variable "server_side_apply_enabled" {
type = bool
description = "BETA: Flag to indicate to the jx-git-operator that you would like to use server side apply"
default = false
}
variable "install_kuberhealthy" {
description = "Flag to specify if kuberhealthy operator should be installed"
type = bool
default = true
}
// ----------------------------------------------------------------------------
// Machine variables
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// System nodepool variables
// ----------------------------------------------------------------------------
variable "node_size" {
type = string
default = "Standard_B2ms"
description = "The size of the worker node to use for the cluster"
}
variable "node_count" {
description = "The number of worker nodes to use for the cluster"
type = number
default = null
}
variable "min_node_count" {
description = "The minimum number of worker nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
variable "max_node_count" {
description = "The maximum number of worker nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
// ----------------------------------------------------------------------------
// Machine learning nodepool variables
// ----------------------------------------------------------------------------
variable "use_spot_ml" {
type = bool
default = true
description = "Should we use spot instances for the ml nodes"
}
variable "spot_max_price_ml" {
type = number
default = -1
description = "The maximum price you're willing to pay in USD per virtual machine, -1 to go to the maximum price"
}
variable "ml_node_size" {
type = string
default = ""
description = "The size of the worker node to use for the cluster"
}
variable "ml_node_count" {
description = "The number of ML nodes to use for the cluster"
type = number
default = null
}
variable "min_ml_node_count" {
description = "The minimum number of ML nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
variable "max_ml_node_count" {
description = "The maximum number of ML nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
// ----------------------------------------------------------------------------
// Build nodepool variables
// ----------------------------------------------------------------------------
variable "use_spot" {
type = bool
default = true
description = "Should we use spot instances for the build nodes"
}
variable "spot_max_price" {
type = number
default = -1
description = "The maximum price you're willing to pay in USD per virtual machine, -1 to go to the maximum price"
}
variable "build_node_size" {
type = string
default = ""
description = "The size of the build node to use for the cluster"
}
variable "build_node_count" {
description = "The number of build nodes to use for the cluster"
type = number
default = null
}
variable "min_build_node_count" {
description = "The minimum number of builder nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
variable "max_build_node_count" {
description = "The maximum number of builder nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
// ----------------------------------------------------------------------------
// Infra nodepool variables
// ----------------------------------------------------------------------------
variable "use_spot_infra" {
type = bool
default = true
description = "Should we use spot instances for the infra nodes"
}
variable "spot_max_price_infra" {
type = number
default = -1
description = "The maximum price you're willing to pay in USD per virtual machine, -1 to go to the maximum price"
}
variable "infra_node_size" {
type = string
default = ""
description = "The size of the infra node to use for the cluster"
}
variable "infra_node_count" {
description = "The number of infra nodes to use for the cluster"
type = number
default = null
}
variable "min_infra_node_count" {
description = "The minimum number of infra nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
variable "max_infra_node_count" {
description = "The maximum number of infra nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
// ----------------------------------------------------------------------------
// mlbuild nodepool variables
// ----------------------------------------------------------------------------
variable "use_spot_mlbuild" {
type = bool
default = true
description = "Should we use spot instances for the mlbuild nodes"
}
variable "spot_max_price_mlbuild" {
type = number
default = -1
description = "The maximum price you're willing to pay in USD per virtual machine, -1 to go to the maximum price"
}
variable "mlbuild_node_size" {
type = string
default = ""
description = "The size of the mlbuild node to use for the cluster"
}
variable "mlbuild_node_count" {
description = "The number of mlbuild nodes to use for the cluster"
type = number
default = null
}
variable "min_mlbuild_node_count" {
description = "The minimum number of mlbuild nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
variable "max_mlbuild_node_count" {
description = "The maximum number of mlbuild nodes to use for the cluster if autoscaling is enabled"
type = number
default = null
}
// ----------------------------------------------------------------------------
// Cluster variables
// ----------------------------------------------------------------------------
variable "sku_tier" {
description = "The SKU tier of the cluster to use (uptime SLA)."
default = "Free"
type = string
}
variable "dns_prefix" {
type = string
default = ""
description = "DNS prefix for the cluster. The script will create a random name if this is empty"
}
variable "cluster_version" {
type = string
default = "1.20.9"
description = "Kubernetes version to use for the AKS cluster"
}
variable "orchestrator_version" {
description = "Kubernetes orchestrator version"
type = string
}
variable "network_resource_group_name" {
type = string
default = ""
description = "The name of the resource group in to which to provision network resources. The script will create a random name if this is empty"
}
variable "cluster_resource_group_name" {
type = string
default = ""
description = "The name of the resource group in to which to provision AKS managed cluster. The script will create a random name if this is empty"
}
variable "cluster_node_resource_group_name" {
type = string
default = ""
description = "Resource group name in which to provision AKS cluster nodes. The script will create a random name if this is empty"
}
variable "vnet_cidr" {
type = string
default = "10.8.0.0/16"
description = "The CIDR of the provisioned Virtual Network in Azure in to which worker nodes are placed"
}
variable "subnet_cidr" {
type = string
default = "10.8.0.0/24"
description = "The CIDR of the provisioned subnet within the `vnet_cidr` to to which worker nodes are placed"
}
variable "network_name" {
type = string
default = ""
description = "The name of the Virtual Network in Azure to be created. The script will create a random name if this is empty"
}
variable "cluster_network_model" {
type = string
default = "kubenet"
description = "Variable to define the network model for the cluster. Valid values are either `kubenet` or `azure`"
}
variable "subnet_name" {
type = string
default = ""
description = "The name of the subnet in Azure to be created. The script will create a random name if this is empty"
}
variable "enable_log_analytics" {
type = bool
default = false
description = "Flag to indicate whether to enable Log Analytics integration for cluster"
}
variable "logging_retention_days" {
type = number
default = 30
description = "Number of days to retain logs in Log Analytics if enabled"
}
variable "azure_policy_bool" {
type = bool
}
// ----------------------------------------------------------------------------
// DNS variables
// ---------------------------------------------------------------------------
variable "apex_domain_integration_enabled" {
type = bool
default = false
description = "Flag that when set attempts to create delegation records in apex domain to point to domain created by this module"
}
variable "apex_domain" {
type = string
description = "The name of the parent/apex domain in which to create this domain zone, e.g. jenkins-x.io. Required if dns_enabled set to true"
default = ""
}
variable "subdomain" {
type = string
description = "The domain name of the zone to create, e.g. dev-subdomain. Required if dns_enabled set to true"
default = ""
}
variable "apex_resource_group_name" {
type = string
description = "The resource group in which the Azure DNS apex domain resides. Required if apex_domain_integration_enabled is true"
default = ""
}
variable "dns_resource_group_name" {
type = string
description = "Resource group in which to create the Azure DNS zone. The script will create a random name if this is empty"
default = ""
}
// ----------------------------------------------------------------------------
// Secret storage variables
// ---------------------------------------------------------------------------
variable "key_vault_enabled" {
type = string
description = "Flag to indicate whether to provision Azure Key Vault for secret storage"
default = true
}
variable "key_vault_resource_group_name" {
type = string
description = "Resource group to create in which to place key vault"
default = ""
}
variable "key_vault_name" {
type = string
description = "Name of Azure Key Vault to create"
default = ""
}
variable "key_vault_sku" {
type = string
description = "SKU of the Key Vault resource to create. Valid values are standard or premium"
default = "standard"
}
// ----------------------------------------------------------------------------
// Registry variables
// ---------------------------------------------------------------------------
variable "registry_resource_group_name" {
type = string
default = ""
description = "The name of the resource group in to which to provision ACR managed registry. The script will create a random name if this is empty"
}
variable "use_existing_acr_name" {
description = "Name of the existing ACR that you would like to use, e.g. use this in multicluster setup, when you want to use DEV cluster ACR."
type = string
default = null
}
variable "use_existing_acr_resource_group_name" {
description = "Name of the resources group of the existing ACR that you would like to use, e.g. use this in multicluster setup, when you want to use DEV cluster ACR."
type = string
default = null
}
variable "oss_registry_name" {
description = "Name of the Open Source container registry"
type = string
default = ""
}
// ----------------------------------------------------------------------------
// Storage variables
// ---------------------------------------------------------------------------
variable "storage_resource_group_name" {
type = string
description = "Resource group to create in which to place storage accounts"
default = ""
}
// -----------------------------------------------------------------------------
// Container Registry Variables
// -----------------------------------------------------------------------------
variable "external_registry_url" {
default = ""
type = string
}
variable "acr_enabled" {
description = "additional toggle to enable/disable acr creation"
type = string
}
variable "dns_resources_enabled" {
type = bool
description = "THis is an additional variable toggle to enable/disable the creation of DNS resources."
}
variable "default_suk_bool" {
type = bool
}
variable "enable_defender_analytics" {
type = bool
}
variable "enable_auto_upgrades" {
type = bool
}