Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snowflake_tag_association does not support column-level tagging #1201

Closed
ogr003 opened this issue Sep 5, 2022 · 2 comments · Fixed by #1380
Closed

snowflake_tag_association does not support column-level tagging #1201

ogr003 opened this issue Sep 5, 2022 · 2 comments · Fixed by #1380
Labels
bug Used to mark issues with provider's incorrect behavior

Comments

@ogr003
Copy link
Contributor

ogr003 commented Sep 5, 2022

Provider Version

0.43.0

Terraform Version

1.2.1

Describe the bug

It is not possible to create a column tag association, even though it is a supported object_type. This should execute a ALTER TABLE ... ALTER COLUMN statement, but currently executes a ALTER COLUMN-statement, which is not valid.

Expected behavior

The resource should support passing database, schema, table (only supported for column) and name as separate attributes, or parse the attributes similarly to what is done for the tag_id attribute. When the object_type is "COLUMN", an ALTER TABLE ... ALTER COLUMN statement should be executed.

Code samples and commands

# COLUMN
resource "snowflake_tag_association" "tag_associations" {
    object_name     = "DB.SCHEMA.TABLE_NAME.TEST_COLUMN"
    object_type     = "COLUMN"
    tag_id          = "TAG_DB.TAG_SCHEMA.TAG_NAME"
    tag_value       = "TEST"
}

Additional context

The statement above executes ALTER COLUMN "DB.SCHEMA.TABLE_NAME.TEST_COLUMN" SET TAG "TAG_DB"."TAG_SCHEMA"."TAG_NAME" = "TEST" which gives a syntax error as ALTER COLUMN ... is not supported on Snowflake.

@ogr003 ogr003 added the bug Used to mark issues with provider's incorrect behavior label Sep 5, 2022
@liamjamesfoley
Copy link
Contributor

➕1 this is preventing us from implementing tag based masking polices in Terraform.

@mhmcdonald
Copy link
Contributor

this is also preventing us from implementing tag-based masking with Terraform. Is anyone able to help with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to mark issues with provider's incorrect behavior
Projects
None yet
3 participants