forked from techreturners/lm-lab-aks-gitops-devopsupskill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aks-cluster.tf
39 lines (32 loc) · 820 Bytes
/
aks-cluster.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
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "default" {
name = "${var.resourceGroupName}-rg"
location = var.region
tags = {
name = "DevOps Up-skill"
}
}
resource "azurerm_kubernetes_cluster" "default" {
name = "${var.resourceGroupName}-aks"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
dns_prefix = "${var.resourceGroupName}-k8s"
default_node_pool {
name = "default"
node_count = 2
vm_size = "Standard_D2_v2"
os_disk_size_gb = 30
}
# azure will assign the id automatically
identity {
type = "SystemAssigned"
}
role_based_access_control {
enabled = true
}
tags = {
name = "DevOps Up-skill"
}
}