terraform-provider-cloudamqp icon indicating copy to clipboard operation
terraform-provider-cloudamqp copied to clipboard

Update Terraform Plugin SDK v2.+

Open tbroden84 opened this issue 2 years ago • 7 comments

Update the used legacy Terraform Plugin SDK v1.+ to latest Terraform Plugin SDK v2.+

Go over breaking changes and solve the issues.


Updating the SDK would help:

  • https://github.com/cloudamqp/terraform-provider-cloudamqp/issues/214

tbroden84 avatar Mar 21 '22 08:03 tbroden84

Also investigate https://www.terraform.io/plugin/sdkv2/resources/retries-and-customizable-timeouts

tbroden84 avatar May 18 '22 09:05 tbroden84

Only need to go to SDK v2.+, if we want to support migration from current versions to Terraform Plugin Framework. Otherwise just a clean new start with the latest version.

tbroden84 avatar Aug 02 '23 09:08 tbroden84

I'm not sure I follow... what is that migration?

What will using SDK v2 bring us? Besides using something newer which is almost always better because I guess SDK v1 could stop being supported.

dentarg avatar Aug 02 '23 09:08 dentarg

What will using SDK v2 bring us?

Oh, just saw https://github.com/cloudamqp/terraform-provider-cloudamqp/issues/214#issuecomment-1661826114

dentarg avatar Aug 02 '23 09:08 dentarg

We are currently running SDK v1.17.2, while latest version is Terraform Plugin Framework. Between them there is SDK v2.+ and there is migration steps between the three different Plugin major versions. Would say only reason for us to go SDK v2.+ is to make it possible for our users to migrate their current implementation of our provider v1.27.0 all the way to Framework.

SDK v1.+ provider can be migrated to SDK v2.+ SDK v2.+ provider can be migrated to Framework

A lot of improvements in Framework and quite different code syntax than we currently use. For CloudKarafka we could start from scratch and go more or less directly to Framework: https://github.com/CloudKarafka/terraform-provider-cloudkarafka

tbroden84 avatar Aug 02 '23 11:08 tbroden84

How does it matter to the end-user if we use SDK v1, SDK v2 or Plugin Framework? Has the Terraform state format changed between them? So if we make a release using SDK v2 without any migration in it, it wont be able to understand state that was created with our provider using the SDK v1?

dentarg avatar Aug 02 '23 11:08 dentarg

Hmm good question, worth looking in to. Doing my earlier investigation just been focused on our code.

tbroden84 avatar Aug 02 '23 12:08 tbroden84