terraform-provider-snowflake
terraform-provider-snowflake copied to clipboard
[Bug]: Panic during import of stage
Terraform CLI Version
v1.5.7
Terraform Provider Version
v0.92.0
Terraform Configuration
terraform {
required_providers {
snowflake = {
source = "Snowflake-Labs/snowflake"
version = "~> 0.61"
}
}
}
provider "snowflake" {
account = "blah1"
user = "blah2"
password = "blahsecret"
role = "ACCOUNTADMIN"
}
Category
category:sdk
Object type(s)
No response
Expected Behavior
Should have reported an error
Actual Behavior
Paniced
Steps to Reproduce
- create a stage in snowflake in one database
- create a resource like this:
resource "snowflake_stage" "stage1" {
name = "stage1"
database = snowflake_database.db.name
schema = snowflake_schema.schema1.name
storage_integration = snowflake_storage_integration.s3_my.name
url = "s3://<blah>"
file_format = "JSON"
}
- do `terraform import snowflake_stage.stage1 stage1
How much impact is this issue causing?
Low
Logs
https://gist.github.com/papanikge/8c16be53e329fb96c4b6965fc55323e0
Additional Information
No response
Would you like to implement a fix?
- [ ] Yeah, I'll take it 😎
Hi @papanikge. I think that the resource ID is incorrect. Please follow https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/stage#import, and use 'dbName|schemaName|stageName' for importing stages.
Closing due to inactivity. Solution was provided.