snowflake_grant_privileges_to_account_role - revokes #3087
-
Hi Community, Hopefully this isn't silly question.... I have migrated to use new resource snowflake_grant_privileges_to_account_role for table and dynamic table grants. The RBAC structure is environmental roles for example I have Dev, System test, UAT and Production environments. Within Dev databases, roles would be lead_developer_dev, developer_dev and in production roles would be called lead_developer_prod, developer_prod. This is the use case:
I am wondering if there is a specific parameter in snowflake_grant_privileges_to_account_role resource, when plural is used, to revoke outbound_privileges, similar to what's available in resource for snowflake_grant_ownership? And is there a flag to enforce re-apply of grants, even when nothing has changed? Snippet below of code for table grants from our RBAC code. `{% if kind == "TABLES" %}
As part of testing, deleting statefile so it creates new, the grants for correct environment roles will get applied successfully on table objects. Of course deleting statefile is never the solution! :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @tabu69 👋
|
Beta Was this translation helpful? Give feedback.
Hey @tabu69 👋
Sorry, you waited so long. To answer both questions:
snowflake_grant_privileges_to_account_role
the only privileges granted on the object; other privileges will be revoked. Right now, thesnowflake_grant_privileges_to_account_role
only cares about specified privileges and whether they're granted or not.always_apply
flag grants privileges on everyterraform apply
. Is that something you were looking for?