Skip to content

Commit

Permalink
Provide iops when changing storage type to io1
Browse files Browse the repository at this point in the history
  • Loading branch information
Bowbaq committed Mar 16, 2016
1 parent d6c1cf0 commit 210eb35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builtin/providers/aws/resource_aws_db_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 210eb35

Please sign in to comment.