stackitcloud / terraform-provider-stackit

The official Terraform provider for STACKIT
https://registry.terraform.io/providers/stackitcloud/stackit
Apache License 2.0
56 stars 15 forks source link

provide a way to migrate `stackit_argus_instance` to `stackit_observability_instance` #532

Open mouhsen-ibrahim opened 2 months ago

mouhsen-ibrahim commented 2 months ago

The latest version of the provider renamed the resource stackit_argus_instance to stackit_observability_instance, if I change the resource type in my code and use the moved block to use the new type without re-creating the resources then I get this error from terraform

│ Error: Unsupported `moved` across resource types
│ 
│   on ../../modules/argus/argus.tf line 10:
│   10: moved {
│ 
│ The provider "registry.terraform.io/stackitcloud/stackit" does not support moved operations across resource types and providers.

My moved block looks like this

moved {
  from = stackit_argus_instance.api
  to = stackit_observability_instance.api
}

You must in the provider add support for migrating from stackit_argus_instance to stackit_observability_instance, here is the developer's documentation for doing this https://developer.hashicorp.com/terraform/plugin/framework/resources/state-move

Can you please handle this ASAP so we can migrate to the new type?

joaopalet commented 2 months ago

Hi Mouhsen,

Thanks for the suggestion, we will have a look and plan it it soon. We will inform you here once it's released.