provider/aws: Allow `active` state while waiting for the VPC Peering Connection. (#9754)

* Allow `active` state while waiting for the VPC Peering Connection.

This commit adds `active` as one of the valid states in which the VPC Peering
Connection can be when it being created.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>

* Add more valid states.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This commit is contained in:
Krzysztof Wilczynski 2016-11-01 09:51:46 +00:00 committed by Paul Stack
parent 113b6fc7bc
commit 6f02a2df55
1 changed files with 2 additions and 2 deletions

View File

@ -84,8 +84,8 @@ func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error
// Wait for the vpc peering connection to become available // Wait for the vpc peering connection to become available
log.Printf("[DEBUG] Waiting for VPC Peering Connection (%s) to become available.", d.Id()) log.Printf("[DEBUG] Waiting for VPC Peering Connection (%s) to become available.", d.Id())
stateConf := &resource.StateChangeConf{ stateConf := &resource.StateChangeConf{
Pending: []string{"pending"}, Pending: []string{"initiating-request", "provisioning", "pending"},
Target: []string{"pending-acceptance"}, Target: []string{"pending-acceptance", "active"},
Refresh: resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id()), Refresh: resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id()),
Timeout: 1 * time.Minute, Timeout: 1 * time.Minute,
} }