{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/2037","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/2037/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/2037/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/2037/events","html_url":"https://github.com/terraform-providers/terraform-provider-azurerm/issues/2037","id":367881423,"node_id":"MDU6SXNzdWUzNjc4ODE0MjM=","number":2037,"title":"[AKS] Updating node VM SKU destroy and recreate the entire AKS cluster ","user":{"login":"jcorioland","id":4435138,"node_id":"MDQ6VXNlcjQ0MzUxMzg=","avatar_url":"https://avatars1.githubusercontent.com/u/4435138?v=4","gravatar_id":"","url":"https://api.github.com/users/jcorioland","html_url":"https://github.com/jcorioland","followers_url":"https://api.github.com/users/jcorioland/followers","following_url":"https://api.github.com/users/jcorioland/following{/other_user}","gists_url":"https://api.github.com/users/jcorioland/gists{/gist_id}","starred_url":"https://api.github.com/users/jcorioland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcorioland/subscriptions","organizations_url":"https://api.github.com/users/jcorioland/orgs","repos_url":"https://api.github.com/users/jcorioland/repos","events_url":"https://api.github.com/users/jcorioland/events{/privacy}","received_events_url":"https://api.github.com/users/jcorioland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-08T17:16:00Z","updated_at":"2018-10-10T10:32:40Z","closed_at":null,"author_association":"NONE","body":"### Actual behavior:\r\n\r\nWhen applying some changes (like vm node size SKU) on an existing AKS cluster using the Terraform provider, it drops the cluster and create a new one, loosing all state, instead of droping/creating new nodes one by one.\r\n\r\nMore, if you specifify a new vm SKU that is not supported in the reason, it drops your current AKS cluster and then just fails to recreate a new one. \r\n\r\n### Expected behavior:\r\n\r\n- Check/Validate parameters before any action\r\n- Do not destroy the whole cluster but replace node one by one\r\n\r\n### Community Note\r\n\r\n* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request\r\n* Please do not leave \"+1\" or \"me too\" comments, they generate extra noise for issue followers and do not help prioritize the request\r\n* If you are interested in working on this issue or have submitted a pull request, please leave a comment\r\n\r\n### Terraform Version\r\n\r\n- `Terraform v0.11.8`\r\n- `terraform-provider-azurerm_v1.16.0_x4`\r\n\r\n### Apply Plan output\r\n\r\n```bash\r\nAcquiring state lock. This may take a few moments...\r\nReleasing state lock. This may take a few moments...\r\nAcquiring state lock. This may take a few moments...\r\nazurerm_kubernetes_cluster.k8s: Destroying... (ID: /subscriptions/b57ad57e-...-...vice/managedClusters/aks-terraform-jco)\r\nazurerm_kubernetes_cluster.k8s: Still destroying... (ID: /subscriptions/b57ad57e-...-...vice/managedClusters/aks-terraform-jco, 10s elapsed)\r\nazurerm_kubernetes_cluster.k8s: Still destroying... (ID: /subscriptions/b57ad57e-...-...vice/managedClusters/aks-terraform-jco, 20s elapsed)\r\n8d28-...vice/managedClusters/aks-terraform-jco, 7m50s elapsed)\r\nazurerm_kubernetes_cluster.k8s: Still destroying... (ID: /subscriptions/b57ad57e-...-...vice/managedClusters/aks-terraform-jco, 8m0s elapsed)\r\nazurerm_kubernetes_cluster.k8s: Destruction complete after 8m8s\r\nazurerm_kubernetes_cluster.k8s: Creating...\r\n  addon_profile.#:                           \"\" => \"<computed>\"\r\n  agent_pool_profile.#:                      \"\" => \"1\"\r\n  agent_pool_profile.0.count:                \"\" => \"2\"\r\n  agent_pool_profile.0.dns_prefix:           \"\" => \"<computed>\"\r\n  agent_pool_profile.0.fqdn:                 \"\" => \"<computed>\"\r\n  agent_pool_profile.0.max_pods:             \"\" => \"<computed>\"\r\n  agent_pool_profile.0.name:                 \"\" => \"default\"\r\n  agent_pool_profile.0.os_disk_size_gb:      \"\" => \"30\"\r\n  agent_pool_profile.0.os_type:              \"\" => \"Linux\"\r\n  agent_pool_profile.0.vm_size:              \"\" => \"Standard_DS2_v3\"\r\n  dns_prefix:                                \"\" => \"aks-terraform-jco\"\r\n  fqdn:                                      \"\" => \"<computed>\"\r\n  kube_config.#:                             \"\" => \"<computed>\"\r\n  kube_config_raw:                           \"<sensitive>\" => \"<sensitive>\"\r\n  kubernetes_version:                        \"\" => \"<computed>\"\r\n  linux_profile.#:                           \"\" => \"1\"\r\n  linux_profile.0.admin_username:            \"\" => \"ubuntu\"\r\n  linux_profile.0.ssh_key.#:                 \"\" => \"1\"\r\n  linux_profile.0.ssh_key.0.key_data:        \"\" => \"SSHKEY\"\r\n  location:                                  \"\" => \"westeurope\"\r\n  name:                                      \"\" => \"aks-terraform-jco\"\r\n  network_profile.#:                         \"\" => \"<computed>\"\r\n  node_resource_group:                       \"\" => \"<computed>\"\r\n  resource_group_name:                       \"\" => \"aks-terraform-rg\"\r\n  service_principal.#:                       \"\" => \"1\"\r\n  service_principal.580741280.client_id:     \"\" => \"SP_CLIENT_ID\"\r\n  service_principal.580741280.client_secret: \"<sensitive>\" => \"<sensitive>\"\r\n  tags.%:                                    \"\" => \"1\"\r\n  tags.Environment:                          \"\" => \"Development\"\r\nReleasing state lock. This may take a few moments...\r\n\r\nError: Error applying plan:\r\n\r\n1 error(s) occurred:\r\n\r\n* azurerm_kubernetes_cluster.k8s: 1 error(s) occurred:\r\n\r\n* azurerm_kubernetes_cluster.k8s: containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=400 Code=\"BadRequest\" Message=\"The VM size of AgentPoolProfile:default is not allowed in your subscription in location 'westeurope'. The available VM sizes are Standard_A1,Standard_A10,Standard_A11,Standard_A1_v2,Standard_A2,Standard_A2_v2,Standard_A2m_v2,Standard_A3,Standard_A4,Standard_A4_v2,Standard_A4m_v2,Standard_A5,Standard_A6,Standard_A7,Standard_A8,Standard_A8_v2,Standard_A8m_v2,Standard_A9,Standard_B2ms,Standard_B2s,Standard_B4ms,Standard_B8ms,Standard_D1,Standard_D11,Standard_D11_v2,Standard_D11_v2_Promo,Standard_D12,Standard_D12_v2,Standard_D12_v2_Promo,Standard_D13,Standard_D13_v2,Standard_D13_v2_Promo,Standard_D14,Standard_D14_v2,Stand\r\n```"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/comments/428522338","html_url":"https://github.com/terraform-providers/terraform-provider-azurerm/issues/2037#issuecomment-428522338","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/2037","id":428522338,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODUyMjMzOA==","user":{"login":"anvarich","id":3518212,"node_id":"MDQ6VXNlcjM1MTgyMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/3518212?v=4","gravatar_id":"","url":"https://api.github.com/users/anvarich","html_url":"https://github.com/anvarich","followers_url":"https://api.github.com/users/anvarich/followers","following_url":"https://api.github.com/users/anvarich/following{/other_user}","gists_url":"https://api.github.com/users/anvarich/gists{/gist_id}","starred_url":"https://api.github.com/users/anvarich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anvarich/subscriptions","organizations_url":"https://api.github.com/users/anvarich/orgs","repos_url":"https://api.github.com/users/anvarich/repos","events_url":"https://api.github.com/users/anvarich/events{/privacy}","received_events_url":"https://api.github.com/users/anvarich/received_events","type":"User","site_admin":false},"created_at":"2018-10-10T10:32:40Z","updated_at":"2018-10-10T10:32:40Z","author_association":"NONE","body":"Such behavior not supported by AKS https://github.com/Azure/AKS/issues/132. They have some workaround with adding new agents node pool but it is not automated."}}
{"actor":{"display_login":"anvarich"}}