terraform-provider-snowflake
terraform-provider-snowflake copied to clipboard
Create resource snowflake_user_grant
Is your feature request related to a problem? Please describe.
Query like GRANT MONITOR ON USER "SNOWFLAKE" to role "DEVELOPER"; has to be executed to grant privilege's to see query history.
Currently this SQL cannot be done by terraform because resource like snowflake_grant_user is not available.
Describe the solution you'd like
I would like to have resource similar to https://registry.terraform.io/providers/chanzuckerberg/snowflake/latest/docs/resources/user_ownership_grant but with option to grant MONITOR privilege's . Because currently only OWNERHSHIP option is possible. Something like snowflake_user_grant where I can specify what type of grants should be added.
Example of code I'd like to implement:
resource "snowflake_user_grant" "airflow" {
on_user_name = snowflake_user.user.snowflake
privilege = "MONITOR"
roles = [
snowflake_role.developer.name,
]
}
Any updates when this can be available ?
Right now I've putted the query into our repo to codify it and executed it manually.
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.