From 3c330f6e19a266a471123e90cef884ef2bf8949f Mon Sep 17 00:00:00 2001 From: James Nugent Date: Mon, 4 Jan 2016 10:44:53 -0500 Subject: [PATCH] provider/aws: Fix RDS unexpected state config This commit adds the various states (taken from the RDS documentation here: http://amzn.to/1OHqi6g) to the list of allowable pending states when creating an RDS instance. In particular, `resetting-master-credentials` is returned when creating an `aws_db_instance` from a snapshot. Fixes #4477. --- builtin/providers/aws/resource_aws_db_instance.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index a034b7953..00de73fc7 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -383,7 +383,8 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error "[INFO] Waiting for DB Instance to be available") stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying"}, + Pending: []string{"creating", "backing-up", "modifying", "resetting-master-credentials", + "maintenance", "renaming", "rebooting", "upgrading"}, Target: "available", Refresh: resourceAwsDbInstanceStateRefreshFunc(d, meta), Timeout: 40 * time.Minute, @@ -494,7 +495,8 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error "[INFO] Waiting for DB Instance to be available") stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying"}, + Pending: []string{"creating", "backing-up", "modifying", "resetting-master-credentials", + "maintenance", "renaming", "rebooting", "upgrading"}, Target: "available", Refresh: resourceAwsDbInstanceStateRefreshFunc(d, meta), Timeout: 40 * time.Minute,