diff --git a/internal/namespaces/instance/v1/custom_server_delete.go b/internal/namespaces/instance/v1/custom_server_delete.go index 377d752c6..32f88e487 100644 --- a/internal/namespaces/instance/v1/custom_server_delete.go +++ b/internal/namespaces/instance/v1/custom_server_delete.go @@ -234,9 +234,11 @@ func serverDeleteVolume(volume *instance.VolumeServer, instanceAPI *instance.API var err error if volume.VolumeType == instance.VolumeServerVolumeTypeSbsVolume { + volumeAvailable := block.VolumeStatusAvailable _, err = blockAPI.WaitForVolumeAndReferences(&block.WaitForVolumeAndReferencesRequest{ - Zone: volume.Zone, - VolumeID: volume.ID, + Zone: volume.Zone, + VolumeID: volume.ID, + VolumeTerminalStatus: &volumeAvailable, }) if err != nil { return errorDeletingResource(err)