cloudamqp / terraform-provider-cloudamqp

Terraform Provider for CloudAMQP
https://registry.terraform.io/providers/cloudamqp/cloudamqp
Mozilla Public License 2.0
35 stars 39 forks source link

Terraform 0.11.14 unable to upgrade to new plans #164

Closed riechst1 closed 2 years ago

riechst1 commented 2 years ago

I am trying to upgrade our legacy plan because they are being phased out. But when I try to run the plan it shows it tries to destroy and create new resources. Is there a way to go from legacy plan => new plan without destroying the current instance?

Software version: Terraform: 0.11.14 Cloudamqp: 1.8.1

Current behavior:

` Terraform will perform the following actions:

-/+ module.cloudamqp.cloudamqp_instance.this (new resource required) id: "198524" => (forces new resource) apikey: => (attribute changed) dedicated: "true" => host: "cold-purple-caterpillar.rmq4.cloudamqp.com" => name: "delta-rabbitmq" => "delta-rabbitmq" no_default_alarms: "true" => "true" nodes: "1" => "1" plan: "bunny" => "bunny-1" (forces new resource) ready: "" => region: "azure-arm::westus" => "azure-arm::westus" rmq_version: "3.8.6" => "3.8.6" tags.#: "8" => "8" tags.0: "rabbitmq" => "rabbitmq" tags.1: "azure" => "azure" tags.2: "pltsci" => "pltsci" tags.3: "engineering" => "engineering" tags.4: "delta" => "delta" tags.5: "development" => "development" tags.6: "infrastructure" => "infrastructure" tags.7: "delta-rabbitmq" => "delta-rabbitmq" url: => (attribute changed) vhost: "azvchdat" => `

Desire behavior:

~ module.cloudamqp.cloudamqp_instance.this plan: "bunny" => "bunny-1"

dentarg commented 2 years ago

Software version: Cloudamqp: 1.8.1

This is too old. The CHANGELOG notes that support for switching to the new plans was added in v1.9.0.

Note that v1.9.0 is very old too; there have been changes to the underlying API that require the use of a newer provider version, for certain things to work correctly. Please use the latest version: v1.19.0

I just tried bunny -> bunny-1 myself in azure-arm::westus with v1.19.0, it do take some time to complete (23 minutes with my test cluster without any significant load) but it works.

riechst1 commented 2 years ago

Software version: Cloudamqp: 1.8.1

This is too old. The CHANGELOG notes that support for switching to the new plans was added in v1.9.0.

Note that v1.9.0 is very old too; there have been changes to the underlying API that require the use of a newer provider version, for certain things to work correctly. Please use the latest version: v1.19.0

I just tried bunny -> bunny-1 myself in azure-arm::westus with v1.19.0, it do take some time to complete (23 minutes with my test cluster without any significant load) but it works.

Thanks @dentarg for the quick answer. I had a feeling an upgrade was going to be needed for this.