hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.46k stars 4.54k forks source link

Internal error - Error: listing Site Publishing Credential information for Slot #26183

Open flcdrg opened 1 month ago

flcdrg commented 1 month ago

Is there an existing issue for this?

Community Note

Terraform Version

1.8.4

AzureRM Provider Version

v3.106.1

Affected Resource(s)/Data Source(s)

azurerm_private_endpoint

Terraform Configuration Files

Tricky to supply as internal app with private virtual network.

Azure App Services with private endpoints.

Debug Output/Panic Output

https://gist.github.com/flcdrg/c4b86cb3d964714eb0c139d05cd9a2a0

Expected Behaviour

Not crash

Actual Behaviour

Provider crashed

error: listing Site Publishing Credential information for Slot

The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain
more details.

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

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xbf77c1]

goroutine 4176 [running]:
github.com/hashicorp/go-azure-sdk/sdk/client/pollers.(*Poller).PollUntilDone.func1()
    github.com/hashicorp/go-azure-sdk/sdk@v0.20240529.1155048/client/pollers/poller.go:124 +0xa1
created by github.com/hashicorp/go-azure-sdk/sdk/client/pollers.(*Poller).PollUntilDone in goroutine 3612
    github.com/hashicorp/go-azure-sdk/sdk@v0.20240529.1155048/client/pollers/poller.go:108 +0xfd

Steps to Reproduce

  1. Terraform apply

Important Factoids

No response

References

No response

marcindulak commented 5 days ago

I've just had a similar problem occurring once, but with a different resource azurerm_linux_web_app_slot, terraform 1.7.5 and azurerm versions 3.104.2, and without SIGSEGV.

I'm adding this to the list of nondeterministc terraform behaviors at https://github.com/hashicorp/terraform-provider-azurerm/issues/25585

Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: listing Site Publishing Credential information for Slot (Subscription: "AAA"
│ Resource Group Name: "rg-test"
│ Site Name: "app-test"
│ Slot Name: "slot"): listing Site Publishing Credential information for Slot (Subscription: "AAA"
│ Resource Group Name: "rg-test"
│ Site Name: "app-test"
│ Slot Name: "slot"): Post "https://management.azure.com/subscriptions/AAA/resourceGroups/rg-test/providers/Mic\
rosoft.Web/sites/app-test/slots/slot/config/publishingcredentials/list?api-version=2023-01-01": HTTP response w\
as nil; connection may have been reset
│
│   with module.app.azurerm_linux_web_app_slot.this,
│   on .terraform/modules/app/app.tf line 493, in resource "azurerm_linux_web_app_slot" "this":
│  493: resource "azurerm_linux_web_app_slot" "this" {
...