-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Version 2.76.0 azurerm_kubernetes_cluster_node_pool adds by default a os_sku = "Ubuntu" when I deploy a windows node and it fails #13306
Comments
Linking to related feature-add: #13284 |
This will also force a cluster rebuild when set even tho nothing is changing. We default to Ubuntu and now its setting
and wanting to force all our clusters to rebuild. |
Exactly! It is also marked as Optional which it clearly is not |
This functionality has been released in v2.83.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
As pointed out in this comment this issue has been resolved and the fix released in v2.77.0. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
The new version 2.76.0 adds a os_sku = "Ubuntu" when I deploy a windows node. Thus, it fails
Error: creating/updating Managed Kubernetes Cluster Node Pool "uwinnd" (Resource Group "z0euw1dcmrsg002"): containerservice.AgentPoolsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidOSSKU" Message="OSSKU='Ubuntu' is invalid, details: Windows does not allow OSSKU selection"
The plan:
azurerm_kubernetes_cluster_node_pool.nodes["1"] will be created
]
}
My Script
locals {
node_pools = [
{
name = "ulnxnd"
node_count = var.aks_agent_count_linuxuser
vm_size = var.aks_agent_vm_size_linuxuser
type = "VirtualMachineScaleSets"
availability_zones = ["1", "2"]
enable_auto_scaling = true
min_count = var.min_count_linuxuser
max_count = var.max_count_linuxuser
mode = "User"
os_type = "Linux"
},
{
name = "uwinnd"
node_count = var.aks_agent_count_windowsuser
vm_size = var.aks_agent_vm_size_windowsuser
type = "VirtualMachineScaleSets"
availability_zones = ["1", "2"]
enable_auto_scaling = true
min_count = var.min_count_windowsuser
max_count = var.max_count_windowsuser
vnet_subnet_id = azurerm_subnet.kubesubnet.id
mode = "User"
os_type = "Windows"
}
]
}
resource "azurerm_kubernetes_cluster_node_pool" "nodes" {
lifecycle {
ignore_changes = [
node_count
]
}
for_each = {
for index, node in local.node_pools:
index => node }
name = "${each.value.name}"
kubernetes_cluster_id = azurerm_kubernetes_cluster.cluster.id
node_count = each.value.node_count
vm_size = each.value.vm_size
availability_zones = each.value.availability_zones
enable_auto_scaling = each.value.enable_auto_scaling
min_count = each.value.min_count
max_count = each.value.max_count
vnet_subnet_id = azurerm_subnet.kubesubnet.id
mode = each.value.mode
os_type = each.value.os_type
}
The text was updated successfully, but these errors were encountered: