Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

providers/aws: vpc peering failed == deleted [GH-2322] #2544

Merged
merged 1 commit into from
Jun 29, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions builtin/providers/aws/resource_aws_vpc_peering_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down