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

crash/panic app_service_managed_certificate_resource #13352

Closed
Marcus-James-Adams opened this issue Sep 14, 2021 · 5 comments · Fixed by #13357
Closed

crash/panic app_service_managed_certificate_resource #13352

Marcus-James-Adams opened this issue Sep 14, 2021 · 5 comments · Fixed by #13357
Labels
bug crash service/app-service upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR v/2.x (legacy)
Milestone

Comments

@Marcus-James-Adams
Copy link

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 windows_amd64

  • provider registry.terraform.io/cloudflare/cloudflare v2.26.1
  • provider registry.terraform.io/hashicorp/azuread v2.2.1
  • provider registry.terraform.io/hashicorp/azurerm v2.76.0
  • provider registry.terraform.io/hashicorp/random v3.1.0
  • provider registry.terraform.io/microsoft/azuredevops v0.1.7

Affected Resource(s)

this appears to affect any code that has azurerm_app_service or linked resources eg app_service_managed_certificate_resource

Panic Output


│ Error: Plugin did not respond

│ with azurerm_app_service_certificate_binding.api,
│ on novf.tech.manged.cert.binding.tf line 78, in resource "azurerm_app_service_certificate_binding" "api":
│ 78: resource "azurerm_app_service_certificate_binding" "api" {

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


│ Error: Plugin did not respond

│ with azurerm_app_service_managed_certificate.ui,
│ on novf.tech.manged.cert.binding.tf line 171, in resource "azurerm_app_service_managed_certificate" "ui":
│ 171: resource "azurerm_app_service_managed_certificate" "ui" {

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


│ Error: Plugin did not respond

│ with azurerm_app_configuration_key.invz_redis_primary_access_key,
│ on settings.invz.tf line 211, in resource "azurerm_app_configuration_key" "invz_redis_primary_access_key":
│ 211: resource "azurerm_app_configuration_key" "invz_redis_primary_access_key" {

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


│ Error: Plugin did not respond

│ with azurerm_app_service_virtual_network_swift_connection.investorzone-app-api,
│ on vnet-intergration.tf line 1, in resource "azurerm_app_service_virtual_network_swift_connection" "investorzone-app-api":
│ 1: resource "azurerm_app_service_virtual_network_swift_connection" "investorzone-app-api" {

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

Stack trace from the terraform-provider-azurerm_v2.76.0_x5.exe plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x5ce4d4a]

goroutine 2041 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/web.resourceAppServiceManagedCertificateRead(0xc002887700, 0x61032c0, 0xc001332000, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/internal/services/web/app_service_managed_certificate_resource.go:221 +0x70a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc001305dc0, 0x710f5a8, 0xc0013b1180, 0xc002887700, 0x61032c0, 0xc001332000, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:335 +0x1fb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc001305dc0, 0x710f5a8, 0xc0013b1180, 0xc000788bd0, 0x61032c0, 0xc001332000, 0xc001a155e8, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:624 +0x1cb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0013dc048, 0x710f5a8, 0xc0013b1180, 0xc0013b11c0, 0xc0013b1180, 0x9ebeca, 0x643b360)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go:575 +0x45b
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0xc001bd1260, 0x710f650, 0xc0013b1180, 0xc0016964e0, 0xc001bd1260, 0xc001d2d7d0, 0xc002647ba0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/server/server.go:298 +0x108
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x66045c0, 0xc001bd1260, 0x710f650, 0xc001d2d7d0, 0xc001696480, 0x0, 0x710f650, 0xc001d2d7d0, 0xc002081c00, 0x356)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x222
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002c8380, 0x715f298, 0xc0001d8900, 0xc00152f200, 0xc000c79440, 0xa82c4b0, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1292 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc0002c8380, 0x715f298, 0xc0001d8900, 0xc00152f200, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1617 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0012f2c20, 0xc0002c8380, 0x715f298, 0xc0001d8900, 0xc00152f200)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:940 +0xb2
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:938 +0x1fd

Error: The terraform-provider-azurerm_v2.76.0_x5.exe plugin crashed!

Important Factoids

we have tried it on a number of code sections in our repo all of which planned and applied ok 13th Sepetmber 2021
However as of this morning 14 September they all give the same panic.

No code has changed and we have not updated the azurerm provider
I tried downgrading azurerm provider to v2.25.0 and the same error occurs

References

  • #0000
@andycoderapptio
Copy link

We've started seeing a similar error message when deploying to azure starting within the last 48 hours or so. On all of our azurem resource types

@jackofallops jackofallops added this to the v2.77.0 milestone Sep 15, 2021
@jackofallops jackofallops added service/app-service upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR labels Sep 15, 2021
@vagharshakus
Copy link

vagharshakus commented Sep 15, 2021

Hi, we have since one day exactly the same problem with crashing, with exactly the same Stacktrace:

github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/web.resourceAppServiceManagedCertificateRead(0xc0021e8e80, 0x632d320, 0xc001a13180, 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:221 +0x6e9
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0013b70a0, 0x72aff68, 0xc001c742c0, 0xc0021e8e80, 0x632d320, 0xc001a13180, 0x0, 0x0, 0x0)
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:335 +0x1ee
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0013b70a0, 0x72aff68, 0xc001c742c0, 0xc00035fb20, 0x632d320, 0xc001a13180, 0xc002169e60, 0x0, 0x0, 0x0)
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:624 +0x1cb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000662be8, 0x72aff68, 0xc001c742c0, 0xc001c74300, 0xc001c742c0, 0x100b705, 0x6646dc0)
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go:575 +0x43b
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0xc000828a20, 0x72b0010, 0xc001c742c0, 0xc0019345a0, 0xc000828a20, 0xc001e81aa0, 0xc001113ba0)
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/server/server.go:298 +0x105
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x6804d40, 0xc000828a20, 0x72b0010, 0xc001e81aa0, 0xc001934540, 0x0, 0x72b0010, 0xc001e81aa0, 0xc000f8e800, 0x3a9)
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00027c8c0, 0x72faf78, 0xc000193800, 0xc000fd1440, 0xc000ff0ed0, 0xa854010, 0x0, 0x0, 0x0)
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1292 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc00027c8c0, 0x72faf78, 0xc000193800, 0xc000fd1440, 0x0)
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1617 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000b2be30, 0xc00027c8c0, 0x72faf78, 0xc000193800, 0xc000fd1440)
        /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:940 +0xab
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:938 +0x1fd

Error: The terraform-provider-azurerm_v2.69.0_x5 plugin crashed!

We tried out with different provider versions, including the newest one (2.76.0). Everywhere the same problem.

We checked our state JSON file, issue_date for the proper web_app is setted correcty in expected RFC3339 format: "2021-08-29T00:00:00Z"

We are using TF version 1.0.6 with Linux darwin_amd64.

@tommygarvin
Copy link

I'm having this issue as well and noticed some issues on Azure's side. In Azure Web Portal, if you go to your app service > tls/ssl settings > private key certificates, you may notice that "expiration" and "thumbprint" columns are blank. Additionally, if you click a certificate you may get an error that says "invalid time value".

I opened a case with Microsoft yesterday at 1900 UTC and support confirmed it's a known issue (even though I couldn't find anything on their status pages) and they're working on a fix. They directed me toward aka.ms/canary where they had a fix in place if I needed to manage something by hand in the meantime. I haven't had any updates from them today but it looks like some sections of App Service certificate management are working again in the Azure Web Portal, but not all.

@github-actions
Copy link

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!

@github-actions
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 Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug crash service/app-service upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR v/2.x (legacy)
Projects
None yet
6 participants