Merge pull request #2544 from hashicorp/b-vpc-peer-failed
providers/aws: vpc peering failed == deleted [GH-2322]
This commit is contained in:
commit
4b5b6b6942
|
@ -101,6 +101,14 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error {
|
|||
|
||||
pc := pcRaw.(*ec2.VPCPeeringConnection)
|
||||
|
||||
// The failed status is a status that we can assume just means the
|
||||
// connection is gone. Destruction isn't allowed, and it eventually
|
||||
// just "falls off" the console. See GH-2322
|
||||
if *pc.Status.Code == "failed" {
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
|
||||
d.Set("accept_status", *pc.Status.Code)
|
||||
d.Set("peer_owner_id", pc.AccepterVPCInfo.OwnerID)
|
||||
d.Set("peer_vpc_id", pc.AccepterVPCInfo.VPCID)
|
||||
|
|
Loading…
Reference in New Issue