diff --git a/.changelog/11853.txt b/.changelog/11853.txt new file mode 100644 index 000000000..78592bfe1 --- /dev/null +++ b/.changelog/11853.txt @@ -0,0 +1,3 @@ +```bug +csi: Fixed a bug in `volume deregister` and `volume detach` commands where volume IDs were truncated when asking the user to select one of several prefix matches +``` diff --git a/command/volume_deregister.go b/command/volume_deregister.go index 622739bad..512f8426b 100644 --- a/command/volume_deregister.go +++ b/command/volume_deregister.go @@ -101,7 +101,7 @@ func (c *VolumeDeregisterCommand) Run(args []string) int { } if len(vols) > 1 { sort.Slice(vols, func(i, j int) bool { return vols[i].ID < vols[j].ID }) - out, err := csiFormatSortedVolumes(vols, shortId) + out, err := csiFormatSortedVolumes(vols, fullId) if err != nil { c.Ui.Error(fmt.Sprintf("Error formatting: %s", err)) return 1 diff --git a/command/volume_detach.go b/command/volume_detach.go index 16e453a43..b88047ad9 100644 --- a/command/volume_detach.go +++ b/command/volume_detach.go @@ -123,7 +123,7 @@ func (c *VolumeDetachCommand) Run(args []string) int { } if len(vols) > 1 { sort.Slice(vols, func(i, j int) bool { return vols[i].ID < vols[j].ID }) - out, err := csiFormatSortedVolumes(vols, shortId) + out, err := csiFormatSortedVolumes(vols, fullId) if err != nil { c.Ui.Error(fmt.Sprintf("Error formatting: %s", err)) return 1