ovh / terraform-provider-ovh

Terraform OVH provider
https://registry.terraform.io/providers/ovh/ovh/latest/docs
Mozilla Public License 2.0
182 stars 133 forks source link

When importing `ovh_cloud_project` it forces replacement #667

Closed Saeden closed 1 month ago

Saeden commented 2 months ago

Describe the bug

We are trying to import an existing cloud project into terraform. We have the correct order number and the import is successful, however, when running terraform plan it shows that we have to replace the project and everything inside it because the plan and ovh_subsidiary objects are added. I assume this is not intended behaviour. The nodepools are also forced replacement because the kube_id and service_name are changed due to the replacement of the cloud_project.

Terraform Version

v1.6.6

OVH Terraform Provider Version

v0.45.0

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

[cluster.tar.gz](https://github.com/user-attachments/files/15888394/cluster.tar.gz)

Expected Behavior

The resources should be completed imported without forcing replacement.

Actual Behavior

After importing the resource it is forced to be replaced.

Steps to Reproduce

  1. terraform import ovh_cloud_project.prd_project ******(order_id)
  2. terraform plan
amstuta commented 1 month ago

Hello @Saeden, this is indeed not an expected behavior, we'll check quickly what can be done.

amstuta commented 1 month ago

A fix will be available in the next release (coming shortly), don't hesitate to open another issue if your problem persists.

Saeden commented 1 month ago

Thanks so much! Sorry for my late reply, GH did not notify me that there were replies to this issue