-
Notifications
You must be signed in to change notification settings - Fork 420
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
GRANT IMPORTED PRIVILEGES TO ROLE introduced permadiff #2366
Comments
Hey @jrobison-sb |
Hey 👋, the fix for imported privileges has been merged in #2471 and will be available in the next release. As soon as the latest version appears (next week), please let us know if it fixes your bug and the issue can be closed. |
@sfc-gh-jcieslak I'm running v0.86.0 but I'm still seeing a permadiff for My resource is slightly different than above, maybe that's why?:
The repeating difference looks like this for me:
I also tried the |
@chrisweis We haven't been able to upgrade to the new provider yet because we still have to fix some breaking changes which were introduced in a prior version of the provider. So I haven't tried this yet, sorry. |
@chrisweis That's strange, I did a minimal test (very similar to your configuration) with 0.86.0 right now and it worked. Did you manually query grants on the database to see if |
@sfc-gh-jcieslak Hi Jan, not the original poster but I'm seeing the same issue with 0.86 and 0.87 My config is as follows
And when i query the state file things look good.
But on every plan/ apply I see
When I query the snowflake database share in snowsight
Let me know if this helps or if I can do some other testing to help clarify the issue. |
Thanks for the answer @gdelia-pm. The issue was/still is connected to bad Read operation. I solved it for shared databases, but It looks like the |
Fix for: #1998 and #2366 Changes - Because it's the default database it fulfills our `if` checks for futures, so added a check for `name != SNOWFLAKE` - The second check was added to make it possible to grant privileges on applications by setting object_type to DATABASE - Those cases were added to the documentation for the `snowflake_grant_privilege_to_account_role` resource - Added acceptance test that would check if SNOWFLAKE database could be made with `object_type = DATABASE` - I also added a follow-up ticket to add additional tests for applications when they are available.
Hi again @jrobison-sb @chrisweis @gdelia-pm 👋 |
Confirmed that this is now working for me. Thanks y'all! |
Hi again @sfc-gh-jcieslak, thanks for your attention on this. I was finally able to upgrade my provider version to the latest version and give this a try, but unfortunately I'm running into the same situation mentioned by @gdelia-pm, though with an additional wrinkle that I'm using Version:
Old HCL which uses a deprecated
New HCL which uses the new
Steps to reproduce:
Am I doing the import wrong, perhaps? Is it possible that the bug described by @gdelia-pm still exists but it now only exists in the import code path? Anything else I should know for this one? Thanks. |
Thanks for the response @jrobison-sb I'll try to reproduce it today. |
@jrobison-sb Could you try to import it without quotes around privileges ? |
@sfc-gh-jcieslak that worked, thank you. I don't see that anyone else has any outstanding requests in this issue so I'll go ahead and close this now. Thanks again for your efforts. Resolved by #2596 |
@sfc-gh-jcieslak Thanks for all the awesome help and improvements lately! You're restoring my faith in this Terraform provider! 😊 |
Terraform CLI and Provider Versions
Terraform Configuration
The text was updated successfully, but these errors were encountered: