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_api_management - prevent panic #27649

Merged
merged 1 commit into from
Oct 14, 2024
Merged

azurerm_api_management - prevent panic #27649

merged 1 commit into from
Oct 14, 2024

Conversation

katbyte
Copy link
Collaborator

@katbyte katbyte commented Oct 14, 2024

fix

Stack trace from the terraform-provider-azurerm_v3.112.0_x5 plugin:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 800 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement.flattenApiManagementPolicies(0xc002e20380?, 0x82a89c5?)
github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/api_management_resource.go:2188 +0x275
github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement.resourceApiManagementServiceRead(0xc002e20380, {0x728b120?, 0xc00116d680})
github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/api_management_resource.go:1347 +0x137a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0x8aa7800?, {0x8aa7800?, 0xc002881110?}, 0xd?, {0x728b120?, 0xc00116d680?}) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:783 +0x163 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc000b7cd20, {0x8aa7800, 0xc002881110}, 0xc0013292b0, {0x728b120, 0xc00116d680})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1089 +0x552
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc00042ba40, {0x8aa7800?, 0xc002881020?}, 0xc0002f7b80) github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:649 +0x48a github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc001f54960, {0x8aa7800?, 0xc0028804b0?}, 0xc00133a000)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:789 +0x48b
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x7f25080?, 0xc001f54960}, {0x8aa7800, 0xc0028804b0}, 0xc00046c070, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:431 +0x169
google.golang.org/grpc.(Server).processUnaryRPC(0xc000526000, {0x8ad24a0, 0xc002082340}, 0xc002d839e0, 0xc002001bc0, 0xe103448, 0x0) google.golang.org/[email protected]/server.go:1374 +0xde7 google.golang.org/grpc.(Server).handleStream(0xc000526000, {0x8ad24a0, 0xc002082340}, 0xc002d839e0, 0x0)
google.golang.org/[email protected]/server.go:1751 +0x9e7
google.golang.org/grpc.(Server).serveStreams.func1.1() google.golang.org/[email protected]/server.go:986 +0xbb created by google.golang.org/grpc.(Server).serveStreams.func1 in goroutine 22
google.golang.org/[email protected]/server.go:997 +0x145

Error: The terraform-provider-azurerm_v3.112.0_x5 plugin crashed!

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@katbyte katbyte merged commit 2a8725b into main Oct 14, 2024
29 checks passed
@katbyte katbyte deleted the kt/panic-at-the-api branch October 14, 2024 17:14
katbyte added a commit that referenced this pull request Oct 14, 2024
@github-actions github-actions bot added this to the v4.6.0 milestone Oct 14, 2024
@rcskosir rcskosir added the bug label Oct 17, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Nov 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants