From 32051156c76fd284938aa63843b735e2cd19f0cd Mon Sep 17 00:00:00 2001 From: Eric Rutherford Date: Sun, 3 Jul 2016 10:58:19 -0500 Subject: [PATCH] adding states that should be considered as deleted for vpc peering (#7466) --- builtin/providers/aws/resource_aws_vpc_peering_connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_vpc_peering_connection.go b/builtin/providers/aws/resource_aws_vpc_peering_connection.go index 2bfc341b6..c712e4574 100644 --- a/builtin/providers/aws/resource_aws_vpc_peering_connection.go +++ b/builtin/providers/aws/resource_aws_vpc_peering_connection.go @@ -108,7 +108,7 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { // connection is gone. Destruction isn't allowed, and it eventually // just "falls off" the console. See GH-2322 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) d.SetId("") return nil