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

Error: The terraform-provider-snowflake_v0.76.0 plugin crashed #2263

Closed
GomathiMa opened this issue Dec 13, 2023 · 2 comments
Closed

Error: The terraform-provider-snowflake_v0.76.0 plugin crashed #2263

GomathiMa opened this issue Dec 13, 2023 · 2 comments
Labels
bug Used to mark issues with provider's incorrect behavior category:resource resource:user Issue connected to the snowflake_user resource

Comments

@GomathiMa
Copy link

Terraform CLI and Provider Versions

0.76.0

Terraform Configuration

resource "snowflake_user" "user" {
  for_each = {
    for user in var.grants : user.id => user
  }
  name       = each.value.id
  login_name = each.value.id
  email      = each.value.id
  lifecycle {
    ignore_changes = [
      first_name,
      last_name,
    ]
  }
}

Expected Behavior

Users to be created in snowflake

Actual Behavior

Error: Plugin did not respond

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

Stack trace from the terraform-provider-snowflake_v0.76.0 plugin:

panic: interface conversion: sdk.ObjectIdentifier is sdk.SchemaObjectIdentifier, not sdk.AccountObjectIdentifier

goroutine 56 [running]:
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources.ReadUser(0x4000a0eb00, {0x1583d20?, 0x40009b56c0?})
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources/user.go:245 +0x884
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources.CreateUser(0x0?, {0x1583d20?, 0x40009b56c0?})
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources/user.go:237 +0xb34
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x18e6820?, {0x18e6820?, 0x400106c240?}, 0xd?, {0x1583d20?, 0x40009b56c0?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:766 +0x134
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x4000a40460, {0x18e6820, 0x400106c240}, 0x40010740d0, 0x4000a0e980, {0x1583d20, 0x40009b56c0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:909 +0x874
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x400097a048, {0x18e6820?, 0x400106c060?}, 0x4001013900)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/grpc_provider.go:1060 +0xb5c
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ApplyResourceChange({{0x1903b20?, 0x400097a048?}}, {0x18e6820, 0x400106c060}, 0x0?)
github.com/hashicorp/terraform-plugin-mux@v0.12.0/tf5to6server/tf5to6server.go:37 +0x58
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.(*muxServer).ApplyResourceChange(0x18e6778?, {0x18e6820?, 0x4001035d10?}, 0x40010138b0)
github.com/hashicorp/terraform-plugin-mux@v0.12.0/tf6muxserver/mux_server_ApplyResourceChange.go:36 +0x184
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ApplyResourceChange(0x4000940c80, {0x18e6820?, 0x4000fde6c0?}, 0x4000fd8460)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov6/tf6server/server.go:857 +0x3b8
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ApplyResourceChange_Handler({0x1530160?, 0x4000940c80}, {0x18e6820, 0x4000fde6c0}, 0x4000fd83f0, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:467 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x40004af2c0, {0x18f6500, 0x40009f6340}, 0x4001020240, 0x40006f9080, 0x2553438, 0x0)
google.golang.org/grpc@v1.58.2/server.go:1376 +0xb90
google.golang.org/grpc.(*Server).handleStream(0x40004af2c0, {0x18f6500, 0x40009f6340}, 0x4001020240, 0x0)
google.golang.org/grpc@v1.58.2/server.go:1753 +0x80c
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/grpc@v1.58.2/server.go:998 +0x84
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.58.2/server.go:996 +0x164

Error: The terraform-provider-snowflake_v0.76.0 plugin crashed!

Steps to Reproduce

  1. terraform apply

How much impact is this issue causing?

High

Logs

No response

Additional Information

No response

@GomathiMa GomathiMa added the bug Used to mark issues with provider's incorrect behavior label Dec 13, 2023
@sfc-gh-asawicki
Copy link
Collaborator

Hey @GomathiMa. Thanks for reporting the issue.

The most likely cause is described in #2058. You can follow the advice from the comment: #2058 (comment). Additionally, we will release a new version today or tomorrow containing #2256, which should solve this problem.

@sfc-gh-asawicki
Copy link
Collaborator

Hey @GomathiMa, I will close this issue; please open a new one if you are experiencing this problem in the more recent versions of the provider.

@sfc-gh-jcieslak sfc-gh-jcieslak added category:resource resource:user Issue connected to the snowflake_user resource labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to mark issues with provider's incorrect behavior category:resource resource:user Issue connected to the snowflake_user resource
Projects
None yet
Development

No branches or pull requests

3 participants