-
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
Can't create roles #3022
Comments
Hey @aleenprd 👋 tldr; To create a role you have to have at least the |
But the Snowflake user I am connected with has securityadmin, sysadmin and useradmin and I declared these 3 providers in main.tf. is there something else I need to do? Terraform is not able to use the appropriate role? |
No, you have to specify which provider should be used for every resource (or in this case, you don't specify it and I believe, Terraform takes the default one without an alias). You created 3 providers, the default one (with SYSADMIN role) and two other ones with aliases. To use the correct provider you have to use the provider meta argument on the role resource with securityadmin alias to use that provider configuration. |
@sfc-gh-jcieslak thank you so much, I was not aware of that. I thought the snowflake-labs somehow handled this logic in the backend :) |
Closing as the issue was resolved. If you still have any issues regarding this particular configuration, go ahead and ask; for any other problem, please create another gh issue. |
Terraform CLI Version
OpenTofu v1.8.1
Terraform Provider Version
Terraform Configuration
Category
category:resource
Object type(s)
resource:role
Expected Behavior
I expect it to create the role
Actual Behavior
Using the configuration below, I get the following error:
PS: the same happens if I use account_role
Steps to Reproduce
Copy configuration (use own account), plan and apply.
How much impact is this issue causing?
High
Logs
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: