-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
45 lines (36 loc) · 1017 Bytes
/
main.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
resource "random_string" "name_postfix" {
length = 4
numeric = true
special = false
}
resource "azurerm_kubernetes_cluster" "aks_rs" {
name = "${var.name_prefix}-${random_string.name_postfix.result}"
location = var.location
resource_group_name = var.aks_rg.name
dns_prefix = var.aks_dns_prefix
kubernetes_version = var.kubernetes_version
role_based_access_control_enabled = true
default_node_pool {
name = var.worker_node_pool_name
node_count = var.worker_node_count
vm_size = var.worker_node_vm_size
enable_node_public_ip = false
vnet_subnet_id = var.aks_subnet.id
tags = {
createdBy = var.owner
environment = "test"
}
}
identity {
type = var.identity
}
network_profile {
network_plugin = var.aks_network_plugin
load_balancer_sku = "standard"
outbound_type = "userDefinedRouting"
}
tags = {
createdBy = var.owner
environment = "test"
}
}