Skip to content

Commit

Permalink
only forward iops if it is non-zero
Browse files Browse the repository at this point in the history
  • Loading branch information
James DeFelice committed Apr 7, 2016
1 parent 1a522bd commit 397450b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/storage/ec2/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,17 @@ func (d *driver) createVolume(

d.createVolumeEnsureAvailabilityZone(&availabilityZone, &server)

// only forward iops if it's non-zero
var iops *int64
if IOPS > 0 {
iops = &IOPS
}
options := &ec2.CreateVolumeInput{
Size: &size,
SnapshotId: &snapshotID,
AvailabilityZone: &availabilityZone,
VolumeType: &volumeType,
Iops: &IOPS,
Iops: iops,
}

var resp *ec2.Volume
Expand Down

0 comments on commit 397450b

Please sign in to comment.