Skip to content

Commit c4c6547

Browse files
fix(instance): Wait for the volume after resizing it (#836)
1 parent cfc6a86 commit c4c6547

File tree

2 files changed

+525
-110
lines changed

2 files changed

+525
-110
lines changed

scaleway/resource_instance_volume.go

+8
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,14 @@ func resourceScalewayInstanceVolumeUpdate(ctx context.Context, d *schema.Resourc
189189
if err != nil {
190190
return diag.FromErr(fmt.Errorf("couldn't resize volume: %s", err))
191191
}
192+
_, err = instanceAPI.WaitForVolume(&instance.WaitForVolumeRequest{
193+
VolumeID: id,
194+
Zone: zone,
195+
RetryInterval: DefaultWaitRetryInterval,
196+
}, scw.WithContext(ctx))
197+
if err != nil {
198+
return diag.FromErr(err)
199+
}
192200
}
193201

194202
return resourceScalewayInstanceVolumeRead(ctx, d, meta)

0 commit comments

Comments
 (0)