-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvariables.tf
525 lines (436 loc) · 13.1 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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
variable "name" {
default = ""
type = string
description = "The name of the deployment or resource. (e.g., AKS cluster name, resource group name)"
}
variable "host" {
default = ""
type = string
description = "The host or endpoint for the resource."
}
variable "client_certificate" {
default = ""
type = string
description = "The client certificate for authentication."
}
variable "client_key" {
default = ""
type = string
description = "The client key for authentication."
}
variable "cluster_ca_certificate" {
default = ""
type = string
description = "The CA certificate used by the cluster."
}
variable "environment" {
default = ""
type = string
description = "The environment in which the resources are deployed."
}
variable "resource_group_name" {
default = ""
type = string
description = "The name of the Azure resource group."
}
variable "user_assigned_identity_id" {
default = ""
type = string
description = "The ID of the user-assigned identity."
}
variable "resource_group_location" {
default = ""
type = string
description = "The location of the Azure resource group."
}
variable "create_resource_group" {
description = "To create a new resource group. Value in existing_resource_group will be ignored if this is true."
type = bool
default = false
}
variable "existing_resource_group_name" {
description = "Name of existing resource group that has to be used. Leave empty if new resource group has to be created."
type = string
default = ""
}
variable "tags" {
description = "The tags to associate with your network and subnets and aks resources."
type = map(string)
default = {
tag1 = ""
tag2 = ""
}
}
variable "kubernetes_cluster_id" {
default = ""
type = string
description = "The ID of the Kubernetes cluster."
}
## AZURE ACTIVE DIRECTORY CONFIGURATION VARIABLES
variable "client_id" {
default = ""
type = string
description = "The Azure Active Directory (AAD) client ID for authentication."
}
variable "client_secret" {
default = ""
type = string
description = "The Azure Active Directory (AAD) client secret for authentication."
}
variable "cluster_name" {
default = ""
type = string
description = "The name of the cluster for AAD configuration."
}
## AKS VARIABLES
variable "kubernetes_version" {
default = ""
type = string
description = "The version of Kubernetes to use in the AKS cluster."
}
variable "admin_username" {
default = ""
type = string
description = "The username for the AKS cluster's admin user."
}
variable "public_ssh_key" {
default = ""
type = string
description = "The public SSH key for the AKS cluster's admin user."
}
variable "sku_tier" {
default = ""
type = string
description = "The SKU tier for the AKS cluster."
}
variable "private_cluster_enabled" {
default = false
type = bool
description = "Indicates whether the AKS cluster is private or public."
}
variable "enable_http_application_routing" {
default = false
type = bool
description = "Enables or disables HTTP application routing."
}
variable "enable_kube_dashboard" {
default = false
type = bool
description = "Enables or disables the Kubernetes dashboard."
}
variable "balance_similar_node_groups" {
default = true
type = bool
description = "Indicates whether to balance similar node groups."
}
variable "oidc_issuer_enabled" {
default = true
type = bool
description = "Indicates whether to oidc issuer is enabled."
}
variable "max_graceful_termination_sec" {
default = 600
type = number
description = "The maximum time for graceful termination in seconds."
}
variable "scale_down_delay_after_add" {
default = "10m"
type = string
description = "The delay duration after adding a node."
}
variable "scale_down_delay_after_delete" {
default = "10s"
type = string
description = "The delay duration after deleting a node."
}
variable "scale_down_delay_after_failure" {
default = "3m"
type = string
description = "The delay duration after a failure."
}
variable "scan_interval" {
default = "10s"
type = string
description = "The interval duration for scanning."
}
variable "scale_down_unneeded" {
default = "10m"
type = string
description = "The duration before scaling down unneeded nodes."
}
variable "scale_down_unready" {
default = "20m"
type = string
description = "The duration before scaling down unready nodes."
}
variable "scale_down_utilization_threshold" {
default = 0.5
type = number
description = "The utilization threshold for scaling down."
}
variable "agents_pool_name" {
default = [""]
type = list(string)
description = "The names of the agent pools."
}
variable "agents_count" {
default = 2
type = number
description = "The desired number of agents."
}
variable "agents_min_count" {
default = 1
type = number
description = "The minimum number of agents."
}
variable "agents_max_count" {
default = 3
type = number
description = "The maximum number of agents."
}
variable "agents_size" {
default = [""]
type = list(string)
description = "The sizes of the agent pools."
}
variable "node_taints" {
default = [""]
type = list(string)
description = "The taints for the nodes."
}
variable "subnet_id" {
default = [""]
type = list(string)
description = "The IDs of the subnets."
}
variable "os_disk_size_gb" {
default = 20
type = number
description = "The size of the OS disk in gigabytes."
}
variable "auto_scaling_enabled" {
default = false
type = bool
description = "Enables or disables auto-scaling."
}
variable "node_public_ip_enabled" {
default = true
type = bool
description = "Indicates whether nodes have public IP addresses."
}
variable "agents_availability_zones" {
default = null
type = list(string)
description = "The availability zones for the agent pools."
}
variable "agents_type" {
default = ""
type = string
description = "The type of agents."
}
variable "agents_max_pods" {
default = 50
type = number
description = "The maximum number of pods per agent."
}
variable "network_plugin" {
default = ""
type = string
description = "The network plugin to use."
}
variable "net_profile_dns_service_ip" {
default = ""
type = string
description = "The DNS service IP address."
}
variable "net_profile_docker_bridge_cidr" {
default = ""
type = string
description = "The Docker bridge CIDR."
}
variable "net_profile_outbound_type" {
default = ""
type = string
description = "The outbound type for the network profile."
}
variable "net_profile_pod_cidr" {
default = ""
type = string
description = "The pod CIDR."
}
variable "net_profile_service_cidr" {
default = ""
type = string
description = "The service CIDR."
}
variable "node_pool" {
default = {}
type = any
description = "The configuration for the node pool."
}
variable "rbac_enabled" {
default = false
type = bool
description = "Indicates whether RBAC (Role-Based Access Control) is enabled."
}
# Azure log analytics
variable "log_analytics_workspace_sku" {
description = "Name of the log analytics workspace sku tier" # refer https://azure.microsoft.com/pricing/details/monitor/ for log analytics pricing
type = string
default = "PerGB2018"
}
variable "log_analytics_solution_enabled" {
description = "Enable or disable log analytics solution"
type = bool
default = true
}
variable "log_analytics_solution_name" {
description = "Name of the log analytics solution resource"
default = ""
type = string
}
variable "control_plane_logs_scrape_enabled" {
description = "Enable or disable control plane logs scraping"
type = bool
default = true
}
variable "control_plane_monitor_name" {
description = "Name of the azure monitor diagostic setting resource which scraps logs of control plane logs monitoring such as kube-apiserver, cloud-controller-manager, kube-scheduler, kube-controller-manager etc."
default = ""
type = string
}
variable "additional_tags" {
description = "Additional tags for best practices"
default = {}
type = any
}
variable "principal_id" {
description = "AKS identity principal ID"
default = ""
type = string
}
variable "node_labels_app" {
description = "The node labels to be attached to be attached to the aks app node pool"
type = map(string)
default = {}
}
variable "node_labels_infra" {
description = "The node labels to be attached to be attached to the aks infra node pool"
type = map(string)
default = {}
}
variable "auto_scaling_app_enabled" {
description = "Whether to enable auto scaling for the app node pool"
type = bool
default = true
}
variable "agents_count_app" {
description = "The initial number of agents for the app node pool"
type = string
default = "1"
}
variable "agents_min_count_app" {
description = "The minimum number of agents for the app node pool"
type = string
default = "1"
}
variable "agents_max_count_app" {
description = "The maximum number of agents for the app node pool"
type = string
default = "3"
}
variable "agents_availability_zones_app" {
description = "The availability zones for the app node pool"
type = list(string)
default = ["1", "2"]
}
variable "auto_scaling_monitor_enabled" {
description = "Whether to enable auto scaling for the monitor node pool"
type = bool
default = true
}
variable "agents_count_monitor" {
description = "The initial number of agents for the monitor node pool"
type = string
default = "1"
}
variable "agents_min_count_monitor" {
description = "The minimum number of agents for the monitor node pool"
type = string
default = "1"
}
variable "agents_max_count_monitor" {
description = "The maximum number of agents for the monitor node pool"
type = string
default = "3"
}
variable "agents_availability_zones_monitor" {
description = "The availability zones for the monitor node pool"
type = list(string)
default = ["1", "2"]
}
variable "node_labels_monitor" {
description = "The labels for the monitor node pool"
type = map(string)
default = { Monitor-Services = "true" }
}
variable "auto_scaling_database_enabled" {
description = "Whether to enable auto scaling for the database node pool"
type = bool
default = true
}
variable "agents_count_database" {
description = "The initial number of agents for the database node pool"
type = string
default = "1"
}
variable "agents_min_count_database" {
description = "The minimum number of agents for the database node pool"
type = string
default = "1"
}
variable "agents_max_count_database" {
description = "The maximum number of agents for the database node pool"
type = string
default = "3"
}
variable "agents_availability_zones_database" {
description = "The availability zones for the database node pool"
type = list(string)
default = ["1", "2"]
}
variable "node_labels_database" {
description = "The labels for the database node pool"
type = map(string)
default = { Database-Services = "true" }
}
variable "default_agent_pool_name" {
description = "The name of the default agent pool"
type = string
default = "infra"
}
variable "default_agent_pool_count" {
description = "The number of agents in the default agent pool"
type = string
default = "1"
}
variable "default_agent_pool_size" {
description = "The size of the default agent pool"
type = string
default = "Standard_DS2_v2"
}
variable "default_node_labels" {
description = "The labels for the default agent pool"
type = map(string)
default = { Infra-Services = "true" }
}
variable "host_encryption_enabled" {
description = "The enable the encryption of the hosts"
type = bool
default = false
}
variable "open_service_mesh_enabled" {
description = "The enable the open service mesg (istio)"
type = bool
default = true
}