Merge pull request #5120 from paybyphone/paybyphone_igw_destroyfix

IGW detatch waiter tweak, 30 not found checks w/15 min max
This commit is contained in:
Paul Hinze 2016-02-22 18:17:12 -06:00
commit ce948c0dea
1 changed files with 6 additions and 5 deletions

View File

@ -204,11 +204,12 @@ func resourceAwsInternetGatewayDetach(d *schema.ResourceData, meta interface{})
// Wait for it to be fully detached before continuing
log.Printf("[DEBUG] Waiting for internet gateway (%s) to detach", d.Id())
stateConf := &resource.StateChangeConf{
Pending: []string{"detaching"},
Target: []string{"detached"},
Refresh: detachIGStateRefreshFunc(conn, d.Id(), vpcID.(string)),
Timeout: 5 * time.Minute,
Delay: 10 * time.Second,
Pending: []string{"detaching"},
Target: []string{"detached"},
Refresh: detachIGStateRefreshFunc(conn, d.Id(), vpcID.(string)),
Timeout: 15 * time.Minute,
Delay: 10 * time.Second,
NotFoundChecks: 30,
}
if _, err := stateConf.WaitForState(); err != nil {
return fmt.Errorf(