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

panic: interface conversion: interface {} is nil, not string #279

Closed
cten opened this issue Sep 29, 2022 · 2 comments
Closed

panic: interface conversion: interface {} is nil, not string #279

cten opened this issue Sep 29, 2022 · 2 comments

Comments

@cten
Copy link

cten commented Sep 29, 2022

Terraform Version

# terraform -v
Terraform v1.1.4
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.31.0
+ provider registry.terraform.io/hashicorp/boundary v1.0.12
+ provider registry.terraform.io/hashicorp/vault v3.8.2

Your version of Terraform is out of date! The latest version
is 1.3.1. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

Some of these might be listed bc they rely on another one with this issue.

  • boundary_credential_store_vault
  • boundary_managed_group
  • boundary_host_catalog_static

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

Stack trace from the terraform-provider-boundary_v1.0.12_x5 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 125 [running]:
github.com/hashicorp/terraform-provider-boundary/internal/provider.setFromVaultCredentialStoreResponseMap(0xc000493310?, 0x4fa28e8?, 0x1)
        github.com/hashicorp/terraform-provider-boundary/internal/provider/resource_credential_store_vault.go:146 +0x525
github.com/hashicorp/terraform-provider-boundary/internal/provider.resourceCredentialStoreVaultRead({0x4fa28e8, 0xc000f5aa20}, 0xc000f5c400, {0x185aaa0?, 0xc00047c588?})
        github.com/hashicorp/terraform-provider-boundary/internal/provider/resource_credential_store_vault.go:255 +0x171
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc000230fc0, {0x4fa2920, 0xc000f6c2a0}, 0xd?, {0x185aaa0, 0xc00047c588})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:724 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000230fc0, {0x4fa2920, 0xc000f6c2a0}, 0xc000f256c0, {0x185aaa0, 0xc00047c588})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1015 +0x585
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc00047c000, {0x4fa2920?, 0xc000f6c180?}, 0xc000119fc0)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:613 +0x4a5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc0003b8460, {0x4fa2920?, 0xc000f53b90?}, 0xc000f5a840)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:748 +0x4b1
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x1975360?, 0xc0003b8460}, {0x4fa2920, 0xc000f53b90}, 0xc00032c540, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001c01e0, {0x4fa6740, 0xc0002989c0}, 0xc000f647e0, 0xc000459410, 0x54e5290, 0x0)
        google.golang.org/[email protected]/server.go:1295 +0xb2b
google.golang.org/grpc.(*Server).handleStream(0xc0001c01e0, {0x4fa6740, 0xc0002989c0}, 0xc000f647e0, 0x0)
        google.golang.org/[email protected]/server.go:1636 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/[email protected]/server.go:932 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:930 +0x28a

Error: The terraform-provider-boundary_v1.0.12_x5 plugin crashed!

Expected Behavior

The apply should be able to refresh the state, then allow me to apply changes.

Actual Behavior

When trying to apply come configs, terraform crashes while refreshing the state.

Steps to Reproduce

  1. terraform apply
@louisruch
Copy link
Contributor

Hi @cten thank you for posting this issue, we actually found this internally early last week and already have a PR to fix it #277 this will be released shortly.

@louisruch
Copy link
Contributor

This should be resolved in v1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants