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

GCP Connector Read causes Panic #234

Open
johnkeates opened this issue Dec 18, 2024 · 0 comments
Open

GCP Connector Read causes Panic #234

johnkeates opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@johnkeates
Copy link

Using Terraform v1.5.1, wiz 1.2.1:

Creating (which also does a post-creation read) and Importing runs into an interface mismatch:

terraform import wiz_connector_gcp.this 254ed4d5-aaaa-bbbb-bfbf-xxxxxxxxx

Resource:

resource "wiz_connector_gcp" "this" {
  name = "gcp"
    auth_params = jsonencode({
      "isManagedIdentity" : true,
      "organization_id" : data.google_organization.org.org_id
    })

    extra_config = jsonencode(
      {
        "projects" : [],
        "excludedProjects" : [],
        "includedFolders" : [],
        "excludedFolders" : [],
        "diskAnalyzerInFlightDisabled" : false,
        "auditLogMonitorEnabled" : true
      }
    )
  }

Panic:

╷
│ 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.
╵


Stack trace from the terraform-provider-wiz_v1.2.1 plugin:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 81 [running]:
wiz.io/hashicorp/terraform-provider-wiz/internal/provider.updateExtraConfig({_, _}, {{{{0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, 0x0}, ...}, ...}}, ...)
	wiz.io/hashicorp/terraform-provider-wiz/internal/provider/resource_connector_gcp.go:431 +0xb90
wiz.io/hashicorp/terraform-provider-wiz/internal/provider.resourceWizConnectorGcpRead({0x10321b1f8, 0x14000264fc0}, 0x1400016e800, {0x1030b74e0, 0x140003fa440})
	wiz.io/hashicorp/terraform-provider-wiz/internal/provider/resource_connector_gcp.go:329 +0x1538
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x1400041ae00, {0x10321b150, 0x14000522ff0}, 0xd?, {0x1030b74e0, 0x140003fa440})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:823 +0xe8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0x1400041ae00, {0x10321b150, 0x14000522ff0}, 0x14000120410, {0x1030b74e0, 0x140003fa440})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1117 +0x430
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0x14000368360, {0x10321b150?, 0x14000522f00?}, 0x14000132380)
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:708 +0x5ac
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0x140002710e0, {0x10321b150?, 0x14000522480?}, 0x14000264380)
	github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:783 +0x224
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x1031ea0e0?, 0x140002710e0}, {0x10321b150, 0x14000522480}, 0x1400016e100, 0x0)
	github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x1400019f000, {0x10321b150, 0x140005223f0}, {0x10321f2f0, 0x1400057a000}, 0x14000000120, 0x1400036fce0, 0x10372f848, 0x0)
	google.golang.org/[email protected]/server.go:1369 +0xba0
google.golang.org/grpc.(*Server).handleStream(0x1400019f000, {0x10321f2f0, 0x1400057a000}, 0x14000000120)
	google.golang.org/[email protected]/server.go:1780 +0xc80
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	google.golang.org/[email protected]/server.go:1019 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 36
	google.golang.org/[email protected]/server.go:1030 +0x150

Error: The terraform-provider-wiz_v1.2.1 plugin crashed!
@johnkeates johnkeates added the bug Something isn't working label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant