-
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
Replacing snowflake_grant_privileges_to_role resources still fails at apply time with validation error #2749
Comments
Hey @mmyers5 |
Hey 👋 |
Hi again, |
We are getting the same error on Terraform v1.7 and provider v0.89. It seems exactly the same pattern as #2069 and #2068. Our plan looks like this:
which fails with:
@sfc-gh-jcieslak In this case the privileges are only empty because the resource is being destroyed. Our existing resource has |
Hey @inesplc 👋 |
Yeah the issue in this case was the view was mis-labeled as a table. It didn't throw an exception on applying when the resource had the wrong label, but it did when we tried to fix the label. |
Yeah, it didn't throw, because that behavior is allowed by Snowflake. Because right now we're mainly focusing on GA objects refactoring, we have to move the discussions around it for now. The solution for now is to use table object type with table identifier and the same for views. |
I see a similar behavior when destroying/replacing SELECT grant on an EVENT TABLE.
The following error occurs:
Using: Terraform 1.6.6 |
I'm getting the same error as @simonepm. It happens only while revoking privileges from EVENT TABLE. Other tables/schemes/databases are not affected.
Using: |
Hey @simonepm @jarach 👋 |
Hi @sfc-gh-jcieslak , Full note for others having the same or similar problem:
Big thanks! |
Closing as the issue has been resolved |
Terraform CLI and Provider Versions
Terraform v1.5.4
on linux_arm64
Terraform Configuration
Expected Behavior
When I switch the object type from
"TABLE"
to"VIEW"
, it should replace the object. Here is the plan:Actual Behavior
Here is the apply:
When I tried to reset the state by removing the resource block entirely, the apply always failed. I resolved by altering the statefile with
terraform state rm
.I see that this issue was addressed recently and fixed as of provider version 0.87.1, but as indicated I was on 0.87.2.
Steps to Reproduce
terraform apply
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
This looks like a duplicate of #2068 and #2069
The text was updated successfully, but these errors were encountered: