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
Unsetting a database tag (removing tag { } from snowflake_database resource) fails with "Syntax error: unexpected '='."
In Snowflake Query History, you can see the following statement generated:
ALTER DATABASE "TESTDB" UNSET TAG "ACCOUNTING_NUMBER" = "12345"
This is in two ways wrong:
The tag is not addressed with a fully qualified name, only with the tag object name
UNSET TAG should have no value given
Expected behavior
The database tag is removed.
Code samples and commands
Before:
resource "snowflake_database" "snowflake_db" {
for_each = { for s in local.snowflake_db : s.name => s }
name = each.value.name
data_retention_time_in_days = each.value.data_retention_time_in_days
tag {
name = "ACCOUNTING_NUMBER"
value = var.accounting_number
database = var.tag_database
schema = var.tag_schema
}
}
After:
resource "snowflake_database" "snowflake_db" {
for_each = { for s in local.snowflake_db : s.name => s }
name = each.value.name
data_retention_time_in_days = each.value.data_retention_time_in_days
}
Diff:
- tag {
- name = "ACCOUNTING_NUMBER"
- value = var.accounting_number
- database = var.tag_database
- schema = var.tag_schema
- }
Additional context
We're trying to move to the new snowflake_tag_association resource (introduced in #1187), but the plan execution fails at least once (seems like the tfstate is updated during a plan - like in #863), which is hindering at best.
The text was updated successfully, but these errors were encountered:
Provider Version
0.46.0 (latest as of report)
Terraform Version
1.2.2
Describe the bug
Unsetting a database tag (removing tag { } from snowflake_database resource) fails with "Syntax error: unexpected '='."
In Snowflake Query History, you can see the following statement generated:
This is in two ways wrong:
Expected behavior
The database tag is removed.
Code samples and commands
Before:
After:
Diff:
Additional context
We're trying to move to the new
snowflake_tag_association
resource (introduced in #1187), but the plan execution fails at least once (seems like the tfstate is updated during a plan - like in #863), which is hindering at best.The text was updated successfully, but these errors were encountered: