diff --git a/README.md b/README.md index f586bc2d..874d5223 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ module "aks" { client_id = "your-service-principal-client-appid" client_secret = "your-service-principal-client-password" prefix = "prefix" + network_plugin = "azure" vnet_subnet_id = module.network.vnet_subnets[0] os_disk_size_gb = 50 enable_kube_dashboard = true diff --git a/main.tf b/main.tf index 616eec01..e8433e13 100644 --- a/main.tf +++ b/main.tf @@ -96,6 +96,10 @@ resource "azurerm_kubernetes_cluster" "main" { } } + network_profile { + network_plugin = var.network_plugin + } + tags = var.tags } diff --git a/test/fixture/main.tf b/test/fixture/main.tf index c6a775d2..d5859846 100644 --- a/test/fixture/main.tf +++ b/test/fixture/main.tf @@ -30,6 +30,7 @@ module aks { resource_group_name = azurerm_resource_group.main.name client_id = var.client_id client_secret = var.client_secret + network_plugin = "azure" vnet_subnet_id = azurerm_subnet.test.id os_disk_size_gb = 60 enable_http_application_routing = true diff --git a/variables.tf b/variables.tf index 9e3bfb7c..8107e296 100644 --- a/variables.tf +++ b/variables.tf @@ -139,3 +139,9 @@ variable "rbac_aad_server_app_secret" { type = string default = null } + +variable "network_plugin" { + description = "Network plugin to use for networking." + type = string + default = "kubenet" +}