providers/aws: if a VPC doesn't exist, then remove from state

This commit is contained in:
Mitchell Hashimoto 2015-02-20 10:20:20 -08:00
parent 3093268106
commit cf5697ff32
1 changed files with 4 additions and 5 deletions

View File

@ -57,7 +57,6 @@ func resourceAwsVpc() *schema.Resource {
Computed: true,
},
"tags": tagsSchema(),
},
}
@ -115,6 +114,7 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error {
return err
}
if vpcRaw == nil {
d.SetId("")
return nil
}
@ -243,7 +243,6 @@ func VPCStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc {
}
}
func resourceAwsVpcSetDefaultNetworkAcl(conn *ec2.EC2, d *schema.ResourceData) error {
filter := ec2.NewFilter()
filter.Add("default", "true")