terraform-provider-snowflake
terraform-provider-snowflake copied to clipboard
Forced modify table when column using sequence nextval as default
Terraform CLI and Provider Versions
Terraform v1.6.6
required_providers { snowflake = { source = "Snowflake-Labs/snowflake" version = "0.87.2" }
Terraform Configuration
resource "snowflake_table" "report" {
name = "REPORT"
database = snowflake_database.databases["SFAPPS"].name
schema = snowflake_schema.schemas["DYNRPT"].name
column {
name = "ID"
type = "NUMBER(38,0)"
nullable = false
default {
sequence = "${snowflake_database.databases["SFAPPS"].name}.${snowflake_schema.schemas["DYNRPT"].name}.REPORT_SEQ"
}
}
....
# snowflake_table.report will be updated in-place
~ resource "snowflake_table" "report" {
id = "DEV_SFAPPS|DYNRPT|REPORT"
name = "REPORT"
# (7 unchanged attributes hidden)
~ column {
name = "ID"
# (2 unchanged attributes hidden)
~ default {
~ sequence = "\"DEV_SFAPPS\".\"DYNRPT\".\"REPORT_SEQ\"" -> "DEV_SFAPPS.DYNRPT.REPORT_SEQ"
}
}
# (15 unchanged blocks hidden)
}
...
snowflake_table.report: Modifying... [id=DEV_SFAPPS|DYNRPT|REPORT]
Expected Behavior
To not report there is updated in-place when nothing changed
Actual Behavior
terraform apply -> always report there is an updated in-place
Steps to Reproduce
terraform apply
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
It is bug introduced after version 0.84.1
Hey @acakovacevic. Thanks for reaching out to us.
The identifiers are a tricky thing. We will address this topic soon as part of: https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#identifiers-rework.
Hey @acakovacevic 👋 Thanks for reporting the issue. This will be fixed in the next release (somewhere around next week).
Hey 👋 Yesterday, we released a new version of the provider (v0.95.0) that shouldn't produce any plans related to quoting. We also prepared a document concluding identifiers rework (here) that should clear things up regarding identifiers.
Closing due to long inactivity. Please, create another issue if you think the problem is still not resolved.