Closed yuslee80 closed 3 months ago
@yuslee80 thanks for opening this issue
I see you are using the azurerm_kubernetes_cluster_node_pool
resource directly. Can you confirm you are not using the module from this repository to create the node pool with the variable var.node_pools
?
The correct place to open this bug is at the Hashicorp Terraform provider azurerm repository: https://github.com/hashicorp/terraform-provider-azurerm/issues
This issue should be solved my the patch in PR #564
Please reopen the issue if you need further help.
Is this "PR" not integrated with AzureRM yet? My code still says "Replace" as below.
# azurerm_kubernetes_cluster_node_pool.usernodepool["vm1"] must be replaced
-/+ resource "azurerm_kubernetes_cluster_node_pool" "usernodepool" {
- custom_ca_trust_enabled = false -> null
- enable_auto_scaling = false -> null
- enable_host_encryption = false -> null
- enable_node_public_ip = false -> null
- fips_enabled = false -> null
~ id = "/subscriptions/00000-000000-0000000-0000000/resourceGroups/rg-p-yuslee-aks/providers/Microsoft.ContainerService/managedClusters/aks-test/agentPools/upool01" -> (known after apply)
- max_count = 0 -> null
- min_count = 0 -> null
name = "upool01"
- tags = {} -> null
# (26 unchanged attributes hidden)
+ kubelet_config { # forces replacement
+ container_log_max_line = 2 # forces replacement
+ container_log_max_size_mb = 10 # forces replacement
+ cpu_cfs_quota_enabled = false # forces replacement
}
~ upgrade_settings {
- drain_timeout_in_minutes = 0 -> null
- node_soak_duration_in_minutes = 0 -> null
# (1 unchanged attribute hidden)
}
}
AzureRM : v3.113.0
Hello @yuslee80
Sorry I made a mistake. PR #564 is about the upgrade_settings
, not the kubelet_config
.
It seems that adding kubelet_config
forces the replacement of the nodepool, according to the documentation this seems to be the expected behaviour.
You should use the temporary_name_for_rotation
as explained in the docs.
Could you confirm you are having this problem using the provider directly and not this module ?
thanks
Hi @yuslee80 , I assume that temporary_name_for_rotation
could solve this issue and I'm closing it now, please feel free to reopen it if you have any further questions.
Is there an existing issue for this?
Description
If you add "kubelet_config" to the "azurerm_kubernetes_cluster_node_pool" entry, you will try to replace the node.
If I add the code as above and do the terraform plan, I would like to replace the node as below.
However, in "default_node_pool", it works as "change".
New or Affected Resource(s)/Data Source(s)
azurerm_v3.107.0
Potential Terraform Configuration
References
No response