hashicorp / boundary

Boundary enables identity-based access management for dynamic infrastructure.
https://boundaryproject.io
Other
3.84k stars 287 forks source link

Error: The terraform-provider-boundary_v1.1.3_x5 plugin crashed! #2828

Closed RobertSkawinski closed 1 year ago

RobertSkawinski commented 1 year ago

I'm not sure what causes this issue, but today I'm unable to deploy boundary changes with terraform.

The accesslog of the boundary server does not show any connection.

$ terraform init --reconfigure --upgrade

Initializing the backend...

Initializing provider plugins...
- Finding hashicorp/azuread versions matching "~> 2.0"...
- Finding latest version of hashicorp/random...
- Finding hashicorp/boundary versions matching "~> 1.1.2"...
- Using previously-installed hashicorp/random v3.4.3
- Using previously-installed hashicorp/boundary v1.1.3
- Installing hashicorp/azuread v2.33.0...
- Installed hashicorp/azuread v2.33.0 (signed by HashiCorp)
$ terraform plan
random_password.admins: Refreshing state... [id=none]
boundary_managed_group.azuread_admins_org_infra: Refreshing state... [id=mgoidc_SFPw0rCfKy]
boundary_scope.global: Refreshing state... [id=global]
boundary_auth_method_oidc.oidc_azuread_org_infra: Refreshing state... [id=amoidc_JMagt0KflQ]
data.azuread_client_config.current: Reading...
data.azuread_group.boundary-admin-group: Reading...
data.azuread_client_config.current: Read complete after 0s [id=9a5e354e-1dba-4949-bfd8-28aa273cd1da-b6b75afd-6e76-4c4b-9019-8aa775d87912-885a9848-3ba8-4196-8415-c5b2772597e9]
data.azuread_group.boundary-admin-group: Read complete after 0s [id=c46511ec-67b8-4914-b751-8def72856260]
╷
│ Error: Plugin did not respond
│ 
│ 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
│ 
│ 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 boundary_scope.global,
│   on scope.tf line 1, in resource "boundary_scope" "global":
│    1: resource "boundary_scope" "global" {
│ 
│ 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-boundary_v1.1.3_x5 plugin:

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

goroutine 53 [running]:
github.com/hashicorp/boundary/api.(*Error).Response(...)
    github.com/hashicorp/boundary/api@v0.0.32/apierror.go:40
github.com/hashicorp/terraform-provider-boundary/internal/provider.resourceAuthMethodOidcRead({0x450cd08, 0xc000598120}, 0xc00071e300, {0xc6a8a0?, 0xc00012f9b0?})
    github.com/hashicorp/terraform-provider-boundary/internal/provider/resource_auth_method_oidc.go:411 +0x35f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc000298c40, {0x450cd40, 0xc00062ac00}, 0xd?, {0xc6a8a0, 0xc00012f9b0})
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/resource.go:724 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000298c40, {0x450cd40, 0xc00062ac00}, 0xc000136750, {0xc6a8a0, 0xc00012f9b0})
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/resource.go:1015 +0x585
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc00012e000, {0x450cd40?, 0xc00062aae0?}, 0xc0006482c0)
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/grpc_provider.go:613 +0x4a5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc000134000, {0x450cd40?, 0xc00062a4e0?}, 0xc0005981e0)
    github.com/hashicorp/terraform-plugin-go@v0.14.1/tfprotov5/tf5server/server.go:748 +0x4b1
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xd84ac0?, 0xc000134000}, {0x450cd40, 0xc00062a4e0}, 0xc0001b49a0, 0x0)
    github.com/hashicorp/terraform-plugin-go@v0.14.1/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0004ce000, {0x4510ae0, 0xc000103520}, 0xc0005a6000, 0xc000116150, 0x4a51130, 0x0)
    google.golang.org/grpc@v1.50.1/server.go:1340 +0xd23
google.golang.org/grpc.(*Server).handleStream(0xc0004ce000, {0x4510ae0, 0xc000103520}, 0xc0005a6000, 0x0)
    google.golang.org/grpc@v1.50.1/server.go:1713 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
    google.golang.org/grpc@v1.50.1/server.go:965 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
    google.golang.org/grpc@v1.50.1/server.go:963 +0x28a

Error: The terraform-provider-boundary_v1.1.3_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.
RobertSkawinski commented 1 year ago

close

Adding full certificate chain to nginx reverse proxy solves this issue