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

Provider Panic Error on azurerm_storage_account_customer_managed_key #23587

Closed
1 task done
llohrstraeter opened this issue Oct 17, 2023 · 2 comments · Fixed by #23599
Closed
1 task done

Provider Panic Error on azurerm_storage_account_customer_managed_key #23587

llohrstraeter opened this issue Oct 17, 2023 · 2 comments · Fixed by #23599

Comments

@llohrstraeter
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

Hello everyone,

Getting the panic output below for azurerm_storage_account_customer_managed_key during terraform plan.
This was working fine until azurerm version 3.73.0. As soon as we go to 3.74.0 or higher we are seeing this error.

  • 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 "+1" or "me too" comments, 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.6.1

AzureRM Provider Version

3.76.0

Affected Resource(s)/Data Source(s)

azurerm_storage_account_customer_managed_key

Terraform Configuration Files

Configuration is very complex with multiple nested modules. I can try to create a config that reproduces this error if needed.

Debug Output/Panic Output

{"value":[]}: timestamp=2023-10-17T06:21:53.316Z
2023-10-17T06:21:53.317Z [TRACE] provider.terraform-provider-azurerm_v3.76.0_x5: Served request: @module=sdk.proto tf_provider_addr=provider tf_req_id=3c212d6a-fcd7-4f5c-28bd-83644847880c tf_rpc=ReadResource tf_proto_version=5.4 tf_resource_type=azurerm_storage_account_customer_managed_key @caller=runtime/panic.go:914 timestamp=2023-10-17T06:21:53.316Z
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: panic: runtime error: invalid memory address or nil pointer dereference
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x787f589]
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: goroutine 1673 [running]:
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: github.com/hashicorp/terraform-provider-azurerm/internal/services/storage.resourceStorageAccountCustomerManagedKeyRead(0xc00470fb00, {0x8190080?, 0xc0013b0480?})
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/storage_account_customer_managed_key_resource.go:281 +0x649
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x98c1620?, {0x98c1620?, 0xc001edebd0?}, 0xd?, {0x8190080?, 0xc0013b0480?})
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:783 +0x163
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0014f9dc0, {0x98c1620, 0xc001edebd0}, 0xc0014a1110, {0x8190080, 0xc0013b0480})
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1089 +0x552
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000122180, {0x98c1620?, 0xc001edeae0?}, 0xc0024f5980)
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:649 +0x48a
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc001855720, {0x98c1620?, 0xc001ede330?}, 0xc002f67da0)
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:789 +0x48a
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x8c4afa0?, 0xc001855720}, {0x98c1620, 0xc001ede330}, 0xc00075c620, 0x0)
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:431 +0x169
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002a61e0, {0x98d2c40, 0xc001768000}, 0xc001b0cb40, 0xc001532300, 0xf4229c8, 0x0)
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	google.golang.org/[email protected]/server.go:1376 +0xde7
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: google.golang.org/grpc.(*Server).handleStream(0xc0002a61e0, {0x98d2c40, 0xc001768000}, 0xc001b0cb40, 0x0)
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	google.golang.org/[email protected]/server.go:1753 +0x9e7
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: google.golang.org/grpc.(*Server).serveStreams.func1.1()
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	google.golang.org/[email protected]/server.go:998 +0x8d
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 41
2023-10-17T06:21:53.319Z [DEBUG] provider.terraform-provider-azurerm_v3.76.0_x5: 	google.golang.org/[email protected]/server.go:996 +0x165
2023-10-17T06:21:53.322Z [ERROR] plugin.(*GRPCProvider).ReadResource: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-17T06:21:53.322Z [ERROR] plugin.(*GRPCProvider).ReadResource: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-17T06:21:53.322Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-17T06:21:53.322Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/azurerm/3.76.0/linux_amd64/terraform-provider-azurerm_v3.76.0_x5 pid=321 error="exit status 2"
2023-10-17T06:21:53.322Z [ERROR] vertex "module.synapse.module.data_lake.azurerm_private_endpoint.storage_account_blob[0]" error: Plugin did not respond
2023-10-17T06:21:53.322Z [TRACE] vertex "module.synapse.module.data_lake.azurerm_private_endpoint.storage_account_blob[0]": visit complete, with errors
2023-10-17T06:21:53.322Z [ERROR] vertex "module.synapse.module.data_lake.azurerm_storage_account_customer_managed_key.main[0]" error: Plugin did not respond
2023-10-17T06:21:53.322Z [TRACE] vertex "module.synapse.module.data_lake.azurerm_storage_account_customer_managed_key.main[0]": visit complete, with errors
2023-10-17T06:21:53.322Z [TRACE] dag/walk: upstream of "root" errored, so skipping
2023-10-17T06:21:53.322Z [TRACE] vertex "module.synapse.module.data_lake.azurerm_storage_account_customer_managed_key.main (expand)": dynamic subgraph encountered errors: Plugin did not respond
2023-10-17T06:21:53.322Z [ERROR] vertex "module.synapse.module.data_lake.azurerm_storage_account_customer_managed_key.main (expand)" error: Plugin did not respond
2023-10-17T06:21:53.322Z [TRACE] vertex "module.synapse.module.data_lake.azurerm_storage_account_customer_managed_key.main (expand)": visit complete, with errors
2023-10-17T06:21:53.322Z [TRACE] dag/walk: upstream of "root" errored, so skipping
2023-10-17T06:21:53.322Z [TRACE] vertex "module.synapse.module.data_lake.azurerm_private_endpoint.storage_account_blob (expand)": dynamic subgraph encountered errors: Plugin did not respond
2023-10-17T06:21:53.322Z [ERROR] vertex "module.synapse.module.data_lake.azurerm_private_endpoint.storage_account_blob (expand)" error: Plugin did not respond
2023-10-17T06:21:53.322Z [TRACE] vertex "module.synapse.module.data_lake.azurerm_private_endpoint.storage_account_blob (expand)": visit complete, with errors
2023-10-17T06:21:53.322Z [TRACE] dag/walk: upstream of "module.synapse.module.data_lake (close)" errored, so skipping
2023-10-17T06:21:53.322Z [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/hashicorp/azurerm\"] (close)" errored, so skipping
2023-10-17T06:21:53.322Z [TRACE] dag/walk: upstream of "module.synapse (close)" errored, so skipping
2023-10-17T06:21:53.322Z [TRACE] dag/walk: upstream of "root" errored, so skipping
2023-10-17T06:21:53.322Z [TRACE] LoadSchemas: retrieving schema for provider type "registry.terraform.io/hashicorp/azurerm"
2023-10-17T06:21:53.322Z [TRACE] LoadSchemas: retrieving schema for provider type "registry.terraform.io/hashicorp/random"
2023-10-17T06:21:53.335Z [TRACE] LoadSchemas: retrieving schema for provider type "registry.terraform.io/hashicorp/azurerm"
2023-10-17T06:21:53.335Z [TRACE] LoadSchemas: retrieving schema for provider type "registry.terraform.io/hashicorp/random"
2023-10-17T06:21:53.336Z [INFO]  backend/local: plan operation completed
2023-10-17T06:21:53.336Z [INFO]  backend/local: writing plan output to: /__w/4/a/tfplan

Expected Behaviour

Terraform plan should execute without the provider crashing.

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@rcskosir
Copy link
Contributor

@llohrstraeter
Thank you for taking the time to open this issue. Please subscribe to PR #23599 created by @wuxu92 for this issue.

@github-actions github-actions bot added this to the v3.77.0 milestone Oct 19, 2023
Copy link

github-actions bot commented May 4, 2024

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 May 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants