From 38626c50db99ff13056b85230ce3a13e10006c70 Mon Sep 17 00:00:00 2001 From: hezijie Date: Wed, 14 Jun 2023 10:17:53 +0800 Subject: [PATCH] add support for default node pool's proximity_placement_group_id --- main.tf | 2 ++ variables.tf | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/main.tf b/main.tf index ffe42654..797ca0dc 100644 --- a/main.tf +++ b/main.tf @@ -67,6 +67,7 @@ resource "azurerm_kubernetes_cluster" "main" { os_disk_type = var.os_disk_type os_sku = var.os_sku pod_subnet_id = var.pod_subnet_id + proximity_placement_group_id = var.agents_proximity_placement_group_id scale_down_mode = var.scale_down_mode tags = merge(var.tags, var.agents_tags) temporary_name_for_rotation = var.temporary_name_for_rotation @@ -158,6 +159,7 @@ resource "azurerm_kubernetes_cluster" "main" { os_disk_type = var.os_disk_type os_sku = var.os_sku pod_subnet_id = var.pod_subnet_id + proximity_placement_group_id = var.agents_proximity_placement_group_id scale_down_mode = var.scale_down_mode tags = merge(var.tags, var.agents_tags) temporary_name_for_rotation = var.temporary_name_for_rotation diff --git a/variables.tf b/variables.tf index c0fe1765..bd6dbccf 100644 --- a/variables.tf +++ b/variables.tf @@ -174,6 +174,12 @@ variable "agents_pool_name" { nullable = false } +variable "agents_proximity_placement_group_id" { + type = string + default = null + description = "(Optional) The ID of the Proximity Placement Group of the default Azure AKS agentpool (nodepool). Changing this forces a new resource to be created." +} + variable "agents_size" { type = string default = "Standard_D2s_v3"