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

Masking policy with multiline statement updated every time #1097

Closed
kanomaxb opened this issue Jul 5, 2022 · 3 comments
Closed

Masking policy with multiline statement updated every time #1097

kanomaxb opened this issue Jul 5, 2022 · 3 comments
Assignees
Labels
bug Used to mark issues with provider's incorrect behavior category:resource resource:masking_policy Issue connected to the snowflake_masking_policy resource

Comments

@kanomaxb
Copy link

kanomaxb commented Jul 5, 2022

Provider Version

0.36

Describe the bug

When masking policy is created using multiline string, like this:

  masking_expression = <<EOF
        case 
            when current_role() in ('ROLE_A') then 
                val 
            when is_role_in_session( 'ROLE_B' ) then 
                'ABC123'
            else
                '******'
        end
    EOF

then it is updated each time.
The plan claim that it needs to replace case with the whole expression

Expected behavior

Plan should be empty when no change in masking expression is made.

image

@kanomaxb kanomaxb added the bug Used to mark issues with provider's incorrect behavior label Jul 5, 2022
@jaloren
Copy link

jaloren commented Oct 5, 2022

It looks like when the masking policy is stored in snowflake, it will truncate newlines on the last line of text. If you wrap the multi-line string in a chomp, then terraform shows no difference.

@sfc-gh-jmichalak
Copy link
Collaborator

Hi, I'm sorry for the late response. We've released v0.96.0, which includes adjusting and fixing row access policies. Please upgrade with the migration guide.

@sfc-gh-jmichalak sfc-gh-jmichalak self-assigned this Nov 5, 2024
@sfc-gh-jmichalak
Copy link
Collaborator

Closing the issue due to inactivity.

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 category:resource resource:masking_policy Issue connected to the snowflake_masking_policy resource
Projects
None yet
Development

No branches or pull requests

4 participants