Open JESCHO99 opened 3 months ago
Hey @JESCHO99. Thanks for reaching out to us.
We plan to rework stages soon (https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/v1-preparations/ESSENTIAL_GA_OBJECTS.MD). However, this seems to be an easy fix, i.e. we have to handle this error conditionally like e.g. in the schemas (we are doing it for every resource we redesign).
I should be able to squeeze it in in next week's release (if I can prove that this is really the cause as expected).
Hey @JESCHO99. I have prepared a fix in https://github.com/Snowflake-Labs/terraform-provider-snowflake/pull/3020. It will be released as part of v0.95.0 today or tomorrow (we have to wrap a few other pull requests before making the release).
Hey @sfc-gh-asawicki, huge thanks for the quick fix!
Hey @JESCHO99, we had to postpone the v0.95.0 release to Monday, sorry for the inconvenience.
Hey @JESCHO99 . We have just released v0.95.0 of the provider. It contains a hotfix for this issue. Please check and let us know if it works for you.
Hey @JESCHO99. Did you check the fix? If so, can we close the issue?
Terraform CLI Version
1.5.7
Terraform Provider Version
0.92.0
Terraform Configuration
Category
category:resource
Object type(s)
resource:stage
Expected Behavior
When the provided terraform code is applied in Snowflake the Database, Schema, two tables and two named stages can be deployed successful. Everything is working as expected so far. Due to manual changes on Snowflake someone executed a rename command on one of the named stages:
alter stage LOCAL_TEST_DB.TESTING.TEST_V1 rename to POST_TEST_V1;
When executing a terraform plan now in Terraform the expected behaviour would be that terraform recognizes that the defined stage no longer exists and will show a create stage in the produced plan. When this plan is executed terraform will create a new stage having the "old" name. In Snowflake there will be the renamed "old" stage and the newly created stage with the "old" name.
Actual Behavior
After a rename of an existing stage the provider runs into an error which does not longer allow for plan, apply or destroy commands. It seems that it is missing the behaviour that the provider can differ between a describe and a show objects like function. For example for tables the described process is working completely without errors.
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?