adding states that should be considered as deleted for vpc peering (#7466)

This commit is contained in:
Eric Rutherford 2016-07-03 10:58:19 -05:00 committed by Paul Stack
parent c744bb6fa8
commit 32051156c7

View File

@ -108,7 +108,7 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error {
// connection is gone. Destruction isn't allowed, and it eventually // connection is gone. Destruction isn't allowed, and it eventually
// just "falls off" the console. See GH-2322 // just "falls off" the console. See GH-2322
if pc.Status != nil { if pc.Status != nil {
if *pc.Status.Code == "failed" || *pc.Status.Code == "deleted" { if *pc.Status.Code == "failed" || *pc.Status.Code == "deleted" || *pc.Status.Code == "rejected" || *pc.Status.Code == "deleting" || *pc.Status.Code == "expired" {
log.Printf("[DEBUG] VPC Peering Connect (%s) in state (%s), removing", d.Id(), *pc.Status.Code) log.Printf("[DEBUG] VPC Peering Connect (%s) in state (%s), removing", d.Id(), *pc.Status.Code)
d.SetId("") d.SetId("")
return nil return nil