-
Notifications
You must be signed in to change notification settings - Fork 424
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
terraform import snowflake_role_grants only imports role name #596
Comments
If I'm reading this right, I think the bug may be due to #520. Specifically, if we look at roles, https://github.com/chanzuckerberg/terraform-provider-snowflake/blob/e0d74be5029f6bf73915dee07cadd03ac52bf135/pkg/resources/role_grants.go#L114-L119 the provider will only import a role that's already in the provider's state, in It would appear this was introduced to get around #189. However, this seems to have had the affect that importing these resources will not fetch and populate the existing role grants. I don't know enough about TF providers to know the best way around this at the moment. |
I faced the same issue, but I can't understand why: I have a TF script in which the import of role grants worked correctly (Terraform 1.0.8, chanzuckerberg/snowflake 0.25.25, last updated 15/11/2021), but now, with the same code and import statements, the import does not fill the |
Wanted to verify as well, using Even after importing all the roles into the tfstate first, it only shows an empty list. Haven't tested |
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.10
Terraform Version
1.0.1
Describe the bug
Given a role (ROLE_NAME) granted to other roles (CHILD_ROLE_1, CHILD_ROLE_2) and other users (USER_1, USER_2).
When using the command
terraform import snowflake_role_grants.example ROLE_NAME
, the console output says that everything worked fine.However, when looking at the output of terraform show, only the role name has been imported
Expected behavior
The output of terraform show should be the following :
The text was updated successfully, but these errors were encountered: