-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaks_vnet.tf
More file actions
23 lines (19 loc) · 858 Bytes
/
aks_vnet.tf
File metadata and controls
23 lines (19 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#Creating the AKS Vnet
resource "azurerm_virtual_network" "aks_vnet" {
name = var.aks_vnet_name
resource_group_name = azurerm_resource_group.aks_demo_rg.name
location = azurerm_resource_group.aks_demo_rg.location
address_space = ["10.0.0.0/12"]
}
resource "azurerm_subnet" "aks_subnet" {
name = var.aks_vnet_subnet
resource_group_name = azurerm_resource_group.aks_demo_rg.name
virtual_network_name = azurerm_virtual_network.aks_vnet.name
address_prefix = "10.1.0.0/16"
}
#Role Assignment to give AKS the access to VNET - Required for Advanced Networking
# resource "azurerm_role_assignment" "aks-vnet-role" {
# scope = azurerm_virtual_network.aks_vnet.id
# role_definition_name = "Contributor"
# principal_id = data.azuread_service_principal.spn.id
# }