-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaks.tf
41 lines (32 loc) · 888 Bytes
/
aks.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
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "default" {
name = var.resourceGroupName
location = var.location
}
resource "azurerm_kubernetes_cluster" "default" {
name = var.clusterName
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
dns_prefix = "tf-k8s"
default_node_pool {
name = var.nodepoolName
node_count = var.nodeCount
vm_size = var.vm_size
os_disk_size_gb = 30
}
identity {
type = "SystemAssigned"
}
}
output "kube_config" {
value = azurerm_kubernetes_cluster.default.kube_config_raw
sensitive = true
}
output "resource_group" {
value = azurerm_kubernetes_cluster.default.resource_group_name
}
output "cluster_name" {
value = azurerm_kubernetes_cluster.default.name
}