Skip to content
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

[Feature]: Back Compatibility For Providers <1.0 #3327

Open
1 task
DustinMoriarty opened this issue Jan 7, 2025 · 4 comments
Open
1 task

[Feature]: Back Compatibility For Providers <1.0 #3327

DustinMoriarty opened this issue Jan 7, 2025 · 4 comments
Labels
category:migration Issues connected with migration to v1.0.0. feature-request Used to mark issues with provider's missing functionalities

Comments

@DustinMoriarty
Copy link

DustinMoriarty commented Jan 7, 2025

Company Name

Zoom

Use Cases or Problem Statement

We are already using the Snowflake terraform provider extensively in several repositories managing thousands of objects. I see that in version 1.0, there are several cases of breaking changes, with some providers not only being deprecated but dropped completely. Unlike a normal software library, when a terraform provider makes a breaking change, it is not simply a matter of refactoring code. Existing terraform state files must be migrated.

In the case of a new resource replacing an old resource, each resource must be removed and then imported. This process is often very manual and must be repeated differently in each environment. Then we must make sure that the generated plan will not make any changes to the actual resource under terraform control. With a real terraform configuration controlling many different resources, removing and re-importing resources is a very big task which also introduces risks of unintended changes to infrastructure. This introduces a large unplanned project for users without any business value to justify it. We will end up stuck on the 0.* releases for those existing repositories that no one has time to migrate.

Category

category:resource

Object type(s)

No response

Proposal

For the resources which where deprecated in version 1, release a 1.* version which maintains the previous resource interfaces. A deprecation note can be added. However, the resource should not be dropped. Terraform resources need to be stable interfaces that do not change every time a new developer takes over the project. If someone wants to make a better resource, great. However, there are very few cases where a resource should no longer be supported. If changes are needed, it is better to make incremental changes to the same resource while maintaining a consistent resource type.

How much impact is this issue causing?

High

Additional Information

This will prevent us from being able to update to 1.0 for our existing terraform repos. It also degrades our overall confidence in using the Snowflake terraform provider in general because it shows that Snowflake is not maintaining a stable interface.

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@DustinMoriarty DustinMoriarty added the feature-request Used to mark issues with provider's missing functionalities label Jan 7, 2025
@sfc-gh-asawicki sfc-gh-asawicki added the category:migration Issues connected with migration to v1.0.0. label Jan 7, 2025
@sfc-gh-asawicki
Copy link
Collaborator

Hey @DustinMoriarty. Thanks for reaching out to us.

A short context for all the breaking changes you are referring to and the state of the provider:

@sfc-gh-asawicki
Copy link
Collaborator

Please contact your Snowflake account manager and ask them to set up a meeting with Swathi and me, so that we can work something out.

@sramshaw-yolabs
Copy link

what in the actual....?

 Error: Move Resource State Not Supported
│ 
│ The "snowflake_account_role" resource type does not support moving resource state across resource types.

Why in the world do you deprecate/rename a resource with NO changes to the spec and then force people to manually state rm and state import? when this should be easily supporting the moved tf block?

@sfc-gh-jcieslak
Copy link
Collaborator

Hey @sramshaw-yolabs 👋
The grant resource deprecation and removal were added for consistency purposes and were an addition to already ongoing grant-related resource refactoring and deprecation/removal of other old grant resources. We considered the moved block as soon as it was released, but unfortunately, it's not possible to use it in Terraform's SDKV2 that we currently use for provider development. The feature is only available in the new plugin framework that we are planning to adopt someday. For now, there's not much we can provide from our side, as the tools we are working with are pretty limiting in that regard. We filed a ticket in the SDKV2 repository to see if this feature could also be implemented in the SDKV2, you can follow it here. Thank You for your feedback, we are aware that the migration is not an easy task, but there's little we can do at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:migration Issues connected with migration to v1.0.0. feature-request Used to mark issues with provider's missing functionalities
Projects
None yet
Development

No branches or pull requests

4 participants