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
Grant ownership fails on object with dependent grants #152
Comments
I've worked around it by making all grants into a map (via |
is there any follow-up on this ? I am using terraform 0.25.21 but still whenever I change the view, the grants are lost from snowflake side. I need then to do a second terraform apply to get the correct grants. |
I think this ticket can be closed since it's been merged into main #153 and it's been released since https://github.com/Snowflake-Labs/terraform-provider-snowflake/releases/tag/v0.11.0. I've just tested this out and I'm correctly seeing the @ejaoua can you provide a bit more information on the issue you're seeing? (Log of the SQL that terraform runs, MVP of the terraform you're running, output of |
@Relativity74205 does the new 'on_all' & 'on_future' parameters for object grants not support #153? I am getting the same error as @saperry above with the on_all and on_future parameters set to true when trying to grant privileges objects in a cloned database, and the corresponding snowflake activity sql text does not include the |
I am seeing this problem as well. I guess it could be considered a "feature" since it is mapping new API parameters. However, it seems like a pretty important feature once one starts to get very far into using terraform to manage roles. However, it seems that all the *_grant resources need a copy_current_grants option for the case of ownership or there should be a separate resource for granting ownership similar to snowflake_role_ownership_grant except for all other grant resources. |
We are closing this issue as part of a cleanup described in announcement. If you believe that the issue is still valid in v0.89.0, please open a new ticket. |
Grant ownership fails when there is already a dependent grant on the object.
The following is an example used to create the error above
I believe the fix is to use the COPY CURRENT GRANTS clause see https://docs.snowflake.com/en/sql-reference/sql/grant-ownership.html
The text was updated successfully, but these errors were encountered: