ovh / terraform-provider-ovh

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

[BUG] ovh_cloud_project_gateway import doesn't work #633

Closed neurovul closed 4 months ago

neurovul commented 4 months ago

Hello,

It appears that the import function for ovh_cloud_project_gateway is not functioning properly. Despite attempting various methods, it continually returns an error stating that it cannot locate the resource.

Upon examining the code here, it seems that only two arguments are used:

However, to retrieve a gateway, the OVH API requires serviceName, id, and regionName. While I'm not entirely certain, it seems we should incorporate parsing for regionName during the import process.

It would be helpful to include documentation along with an import example.

If necessary, I'm willing to attempt a fix, although I'm not experienced in editing Terraform providers.

amstuta commented 4 months ago

Hello @neurovul, thanks for opening this issue. You're completely right, the region value is needed to fetch the resource but not retrieved at import. We'll fix this quickly and add an example in the documentation.

amstuta commented 4 months ago

@neurovul, issue will be fixed in the next release

neurovul commented 4 months ago

Hello @amstuta, great, thanks a lot for your reactivity