-
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
Kubernetes cluster must be replaced because of private_cluster_public_fqdn_enabled #13099
Comments
Here's the source of the problem: terraform-provider-azurerm/internal/services/containers/kubernetes_cluster_resource.go Line 596 in d347ded
I think this could be fixed by simply removing the default value here? terraform-provider-azurerm/internal/services/containers/kubernetes_cluster_resource.go Line 595 in d347ded
|
hashicorp#13099 This default value causes clusters to be rebuilt on existing deployments. Simply removing the default value should be sufficient for preventing the rebuilds from occuring. If someone needs to explicitly set this to false for some reason, they can still do that manually. This is a preferable situation to existing users not being able to upgrade without a complete cluster rebuild.
Fix hashicorp#13099, to do in place update for `private_cluster_public_fqdn_enabled`
@apeschel I think the default must be kept to false. I agree the forceNew must set to false. Now we have found all private aks clusters created with versions up to 2.72.0 have this feature enabled in the background. When upgrading to azurerm 2.73+ it is causing the cluster to be recreated. At least if the forceNew is set to false that will only trigger an update of the existing cluster and set this value to false as per the default setting. The provider documentation says "This requires that the Preview Feature Microsoft.ContainerService/EnablePrivateClusterPublicFQDN is enabled and the Resource Provider is re-registered". In our case the preview feature was not enabled and we observed the behavior described in this issue. |
Please fix as it impacting our customers in APAC! |
@LaurentLesle I had assumed ForceNew was set to true, because if the value is toggled from false to true, or vice versa, a cluster rebuild would be required. I might be mistaken though. If this option is something that does require a cluster rebuild though, the the right solution would be to keep |
@apeschel I took the az cli as the base reference to confirm this is an in-place upgrade of the aks cluster. So ForceNew should be set to false |
Yes, your logic here makes sense, but you're not addressing the much more likely scenario: what if you are toggling the value from false to true, or from true to false?
|
I can confirm that the issue on our side is fixed with azurerm - v2.78.0. Thanks to everyone involved in fixing this issue. |
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. |
Community Note
Terraform (and AzureRM Provider) Version
Terraform - v1.0.5
azurerm - v2.73.0
Affected Resource(s)
azurerm_kubernetes_cluster
Terraform Configuration Files
Debug Output
Debug contains secrets, so would prefer a private method if necessary for sharing.
Expected Behaviour
The Costcenter tag gets replaced by the CostCenter tag without causing downtime on the cluster.
Output should be something like:
Actual Behaviour
The whole cluster gets replaced.
Actual output is something like:
The same configuration works as expected on azurerm 2.72.0
Steps to Reproduce
terraform plan
The text was updated successfully, but these errors were encountered: