Merge pull request #5676 from Originate/mb-ensure-iops-is-provided

provider/aws: Provide iops when changing storage type to io1 on RDS
This commit is contained in:
Clint 2016-03-23 08:31:21 -05:00
commit ccb9693994
1 changed files with 4 additions and 0 deletions

View File

@ -829,6 +829,10 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error
d.SetPartial("storage_type")
req.StorageType = aws.String(d.Get("storage_type").(string))
requestUpdate = true
if *req.StorageType == "io1" {
req.Iops = aws.Int64(int64(d.Get("iops").(int)))
}
}
if d.HasChange("auto_minor_version_upgrade") {
d.SetPartial("auto_minor_version_upgrade")