terraform-provider-azurerm: Segfault in `terraform plan` possibly related to azurerm_app_service_managed_certificate
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 “+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
Terraform (and AzureRM Provider) Version
Terraform v1.0.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v2.41.0
Affected Resource(s)
azurerm_app_service_managed_certificate
Terraform Configuration Files
See: https://github.com/WorldWideTelescope/wwt-terraform-infra/tree/master/website
Debug Output
edit: log deleted since I’m worried it might contain secrets and AFAICT it is not at all necessary to solving this issue
Panic Output
No crash.log since the plugin panicked, not terraform itself:
Stack trace from the terraform-provider-azurerm_v2.41.0_x5 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4602981]
goroutine 1345 [running]:
github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/web.resourceArmAppServiceManagedCertificateRead(0xc0024839d0, 0x49ab0c0, 0xc000346600, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/web/app_service_managed_certificate_resource.go:223 +0x681
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc001049a70, 0xc00163cff0, 0x49ab0c0, 0xc000346600, 0xc00182aa20, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:460 +0x129
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc000296de8, 0x56fdcc0, 0xc0012cadb0, 0xc0022e7800, 0xc000296de8, 0xc0012cadb0, 0xc00216fb78)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin/grpc_provider.go:525 +0x3dd
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0x4dfb920, 0xc000296de8, 0x56fdcc0, 0xc0012cadb0, 0xc0022e77a0, 0x0, 0x56fdcc0, 0xc0012cadb0, 0xc00124a000, 0x37d)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go:3269 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00028bc80, 0x5742540, 0xc000001e00, 0xc0016cb400, 0xc000923500, 0x84cddf0, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1024 +0x522
google.golang.org/grpc.(*Server).handleStream(0xc00028bc80, 0x5742540, 0xc000001e00, 0xc0016cb400, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1313 +0xd34
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc000c84160, 0xc00028bc80, 0x5742540, 0xc000001e00, 0xc0016cb400)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:722 +0xa5
created by google.golang.org/grpc.(*Server).serveStreams.func1
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:720 +0xa5
Error: The terraform-provider-azurerm_v2.41.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
Not crash.
Actual Behaviour
Crash.
Steps to Reproduce
terraform plan -var-file=prod.tfvars
Important Factoids
I haven’t used this project’s Terraform tooling for a while, so the definition files may be quite out of date.
References
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 21
- Comments: 33 (6 by maintainers)
tomorrow @ around 1600 pst 🙂
FYI: I have reached out to an App Service PM to discuss this. I have not heard back from them yet.
I’m reluctant to push in a change here based on a breaking API change microsoft has made… I’m in the process of escalating this at microsoft to get it rolled back. There could be other things broken too.
This functionality has been released in v2.77.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!
@mpanasiuk-apptio Check this PR, this should solve it.
I’m still confused how it is possible that you have this problem with a non-managed certificate, did you import a managed certificate as an unmanaged one?
The cert issue has had me in debug mode for a while now. Thanks for the update
we are also experiencing the same issue with
azurerm_app_service_managed_certificateandazurerm_app_service_slot@Marcus-James-Adams The funny thing is that this is literally the first time I’ve used Terraform in like 9 months, but apparently I picked just the wrong day to try to change something …