-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
AKS agent_pool_profile block leads to cluster recreation #4987
Comments
You can try move your |
@md2k |
Thanks for opening this issue. As you've noticed in the changelog the Whilst ultimately you'll need to switch from using the
Which should show no changes and continue to use the existing block. Since the
At which point you should be migrated across - would you be able to take a look and see if that works for you? Thanks! |
Hi! The point here is that, despite default_node_pool is optional block, on second apply run terraform decides it should be created, so treat it as a mandatory, and eventually triggers AKS recreation. Such behaviour is very destructive. For example you need re-run terraform code with updated provider against production cluster. IMHO That is a bug which should be fixed |
Whilst we appreciate this isn't ideal - unfortunately this change is required due to a breaking change in the Azure API, and is documented in the changelog for the 1.37 release. As mentioned above there's two approaches to working around this:
Since the behaviour of the underlying API has changed, we've deprecated the existing As mentioned above it's unfortunate that we've had to ship a breaking change in a minor version - it's something we try to avoid - however since the API behaviour has changed sufficiently here, we ultimately decided that introducing a replacement block was a better approach in the long-term to give users a migration path here. Thanks! |
We'll try to migrate AKS to default_node_pool Thanks for reply! |
We will pin the provider to version 1.36.1 and try to migrate further down the road |
👋 Since this should be solved by updating your Terraform Configuration I'm going to close this issue for the moment, but please let us know if that doesn't work and we'll take another look. Thanks! |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_kubernetes_cluster
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Only a deprecation warning is written during plan and apply operations.
Actual Behavior
Resource gets deleted and will be recreated on each apply.
Steps to Reproduce
1.36.1
with anagent_pool_profile
blockImportant Factoids
References
default_node_pool
#4898azurerm_kubernetes_cluster_node_pool
#4899The text was updated successfully, but these errors were encountered: