Challenges and Best Practices for Upgrading Terraform Snowflake Provider to 1.0.0 #3335
Replies: 1 comment 2 replies
-
Hey @santhoshreddych. Thanks for reaching out to us. From your question I understand that your concerns come mostly from the grant resources migrations. This migration is unfortunately not trivial. The guidelines you reference were meant to mainly clarify how to approach the no-downtime migration properly. They were not meant to promote any method over the others. We hoped that they would be enough to craft proper automation on the user side (because of the wide variety of setups our users have). Also, we hoped that almost a year (the first new grant resources were added in v0.85.0) would be enough to tackle the migration from the old grant resources. Unfortunately, more and more users are approaching us with grant resource migration problems. What we can recommend now is to:
All the recommendations above still require automation on the user side. We can't completely eliminate the need for manual work, but because of the increasing number of requests, we will discuss internally how we can ease the migration using our limited resources. Our current idea would be to create simple scripts that can be reused or that can at least serve as a base/inspiration for the user-side migration automation. They may contain (remember, these are still just ideas and not the features we guarantee):
We are currently discussing the scope for the next months in the provider. We will make sure we discuss the above ideas next week. The high V1 adoption is our biggest objective before reaching GA, and grant resources migration looks like the biggest blocker for our customers, so we may be able to make the ideas above a high-priority topic. If you have any other ideas on how we can help you with the migration, please don't hesitate to share them. |
Beta Was this translation helpful? Give feedback.
-
Hello Team,
I’m looking to learn and understand how other teams are managing their Terraform Snowflake provider upgrades.
We are currently on version
0.92.0
and working towards upgrading to1.0.0
. Even upgrading one version at a time still poses same challenges with deprecated resources.I’ve reviewed the Migration Guide and the Resource Migration Guide. While these resources are helpful to some extent, the suggested approaches don’t seem to scale well at an enterprise level. So far, the upgrade process has been quite challenging, especially when dealing with deprecated resources.
We use multiple submodules to dynamically create Snowflake objects and grants. Below are some of the key challenges we’ve encountered during the upgrade:
Generating Terraform imports as described in 3.1.2 for every resource is highly error-prone and nearly impossible to manage.
We attempted the import approach mentioned in 3.2.1. However, the current Terraform version we use (
1.4.2
) does not supportfor_each
in import blocks. Upgrading Terraform to1.7.2
revealed that import blocks are not supported in child modules, which has left us at a roadblock.I’d love to hear how others are approaching this upgrade and managing these challenges. Any insights or suggestions would be greatly appreciated!
Few of the deprecated resources we currently use:
Beta Was this translation helpful? Give feedback.
All reactions