You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the wrong syntax to define the ID of the schema in my import statement.
I would expect the provider to exit elegantly and report a useful error message.
Actual Behavior
The provider crashed
│ Error: Plugin did not respond
│
│ The plugin encountered an error, and failed to respond to the
│ plugin6.(*GRPCProvider).ReadResource call. The plugin logs may contain more
│ details.
╵
╷
│ Error: Request cancelled
│
│ The plugin6.(*GRPCProvider).ImportResourceState request was cancelled.
╵
Stack trace from the terraform-provider-snowflake_v0.92.0 plugin:
panic: interface conversion: sdk.ObjectIdentifier is sdk.AccountObjectIdentifier, not sdk.DatabaseObjectIdentifier
goroutine 911 [running]:
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources.ReadSchema(0xc0000e5200, {0x1cd1dc0?, 0xc00007d0a8?})
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources/schema.go:108 +0x899
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x2482c98?, {0x2482c98?, 0xc000e0a720?}, 0xd?, {0x1cd1dc0?, 0xc00007d0a8?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:783 +0x163
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000629ea0, {0x2482c98, 0xc000e0a720}, 0xc0008b68f0, {0x1cd1dc0, 0xc00007d0a8})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:1089 +0x552
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000a82c48, {0x2482c98?, 0xc000e0a5d0?}, 0xc000918e40)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:667 +0x48a
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ReadResource({{0x24999c0?, 0xc000a82c48?}}, {0x2482c98?, 0xc000e0a5d0?}, 0xc000918c80?)
github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5to6server/tf5to6server.go:215 +0x225
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.(*muxServer).ReadResource(0x2482cd0?, {0x2482c98?, 0xc000e0a2d0?}, 0xc000918c80)
github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf6muxserver/mux_server_ReadResource.go:35 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ReadResource(0xc000a8efa0, {0x2482c98?, 0xc0012d1a40?}, 0xc001316000)
github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov6/tf6server/server.go:776 +0x4c3
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ReadResource_Handler({0x2038060?, 0xc000a8efa0}, {0x2482c98, 0xc0012d1a40}, 0xc0000e4e00, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:482 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000a2e[600](https://github.com/hellofresh/snowflake-automation/actions/runs/12637132973/job/35210827802#step:6:605), {0x2482c98, 0xc0012d19b0}, {0x2494b60, 0xc000148300}, 0xc0007a6ea0, 0xc000c28c90, 0x3443aa8, 0x0)
google.golang.org/grpc@v1.63.2/server.go:1369 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc000a2e600, {0x2494b60, 0xc000148300}, 0xc0007a6ea0)
google.golang.org/grpc@v1.63.2/server.go:1780 +0x1016
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 40
google.golang.org/grpc@v1.63.2/server.go:1030 +0x135
Error: The terraform-provider-snowflake_v0.92.0 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.
Steps to Reproduce
Install v0.92.0 of the terraform provider
Attempt to import the definition of a schema that uses a dot (as opposed to a vertical bar) between the database name and schema name
How much impact is this issue causing?
Low
Logs
No response
Additional Information
I haven't tested this on a more recent version than 0.92.0. Perhaps its already been fixed.
Would you like to implement a fix?
Yeah, I'll take it 😎
The text was updated successfully, but these errors were encountered:
jamiekt
added
the
bug
Used to mark issues with provider's incorrect behavior
label
Jan 6, 2025
We've reworked the schema resource in v0.94.0 (release notes, migration guide). In the reworked resources, we change the import syntax to use a dot, and fail with a proper message when it's invalid. Please upgrade to at least this version (note that the newest one is v1.0.1).
Terraform CLI Version
1.10.3
Terraform Provider Version
0.92.0
Company Name
No response
Terraform Configuration
Category
category:resource
Object type(s)
resource:schema
Expected Behavior
I used the wrong syntax to define the ID of the schema in my import statement.
I would expect the provider to exit elegantly and report a useful error message.
Actual Behavior
The provider crashed
Steps to Reproduce
Install v0.92.0 of the terraform provider
Attempt to import the definition of a schema that uses a dot (as opposed to a vertical bar) between the database name and schema name
How much impact is this issue causing?
Low
Logs
No response
Additional Information
I haven't tested this on a more recent version than 0.92.0. Perhaps its already been fixed.
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: