terraform-provider-snowflake
terraform-provider-snowflake copied to clipboard
snowflake_tag_association does not fully support objects
Provider Version
0.55.1
Terraform Version
1.3.7
Describe the bug
The snowflake_tag_association resource supports insufficient object type, for example, when using the resource with the object_type
as procecure
, it fails.
Expected behavior
The resource should support all objects as described below.
- https://docs.snowflake.com/en/user-guide/object-tagging.html#supported-objects
Code samples and commands
# PROCEDURE
resource "snowflake_tag_association" "tag_associations" {
object_type = "PROCEDURE"
object_identifier {
database = "TEST_DB"
schema = "TEST_SCHEMA"
name = "TEST_PROCEDURE_NAME"
}
tag_id = "TAG_DB.TAG_SCHEMA.TAG_NAME"
tag_value = "TEST"
}
Error:
expected object_type to be one of [ACCOUNT COLUMN DATABASE INTEGRATION PIPE ROLE SCHEMA STREAM SHARE STAGE TABLE TASK USER VIEW WAREHOUSE], got PROCEDURE
same for External Tables
Also for Database Roles
│ Error: expected object_type to be one of ["ACCOUNT" "COLUMN" "DATABASE" "INTEGRATION" "PIPE" "ROLE" "SCHEMA" "STREAM" "SHARE" "STAGE" "TABLE" "TASK" "USER" "VIEW" "WAREHOUSE"], got DATABASE ROLE
Hi 👋
We are currently working on redesigning existing resources as part of https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#supporting-all-snowflake-ga-features. As this is simply updating validation slice to match what's on the Snowflake side, we'll do it when going over snowflake_tag_association
. Unfortunately, I cannot give any approximate time when it will happen. Soon, we should provide an updated contribution guide, but as the change seems pretty simple (updating the list of valid object_types) you can try to create pr for it, so it will end up in the provider much faster.