cli: Use meta response index to start monitoring volume create. (#25514)

This commit is contained in:
James Rasell
2025-03-25 15:00:46 +01:00
committed by GitHub
parent 1ff8d7b3ab
commit ea25503705

View File

@@ -52,7 +52,7 @@ func (c *VolumeCreateCommand) hostVolumeCreate(
Volume: vol,
PolicyOverride: override,
}
resp, _, err := client.HostVolumes().Create(req, nil)
resp, meta, err := client.HostVolumes().Create(req, nil)
if err != nil {
c.Ui.Error(fmt.Sprintf("Error creating volume: %s", err))
return 1
@@ -75,7 +75,7 @@ func (c *VolumeCreateCommand) hostVolumeCreate(
c.Ui.Output(fmt.Sprintf(
"==> Created host volume %s with ID %s", vol.Name, vol.ID))
volID = vol.ID
lastIndex = vol.ModifyIndex
lastIndex = meta.LastIndex
}
if vol.Namespace != "" {