Provide iops when changing storage type to io1

This commit is contained in:
Maxime Bury 2016-03-16 18:32:11 -04:00
parent d6c1cf0fec
commit 210eb3571e
1 changed files with 4 additions and 0 deletions

View File

@ -815,6 +815,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")