-
Notifications
You must be signed in to change notification settings - Fork 427
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
fix: Allow multiple resources of the same object grant #824
fix: Allow multiple resources of the same object grant #824
Conversation
@alldoami Any idea of if this will be merged in? If not we'll have to plan workarounds for our RBAC solution. |
/ok-to-test sha=7e77feb |
Integration tests success for 7e77feb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@daniepett and @alldoami This change broke my existing Terraform(state) any fix for this or could this be reverted? I keep getting 5 or 6 fields allowed error for my existing snowflake_role_grants resources |
@alldoami @daniepett We would like to move to version > 0.25.x but this mayor breaking change is blocking, with this change all grant ID's are changed meaning when you run Terraform with has an existing state with the generated ids that predates this commit you can't continue or deploy your resources. Is there an automatic fix for this? If not please revert until there is one |
@alldoami @daniepett @ChrisIsidora - we’re facing the exact same issue. I maybe a state migration function should have been included? |
@ChrisIsidora @robbruce I’ll open a PR for a fix in the next couple of days 👍 |
@alldoami @ChrisIsidora @robbruce PR with a fix is available here #923 |
@daniepett just merged! I'll create a release today. @robbruce @ChrisIsidora try out the new release and let us know if you have the same issue! |
@daniepett Thanks for the quick fix waiting for it to be released to test it. |
@alldoami @robbruce @daniepett The issue that I pointed up previously with role grants is still not solved in 0.28.7 Please solve and release asap, we are blocked for quite some time now because of this. |
@daniepett could you take a further look? If we can't get this fixed, wondering if we should revert the changes and test further before merging. |
These changes allows grants to multiple roles to be done in different resources.
This change comes with the caveat that grants applied OUTSIDE Terraform will not be revoked. This is because the resource won't know if it's maintained by another resource or created elsewhere
Previously the resource id had the structure:
resourceName|schemaName|ObjectName|Privilege|GrantOption
For example: DWH|TEST||USAGE|FALSE
New structure:
resourceName|schemaName|ObjectName|Privilege|Roles|GrantOption
Test Plan
References