scaleway-sdk-go icon indicating copy to clipboard operation
scaleway-sdk-go copied to clipboard

`Zone` not set for sbs_volumes in ListServers, Causing Terraform Errors

Open 0xbe7a opened this issue 1 year ago • 1 comments

The sbs_volumes do not have the Volumes.[].Zone set when using ListServers. This conflicts with the behavior described in https://github.com/scaleway/scaleway-sdk-go/blob/master/api/instance/v1/instance_sdk.go#L1503, as the client interprets this as "default."

To reproduce the issue:

  1. Create a server with attached sbs_volumes.
  2. Run scw instance server list --json.
  3. Observe that the zone is not set for the attached sbs_volumes.

This causes issues, such as breaking the Terraform state update when using multiple zones. The Terraform provider attempts to query the volume using the default region instead of the correct volume region for sbs_volumes, resulting in the following error: │ Error: failed to read instance volume 8fa94ad1-[redacted]: scaleway-sdk-go: resource volume with ID 8fa94ad1-[redacted] is not found.

0xbe7a avatar Oct 23 '24 13:10 0xbe7a

Hi ! Thanks for reporting this issue. I forwarded the issue to the instance team. For now I will circumvent this in Terraform.

Codelax avatar Oct 24 '24 07:10 Codelax

I tried to reproduce the same behavior. It seems the API now return server' volumes zone.

Codelax avatar Dec 13 '24 14:12 Codelax