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.
This commit is contained in:
James Nugent 2016-01-04 10:44:53 -05:00
parent 8458661080
commit 3c330f6e19
1 changed files with 4 additions and 2 deletions

View File

@ -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,