-
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
[Docs]: snowflake_grant_privileges_to_role does not generate a valid string for stored procedures (object_name) #2375
Comments
Hey @dipling82 👋 |
I ran into this, but a good workaround and possibly just 'The way' to do this is to include the args. The biggest thing is to watch the double quotes. The docs have quotes around their fully qualified resource name, which was my issue What worked was removing the escaped double quotes around the proc signature:
|
Oh, yeah. You're right. This may work. Still, the internal identifier representation could be better, but I'm glad it works for you. Closing the issue as it was somewhat resolved + we're aware of the issue and have identifier improvements on our roadmap. |
Documentation Link
https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_role
Description
Terraform CLI and Provider Versions
Terraform CLI: 1.5.6
Snowflake-Labs/snowflake Version: 0.37.1 -> 0.83.1
Use cases or problem statement
As part of our Terraform code, we group privileges using roles. In this particular case we want to manage the access to stored procedures also by roles.
Until now we have achieved this goal by using the resource "snowflake_procedure_grant". After migrating the provider though, we got a series of warnings during the TF Plan phase like the one below:
Now when we replace the code, i.e. the resource type snowflake_procedure_grant by the recommended one being snowflake_grant_privileges_to_role, the TF Plan process does not complain anymore.
But the subsequent TF Apply fails with the following error:
The affected TF code looks like this:
Summary
We are not able to generate a valid (fully qualified) procedure name like DB_NAME.SCHEMA_NAME.PROCEDURE_NAME() using the resource snowflake_grant_privileges_to_role because of the parenthesis in object_name.
How much impact is this issue causing?
We are not able to fully migrate to a recent provider version.
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: