-
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
err = missing destination name kind in *[]snowflake.Database #1868
Comments
Snowflake case #00543276. |
As a work around, we have disabled bundle 2023_03 which appears to have resolved the issue for now: select system$disable_behavior_change_bundle('2023_03'); Assuming this is fixed in a release before the opt out period has ended, we ideally would prefer to not have to remove and re-import most of the role grants in our account from terraform state to upgrade (#1845). |
Hitting this same issue! |
also hitting this |
Hitting the same issue on 0.63 |
Hitting the same issue on terraform: 1.4.6 and snowflake 0.64 |
same issue 0.61 |
I suspect the issue might be happening as early as v0.53.0 (based on this PR). I know basically nothing about Go, but seems like it's just because the
|
this fix did not work for me. terraform plan does not recognize dbs exist. tries to create them. then apply fails. |
Same issue on 0.65 |
This started effecting us today on 0.64 |
Same issue for us as well. Are there are any plans for the fix here? |
This was fixed in 0.66 as part of the databases SDK refactoring: #1840. Essentially the driver we were using was throwing an error when a field wasn't found in the scanned struct. We have changed that to not throw an error. If this field isn't found, it will just set it to an empty string. Furthermore, we did add "Kind" https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/pkg/sdk/databases.go#L571. Please let me know after upgrading to 0.66 if this is still an issue and i would be happy to work with you to resolve it. |
i upgraded to 0.66.1 still not working. Everything was fine yesterday, stopped working today. terraform plan doesn't recognize dbs already exist. |
Same is on |
@sfc-gh-swinkler are there any plans to resolve #1845? This issue complicates upgrading from 0.64 to later versions. |
Same in 0.64 and can't use 0.66 or higher for the moment because of #1845 which seems to remove all grants realized outside of terraform. So for the moment, we are totally blocked |
Upgrading to 0.66.1 solved the issue for us. |
I encounter the same problem. |
Same issue here, 0.66.1 fixes the DBs visibility, but in the same time it wants to recreate ALL grants. |
Same same |
We think that whatever the change was that caused the original issue deleted the dbs from the terraform state file when i ran 0.61.0. So after i updated to 0.66.1 that state file was already damaged / still thinks dbs dont exist when making plan |
@sfc-gh-swinkler We also cannot upgrade to 0.66 as #1845 breaks our setup. Among other things, all the grants performed by AzureAD are dropped. |
#1845 does make this really rough! We upgraded to 0.66, which does fix the error, but we are unable to manage any snowflake grants in terraform, because if we do any grants outside of terraform are revoked. Currently I'm working around this by using lifecycle blocks to ignore the users and roles lists in grant resources, but this definitely isn't workable outside of just unblocking my pipelines |
Snowflake seems to have enabled bundle 2023_03 this week which is now in "opt-out period". In this bundle, there is a change on the SHOW DATABASES command which has a new colmun named KIND (more info on snowflake documentation). I suppose that this change is at the origin of our problems. For my part, I have disabled this bundle and trouble was solved for us. Nevertheless, bundle will be enable by default in 2 months (without possibility to disable it) so I think that we will have to upgrade to a new release of the provider and for my part, I hope that issue #1845 will be solved... |
#1872 should fix it |
@walarue were you able to find a workaround for this? I'm hesitant to upgrade to 0.66.1 because our Terraform user itself was granted permission outside of terraform |
after i updated to 0.66 and cleaned the state file it worked but causes other problems with some of the grants |
Same to us. Without any change in the terraform config or in the snowflake platform ( current snowflake version 7.20.0) 0.61 provider versionwith 0.61 current provider version, db's are not recognized anymore . And it tries to create them:
0.65 provider versionwith 0.65 provider version this error happens.
> 0.66 provider versionwith 0.66.1 and 0.66.2 db problem seems to be fixed but now it want to change role_grants config . It is adding a new parameter
|
@toni-moreno very well summarized, we are in the same situation. I was expecting some migration guide for such a big change for grants rewamp. |
In my current configuration we don't use terraform to provision real users ( we have an Azure AD integration to automatically provision real users from the Azure AD ). In this context, as a workaround to avoid removing users in the next
I hope this can help to other administrators in a similar context. ( maybe won't be a good workaround if this terraform config is used also to provision generic services users for external tooling connection, something I will need in the future) |
I second @toni-moreno comment above. Updating to version 0.66.2 along with ensuring the enable_multiple_grants flag is declared in all grants worked for me. Note that I had some set to false and some set to true depending on the resource and it honored it either way. |
Hi @sfc-gh-swinkler - thanks for approving #1872. A common pain-point from this thread is that several teams (myself included) can't upgrade to version 0.65+ because of #1845. So if that issue won't be resolved soon, is it possible to release something like a v0.64.1 that just adds the change from #1872 into 0.64.0, so that teams can use their current provider versions in the meantime? |
In case anyone is interested, we managed to get around any grant revokes by doing this:
just to be sure we additionally included the ingnore_changes = [users] as was mentioned here |
Thanks for confirming this works @susanneauxmoney , this opens up a path forward for us too. |
We are facing the same issue in 0.63. Also, we cannot upgrade the version. Is there any workaround? |
Provider Version
0.64
Terraform Version
1.4.6
Describe the bug
Snowflake release 7.13 adds the kind column to the show databases command. This behavior change was enabled by default in the 7.19 release:
I believe this is now causing the state refresh for our existing databases to fail:
Expected behavior
The state of the database refreshes successfully.
Code samples and commands
Additional context
A patch for this change would be appreciated. In particular, #1845 is a major friction to us upgrading beyond 0.64.
The text was updated successfully, but these errors were encountered: