From 210eb3571e411af7a66c6c7516c5250f22165b69 Mon Sep 17 00:00:00 2001 From: Maxime Bury Date: Wed, 16 Mar 2016 18:32:11 -0400 Subject: [PATCH] Provide iops when changing storage type to io1 --- builtin/providers/aws/resource_aws_db_instance.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index 981e87d9a..7cb5d27f7 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -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")