Closed avifreege closed 5 months ago
The way you use grants is to define one privilege per resource (table/database/schema/etc) and grant it to a list of roles. If you want to create a role with read privileges and another role with read write privileges you would do:
resource snowflake_table_grant read_grant {
database_name = "database"
schema_name = "schema"
table_name = "table"
privilege = "SELECT"
roles = ["read_priv_role", "read_write_priv_role" ]
}
resource snowflake_table_grant write_grant {
database_name = "database"
schema_name = "schema"
table_name = "table"
privilege = "UPDATE"
roles = ["read_write_priv_role"]
}
Related to #210
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.
Provider Version 0.25.4
Terraform Version
0.15.4 and 0.13.0
Describe the bug
At first i worked with sets of permission to grant to different roles different privileges but some will obviously be the same, so i narrowed it down to this problem, incase granting a privilege i.e SELECT to 2 roles in different snowflake_table_grant they will be created but in the second apply they will get deleted
Expected behavior
Nothing should be changed.
Code samples and commands
After the second apply:
Could be related to the fact that the ID is the same?
Additional context
The use case here is to create for example 1 role with read privileges (SELECT) and another role with read write (SELECT and UPDATE)