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

Add ability to set a masking policy on a tag #1116

Closed
wesleyhillyext opened this issue Jul 12, 2022 · 0 comments · Fixed by #1143
Closed

Add ability to set a masking policy on a tag #1116

wesleyhillyext opened this issue Jul 12, 2022 · 0 comments · Fixed by #1143
Labels
feature-request Used to mark issues with provider's missing functionalities

Comments

@wesleyhillyext
Copy link

Snowflake now has the ability to set a masking policy on a tag object. See Tag-based Masking Policies.

For maximum flexibility given the variety of management styles Snowflake supports for tags and masking policies, this could take the form of a new snowflake_tag_masking_policy_attachment resource. Another benefit of that approach is it neatly resolves an issue arising from this pair of rules from the documentation:

  • A tag cannot be dropped if it is assigned to a masking policy.
  • A masking policy cannot be dropped if it is assigned to a tag.

Having a separate attachment resource which depends on both the tag and masking policy objects means that terraform will destroy the attachment before destroying the tag or masking policy.

The structure of the resource would be something like:

resource "snowflake_tag_masking_policy_attachment" "test" {
    tag_database = "test_db"
    tag_schema = "test_schema"
    tag_name = "tag_name"

    masking_policy_database = "test_db"
    masking_policy_schema = "test_schema"
    masking_policy_name = "policy_name"
}
@wesleyhillyext wesleyhillyext added the feature-request Used to mark issues with provider's missing functionalities label Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Used to mark issues with provider's missing functionalities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant