Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/application_gateway_ingress/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ module "aks" {
location = local.resource_group.location
kubernetes_version = "1.33" # don't specify the patch version!
automatic_channel_upgrade = "patch"
agents_availability_zones = ["2"]
agents_availability_zones = ["3"]
agents_count = null
agents_max_count = 2
agents_max_pods = 100
Expand Down
2 changes: 1 addition & 1 deletion examples/local_dns_config/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variable "create_resource_group" {
}

variable "location" {
default = "australiasoutheast"
default = "westeurope"
description = "The location where the Managed Kubernetes Cluster should be created."
}

Expand Down
10 changes: 8 additions & 2 deletions extra_node_pool.tf
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_before_destroy
error_message = "Exactly one of `max_surge` or `max_unavailable` must be specified in `upgrade_settings` for node pool '${each.value.name}'."
}
precondition {
condition = each.value.upgrade_settings == null || try(each.value.upgrade_settings.undrainable_node_behavior, null) == null || contains(["Cordon", "Schedule"], try(each.value.upgrade_settings.undrainable_node_behavior, ""))
condition = each.value.upgrade_settings == null ? true : (
try(each.value.upgrade_settings.undrainable_node_behavior, null) == null ? true :
contains(["Cordon", "Schedule"], each.value.upgrade_settings.undrainable_node_behavior)
)
error_message = "`undrainable_node_behavior` in `upgrade_settings` must be `null`, `\"Cordon\"`, or `\"Schedule\"` for node pool '${each.value.name}'."
}
}
Expand Down Expand Up @@ -347,7 +350,10 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_after_destroy"
error_message = "Exactly one of `max_surge` or `max_unavailable` must be specified in `upgrade_settings` for node pool '${each.value.name}'."
}
precondition {
condition = each.value.upgrade_settings == null || try(each.value.upgrade_settings.undrainable_node_behavior, null) == null || contains(["Cordon", "Schedule"], try(each.value.upgrade_settings.undrainable_node_behavior, ""))
condition = each.value.upgrade_settings == null ? true : (
try(each.value.upgrade_settings.undrainable_node_behavior, null) == null ? true :
contains(["Cordon", "Schedule"], each.value.upgrade_settings.undrainable_node_behavior)
)
error_message = "`undrainable_node_behavior` in `upgrade_settings` must be `null`, `\"Cordon\"`, or `\"Schedule\"` for node pool '${each.value.name}'."
}
}
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ data "azurerm_subnet" "blob_driver_check" {

check "blob_driver_subnet_service_endpoint" {
assert {
condition = var.vnet_subnet == null || !var.storage_profile_enabled || !var.storage_profile_blob_driver_enabled || contains(try(data.azurerm_subnet.blob_driver_check[0].service_endpoints, []), "Microsoft.Storage")
condition = var.vnet_subnet == null || !var.storage_profile_enabled || !var.storage_profile_blob_driver_enabled || contains(coalesce(try(data.azurerm_subnet.blob_driver_check[0].service_endpoints, null), []), "Microsoft.Storage")
error_message = "The subnet used by the default node pool does not have 'Microsoft.Storage' in its service_endpoints. When storage_profile_blob_driver_enabled is true, the AKS Blob CSI driver may automatically add this service endpoint out-of-band, causing Terraform state drift. To prevent this, add service_endpoints = [\"Microsoft.Storage\"] to your subnet configuration. See: https://github.com/Azure/terraform-azurerm-aks/issues/424"
}
}
Expand Down
Loading