forked from iamnst19/aks_cluster_create
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
26 lines (26 loc) · 727 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
provider "azurerm" {
subscription_id = var.subscription_id
client_id = var.client_id
client_secret = var.client_secret
tenant_id = var.tenant_id
features {}
}
resource "azurerm_resource_group" "k8s" {
name = var.resourcename
location = var.location
}
resource "azurerm_kubernetes_cluster" "k8s" {
name = var.clustername
location = azurerm_resource_group.k8s.location
resource_group_name = azurerm_resource_group.k8s.name
dns_prefix = var.dnspreffix
default_node_pool {
name = "default"
node_count = var.agentnode
vm_size = var.size
}
service_principal {
client_id = var.client_id
client_secret = var.client_secret
}
}