providers/aws: if a VPC doesn't exist, then remove from state
This commit is contained in:
parent
3093268106
commit
cf5697ff32
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue