terraform-provider-snowflake
terraform-provider-snowflake copied to clipboard
Using sequences as default column values doesn't work
Provider Version
0.32.0
Terraform Version
v1.1.8
Describe the bug
Using sequences as default values for columns doesn't work. When adding a snowflake_sequence resource and using that as default value for a column, terraform plan shows the change but when applied the column default setting in the database doesn't change. terraform plan continues to show the change after that.
Expected behavior
The default setting of the column should include the sequence.
Code samples and commands
resource "snowflake_sequence" "sequence" {
database = var.database_name
schema = var.schema_name
name = "sequence"
}
resource "snowflake_table" "skills" {
database = var.database_name
schema = var.schema_name
name = "name"
column {
name = "ID"
type = "VARCHAR(255)"
nullable = false
default {
sequence = snowflake_sequence.sequence.name
}
}
Hey Emanuel, this should work if you pass in snowflake_sequence.sequence.fully_qualified_name. More info here.
We are closing this issue as part of a cleanup described in announcement. If you believe that the issue is still valid in v0.89.0, please open a new ticket.