amazon: validate IOPS only for io volumes
This commit is contained in:
parent
09c2620c48
commit
a763c8ab02
@ -181,12 +181,12 @@ func (b *BlockDevice) Prepare(ctx *interpolate.Context) error {
|
|||||||
return fmt.Errorf("%s: the maximum ratio of provisioned IOPS to requested volume size "+
|
return fmt.Errorf("%s: the maximum ratio of provisioned IOPS to requested volume size "+
|
||||||
"(in GiB) is %v:1 for %s volumes", b.DeviceName, ratio, b.VolumeType)
|
"(in GiB) is %v:1 for %s volumes", b.DeviceName, ratio, b.VolumeType)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if b.IOPS < minIops || b.IOPS > maxIops {
|
if b.IOPS < minIops || b.IOPS > maxIops {
|
||||||
return fmt.Errorf("IOPS must be between %d and %d for device %s",
|
return fmt.Errorf("IOPS must be between %d and %d for device %s",
|
||||||
minIops, maxIops, b.DeviceName)
|
minIops, maxIops, b.DeviceName)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_, err := interpolate.RenderInterface(&b, ctx)
|
_, err := interpolate.RenderInterface(&b, ctx)
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user