fix type deference when calling ebs modify volume endpoint

This commit is contained in:
Felix Kunde 2026-07-24 15:43:56 +02:00
parent 0ea05f7691
commit e35e217064
1 changed files with 9 additions and 1 deletions

View File

@ -171,7 +171,15 @@ func (r *EBSVolumeResizer) ModifyVolume(volumeID string, newType *string, newSiz
t := int32(*throughput)
throughputInt32 = &t
}
input := ec2.ModifyVolumeInput{Size: sizeInt32, VolumeId: &volumeID, VolumeType: types.VolumeType(*newType), Iops: iopsInt32, Throughput: throughputInt32}
input := ec2.ModifyVolumeInput{
Size: sizeInt32,
VolumeId: &volumeID,
Iops: iopsInt32,
Throughput: throughputInt32,
}
if newType != nil {
input.VolumeType = types.VolumeType(*newType)
}
output, err := r.connection.ModifyVolume(context.TODO(), &input)
if err != nil {
return fmt.Errorf("could not modify persistent volume: %v", err)