-
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
[Bug]: snowflake_database with the from_database won't migrate automatically for 0.93 #2978
Comments
Hey @kamilamarcinekpgs |
## Changes - #2978 (adjust migration guide) - Fix database tests (remove tests for state upgraders, because they were incorrect and document step-by-step process for manual testing; I went through all of it) - Introduce a new parameter to address #2826 and test it - added a drop with retries just to be sure, but I don't think it should ever fail other than some kind of strange networking error between database create and drop schema - I opted to drop the schema after setting id, so if we manage to create a database, but not drop the schema, the provider will print out a warning message that the public schema couldn't be dropped and it should be done manually. The other approaches I considered: - Do it before setting ID, but that would mean the Terraform running create again and failing on CREATE DATABASE (because it's already there). - Do it like right now, but make sure the public schema is gone in the alter, but I didn't go for that, because it could lead to further complications with (what is considered "after create"; after successful create? how would we keep the state of create status? etc.). --------- Co-authored-by: Jakub Michalak <jakub.michalak@snowflake.com>
Hey 👋 |
Closing due to long inactivity. Please, create another issue if you think the problem is still not resolved. |
Terraform CLI Version
1.2.6
Terraform Provider Version
0.93
Terraform Configuration
Category
category:resource
Object type(s)
resource:database
Expected Behavior
I'm trying to upgrade from 0.92 to 0.93.
I have the old
snowflake_database resource
, with the from_database parameter set.The migration guide says:
Actual Behavior
I'm not sure what it means, that it should migrate automatically.
If I just change the version, it says "Unsupported argument".
If I change the version and remove the
from_database param
, it says "failed to upgrade the state with database created from database".What should I do to achieve the "automatic upgrade" mentioned in the migration guide?
Steps to Reproduce
.
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
No response
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: