Skip to content
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

azurerm_kubernetes_cluster_node_pool Panic at v4.0.0 #27158

Closed
1 task done
torumakabe opened this issue Aug 23, 2024 · 2 comments · Fixed by #27164
Closed
1 task done

azurerm_kubernetes_cluster_node_pool Panic at v4.0.0 #27158

torumakabe opened this issue Aug 23, 2024 · 2 comments · Fixed by #27164

Comments

@torumakabe
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.9.5

AzureRM Provider Version

4.0.0

Affected Resource(s)/Data Source(s)

azurerm_kubernetes_cluster_node_pool

Terraform Configuration Files

[snip]
resource "azurerm_kubernetes_cluster_node_pool" "user" {
  for_each              = toset(["1", "2", "3"])
  name                  = "az${each.key}"
  kubernetes_cluster_id = azurerm_kubernetes_cluster.default.id
  orchestrator_version  = local.aks.default.orchestrator_version
  vnet_subnet_id        = "${local.aks.network.node_user_az_subnet_id_prefix}${each.key}"
  vm_size               = local.aks.default.vm_size
  zones                 = [each.key]
  node_count            = var.aks.node_pool.user.node_count
  priority              = var.aks.node_pool.user.priority
  os_disk_size_gb       = local.aks.default.os_disk_size_gb
  os_disk_type          = local.aks.default.os_disk_type
  os_sku                = local.aks.default.os_sku

  lifecycle {
    ignore_changes = [
      eviction_policy,
      node_taints,
    ]
  }
}
[snip]

Debug Output/Panic Output

[snip]
│ Error: Plugin did not respond
│ 
│   with module.aks.azurerm_kubernetes_cluster_node_pool.user["3"],
│   on aks/main.tf line 227, in resource "azurerm_kubernetes_cluster_node_pool" "user":
│  227: resource "azurerm_kubernetes_cluster_node_pool" "user" {
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
[snip]

Stack trace from the terraform-provider-azurerm_v4.0.0_x5 plugin:

panic: interface conversion: interface {} is nil, not bool

goroutine 797 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/containers.resourceKubernetesClusterNodePoolCreate(0x0?, {0x6491780?, 0x4001eda480?})
        github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/kubernetes_cluster_node_pool_resource.go:502 +0x2fb0
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x7d00578?, {0x7d00578?, 0x4001e743f0?}, 0xd?, {0x6491780?, 0x4001eda480?})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:766 +0x134
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x4000f0cb60, {0x7d00578, 0x4001e743f0}, 0x400136d110, 0x400048cf80, {0x6491780, 0x4001eda480})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:909 +0x86c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x40001f8d98, {0x7d00578?, 0x4001e74300?}, 0x4001924c30)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1078 +0xb08
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x7d005b0?, {0x7d00578?, 0x4001e74000?}, 0x4001924c30)
        github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x184
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x4001a22e60, {0x7d00578?, 0x4001e397d0?}, 0x4001acf880)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:865 +0x2b0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x71b1040?, 0x4001a22e60}, {0x7d00578, 0x4001e397d0}, 0x400048cd00, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x400193a200, {0x7d00578, 0x4001e39740}, {0x7d2cfe0, 0x4000242900}, 0x4001e5f440, 0x40017d0030, 0xd2fd858, 0x0)
        google.golang.org/[email protected]/server.go:1369 +0xba0
google.golang.org/grpc.(*Server).handleStream(0x400193a200, {0x7d2cfe0, 0x4000242900}, 0x4001e5f440)
        google.golang.org/[email protected]/server.go:1780 +0xc80
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/[email protected]/server.go:1019 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 42
        google.golang.org/[email protected]/server.go:1030 +0x150

Error: The terraform-provider-azurerm_v4.0.0_x5 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Expected Behaviour

Complete without error. It worked fine in version 3.116.0.

Actual Behaviour

Panic

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

@hmb133
Copy link

hmb133 commented Aug 23, 2024

I have a draft PR open for this
#27160

Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.