forked from Azure/terraform-azurerm-aks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
332 lines (278 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
328
329
330
331
332
variable "resource_group_name" {
description = "The resource group name to be imported"
type = string
}
variable "cluster_name" {
description = "(Optional) The name for the AKS resources created in the specified Azure Resource Group. This variable overwrites the 'prefix' var (The 'prefix' var will still be applied to the dns_prefix if it is set)"
type = string
default = null
}
variable "cluster_log_analytics_workspace_name" {
description = "(Optional) The name of the Analytics workspace"
type = string
default = null
}
variable "prefix" {
description = "(Required) The prefix for the resources created in the specified Azure Resource Group"
type = string
}
variable "client_id" {
description = "(Optional) The Client ID (appId) for the Service Principal used for the AKS deployment"
type = string
default = ""
}
variable "client_secret" {
description = "(Optional) The Client Secret (password) for the Service Principal used for the AKS deployment"
type = string
default = ""
}
variable "admin_username" {
default = "azureuser"
description = "The username of the local administrator to be created on the Kubernetes cluster"
type = string
}
variable "agents_size" {
default = "Standard_D2s_v3"
description = "The default virtual machine size for the Kubernetes agents"
type = string
}
variable "log_analytics_workspace_sku" {
description = "The SKU (pricing level) of the Log Analytics workspace. For new subscriptions the SKU should be set to PerGB2018"
type = string
default = "PerGB2018"
}
variable "log_retention_in_days" {
description = "The retention period for the logs in days"
type = number
default = 30
}
variable "agents_count" {
description = "The number of Agents that should exist in the Agent Pool. Please set `agents_count` `null` while `enable_auto_scaling` is `true` to avoid possible `agents_count` changes."
type = number
default = 2
}
variable "public_ssh_key" {
description = "A custom ssh key to control access to the AKS cluster"
type = string
default = ""
}
variable "tags" {
type = map(string)
description = "Any tags that should be present on the Virtual Network resources"
default = {}
}
variable "enable_log_analytics_workspace" {
type = bool
description = "Enable the creation of azurerm_log_analytics_workspace and azurerm_log_analytics_solution or not"
default = true
}
variable "vnet_subnet_id" {
description = "(Optional) The ID of a Subnet where the Kubernetes Node Pool should exist. Changing this forces a new resource to be created."
type = string
default = null
}
variable "os_disk_size_gb" {
description = "Disk size of nodes in GBs."
type = number
default = 50
}
variable "os_disk_type" {
description = "The type of disk which should be used for the Operating System. Possible values are `Ephemeral` and `Managed`. Defaults to `Managed`. Changing this forces a new resource to be created."
type = string
default = "Managed"
}
variable "private_cluster_enabled" {
description = "If true cluster API server will be exposed only on internal IP address and available only in cluster vnet."
type = bool
default = false
}
variable "enable_kube_dashboard" {
description = "Enable Kubernetes Dashboard."
type = bool
default = false
}
variable "enable_http_application_routing" {
description = "Enable HTTP Application Routing Addon (forces recreation)."
type = bool
default = false
}
variable "enable_azure_policy" {
description = "Enable Azure Policy Addon."
type = bool
default = false
}
variable "sku_tier" {
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free and Paid"
type = string
default = "Free"
}
variable "enable_role_based_access_control" {
description = "Enable Role Based Access Control."
type = bool
default = false
}
variable "rbac_aad_managed" {
description = "Is the Azure Active Directory integration Managed, meaning that Azure will create/manage the Service Principal used for integration."
type = bool
default = false
}
variable "rbac_aad_admin_group_object_ids" {
description = "Object ID of groups with admin access."
type = list(string)
default = null
}
variable "rbac_aad_client_app_id" {
description = "The Client ID of an Azure Active Directory Application."
type = string
default = null
}
variable "rbac_aad_server_app_id" {
description = "The Server ID of an Azure Active Directory Application."
type = string
default = null
}
variable "rbac_aad_server_app_secret" {
description = "The Server Secret of an Azure Active Directory Application."
type = string
default = null
}
variable "network_plugin" {
description = "Network plugin to use for networking."
type = string
default = "kubenet"
}
variable "network_policy" {
description = " (Optional) Sets up network policy to be used with Azure CNI. Network policy allows us to control the traffic flow between pods. Currently supported values are calico and azure. Changing this forces a new resource to be created."
type = string
default = null
}
variable "net_profile_dns_service_ip" {
description = "(Optional) IP address within the Kubernetes service address range that will be used by cluster service discovery (kube-dns). Changing this forces a new resource to be created."
type = string
default = null
}
variable "net_profile_docker_bridge_cidr" {
description = "(Optional) IP address (in CIDR notation) used as the Docker bridge IP address on nodes. Changing this forces a new resource to be created."
type = string
default = null
}
variable "net_profile_outbound_type" {
description = "(Optional) The outbound (egress) routing method which should be used for this Kubernetes Cluster. Possible values are loadBalancer and userDefinedRouting. Defaults to loadBalancer."
type = string
default = "loadBalancer"
}
variable "net_profile_pod_cidr" {
description = " (Optional) The CIDR to use for pod IP addresses. This field can only be set when network_plugin is set to kubenet. Changing this forces a new resource to be created."
type = string
default = null
}
variable "net_profile_service_cidr" {
description = "(Optional) The Network Range used by the Kubernetes service. Changing this forces a new resource to be created."
type = string
default = null
}
variable "kubernetes_version" {
description = "Specify which Kubernetes release to use. The default used is the latest Kubernetes version available in the region"
type = string
default = null
}
variable "orchestrator_version" {
description = "Specify which Kubernetes release to use for the orchestration layer. The default used is the latest Kubernetes version available in the region"
type = string
default = null
}
variable "enable_auto_scaling" {
description = "Enable node pool autoscaling"
type = bool
default = false
}
variable "agents_max_count" {
type = number
description = "Maximum number of nodes in a pool"
default = null
}
variable "agents_min_count" {
type = number
description = "Minimum number of nodes in a pool"
default = null
}
variable "agents_pool_name" {
description = "The default Azure AKS agentpool (nodepool) name."
type = string
default = "nodepool"
}
variable "enable_node_public_ip" {
description = "(Optional) Should nodes in this Node Pool have a Public IP Address? Defaults to false."
type = bool
default = false
}
variable "agents_availability_zones" {
description = "(Optional) A list of Availability Zones across which the Node Pool should be spread. Changing this forces a new resource to be created."
type = list(string)
default = null
}
variable "agents_labels" {
description = "(Optional) A map of Kubernetes labels which should be applied to nodes in the Default Node Pool. Changing this forces a new resource to be created."
type = map(string)
default = {}
}
variable "agents_type" {
description = "(Optional) The type of Node Pool which should be created. Possible values are AvailabilitySet and VirtualMachineScaleSets. Defaults to VirtualMachineScaleSets."
type = string
default = "VirtualMachineScaleSets"
}
variable "agents_tags" {
description = "(Optional) A mapping of tags to assign to the Node Pool."
type = map(string)
default = {}
}
variable "agents_max_pods" {
description = "(Optional) The maximum number of pods that can run on each agent. Changing this forces a new resource to be created."
type = number
default = null
}
variable "enable_ingress_application_gateway" {
description = "Whether to deploy the Application Gateway ingress controller to this Kubernetes Cluster?"
type = bool
default = null
}
variable "ingress_application_gateway_id" {
description = "The ID of the Application Gateway to integrate with the ingress controller of this Kubernetes Cluster."
type = string
default = null
}
variable "ingress_application_gateway_name" {
description = "The name of the Application Gateway to be used or created in the Nodepool Resource Group, which in turn will be integrated with the ingress controller of this Kubernetes Cluster."
type = string
default = null
}
variable "ingress_application_gateway_subnet_cidr" {
description = "The subnet CIDR to be used to create an Application Gateway, which in turn will be integrated with the ingress controller of this Kubernetes Cluster."
type = string
default = null
}
variable "ingress_application_gateway_subnet_id" {
description = "The ID of the subnet on which to create an Application Gateway, which in turn will be integrated with the ingress controller of this Kubernetes Cluster."
type = string
default = null
}
variable "identity_type" {
description = "(Optional) The type of identity used for the managed cluster. Conflict with `client_id` and `client_secret`. Possible values are `SystemAssigned` and `UserAssigned`. If `UserAssigned` is set, a `user_assigned_identity_id` must be set as well."
type = string
default = "SystemAssigned"
}
variable "user_assigned_identity_id" {
description = "(Optional) The ID of a user assigned identity."
type = string
default = null
}
variable "enable_host_encryption" {
description = "Enable Host Encryption for default node pool. Encryption at host feature must be enabled on the subscription: https://docs.microsoft.com/azure/virtual-machines/linux/disks-enable-host-based-encryption-cli"
type = bool
default = false
}
variable "node_resource_group" {
description = "The auto-generated Resource Group which contains the resources for this Managed Kubernetes Cluster."
type = string
default = null
}