Skip to content

Commit a85eeb4

Browse files
committed
address code review
1 parent 9c66ff9 commit a85eeb4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

locals.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
locals {
2+
# Centralize AzAPI version for AKS managedClusters operations
3+
aks_managed_clusters_api_version = "2025-09-01"
24
# Abstract if auto_scaler_profile_scale_down_delay_after_delete is not set or null we should use the scan_interval.
35
auto_scaler_profile_scale_down_delay_after_delete = var.auto_scaler_profile_scale_down_delay_after_delete == null ? var.auto_scaler_profile_scan_interval : var.auto_scaler_profile_scale_down_delay_after_delete
46
# automatic upgrades are either:

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ resource "time_sleep" "interval_before_cluster_update" {
700700

701701
resource "azapi_update_resource" "aks_cluster_post_create" {
702702
resource_id = azurerm_kubernetes_cluster.main.id
703-
type = "Microsoft.ContainerService/managedClusters@2024-02-01"
703+
type = "Microsoft.ContainerService/managedClusters@${local.aks_managed_clusters_api_version}"
704704
body = {
705705
properties = {
706706
kubernetesVersion = var.kubernetes_version
@@ -729,7 +729,7 @@ resource "azapi_update_resource" "aks_cluster_http_proxy_config_no_proxy" {
729729
count = can(var.http_proxy_config.no_proxy[0]) ? 1 : 0
730730

731731
resource_id = azurerm_kubernetes_cluster.main.id
732-
type = "Microsoft.ContainerService/managedClusters@2024-02-01"
732+
type = "Microsoft.ContainerService/managedClusters@${local.aks_managed_clusters_api_version}"
733733
body = {
734734
properties = {
735735
httpProxyConfig = {
@@ -759,10 +759,10 @@ resource "azapi_update_resource" "aks_cluster_localdns_config" {
759759
count = var.localdns_config != null ? 1 : 0
760760

761761
resource_id = azurerm_kubernetes_cluster.main.id
762-
type = "Microsoft.ContainerService/managedClusters@2024-02-01"
762+
type = "Microsoft.ContainerService/managedClusters@${local.aks_managed_clusters_api_version}"
763763
body = {
764764
properties = {
765-
localDNSConfig = {
765+
localDNSProfile = {
766766
mode = var.localdns_config.mode
767767
vnetDNSOverrides = var.localdns_config.vnet_dns_overrides != null ? {
768768
for zone_name, zone_config in var.localdns_config.vnet_dns_overrides.zones : zone_name => {

0 commit comments

Comments
 (0)