nrkno / terraform-provider-lastpass

Terraform Lastpass provider
Apache License 2.0
61 stars 7 forks source link

GitHub actions and lastpass provider question #55

Closed asaf-upstream closed 2 years ago

asaf-upstream commented 2 years ago

Hi! We are trying to implement a gitHub action for our tf code, where we use the data "lastpass_secret" resource.

We have set: LASTPASS_USER: ${{ secrets.LASTPASS_USER }} LASTPASS_PASSWORD: ${{ secrets.LASTPASS_PASSWORD }}

And when we run tf plan we get the following:

Error: Plugin did not respond

  with data.lastpass_secret.xxx,
  on data.tf line 22, in data "lastpass_secret" "xxx":
  22: data "lastpass_secret" "xxx" {

The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more
details.
Releasing state lock. This may take a few moments...

Stack trace from the terraform-provider-lastpass_v0.5.3 plugin:

panic: Invalid diagnostic: empty summary. This is always a bug in the provider implementation

goroutine 27 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert.DiagsToProto(0xc00042c680, 0x1, 0x1, 0x7f8dc1b156e8, 0xc000424168, 0x18)
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.0/internal/plugin/convert/diagnostics.go:72 +0x35c
github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert.AppendProtoDiag(0x0, 0x0, 0x0, 0xb40520, 0xc000424168, 0xc0003cc420, 0x0, 0xc00042c680)
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.0/internal/plugin/convert/diagnostics.go:25 +0x99
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0xc00000c0c0, 0xcfca18, 0xc0000be400, 0xc000557100, 0xc0000be400, 0x40b965, 0xbb8180)
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.0/helper/schema/grpc_provider.go:1[106](https://github.com/upstream-auto/upstream-terraform/runs/5317992157?check_suite_focus=true#step:7:106) +0x554
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadDataSource(0xc0004359c0, 0xcfcac0, 0xc0000be400, 0xc00040ba40, 0xc0004359c0, 0xc000411f20, 0xc00048dba0)
    github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/server/server.go:247 +0xe5
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadDataSource_Handler(0xbe3dc0, 0xc0004359c0, 0xcfcac0, 0xc000411f20, 0xc000414a20, 0x0, 0xcfcac0, 0xc000411f20, 0xc00041c320, 0x96)
    github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:416 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000298540, 0xd036b8, 0xc0000bd200, 0xc0002ce600, 0xc00007d410, 0x10f11f0, 0x0, 0x0, 0x0)
    google.golang.org/grpc@v1.32.0/server.go:[119](https://github.com/upstream-auto/upstream-terraform/runs/5317992157?check_suite_focus=true#step:7:119)4 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000298540, 0xd036b8, 0xc0000bd200, 0xc0002ce600, 0x0)
    google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000042290, 0xc000298540, 0xd036b8, 0xc0000bd200, 0xc0002ce600)
    google.golang.org/grpc@v1.32.0/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
    google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd

Error: The terraform-provider-lastpass_v0.5.3 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.

TF ver: 1.1.0 Azure provider: 2.90.0

Is there something we miss? could this be related only to the MFA set for the user we use in our env vars? Thanks!