provider/aws: Remove Network ACL from state if not found
This commit is contained in:
parent
75bd44e29d
commit
053ba9005d
|
@ -169,6 +169,13 @@ func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error {
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if ec2err, ok := err.(awserr.Error); ok {
|
||||||
|
if ec2err.Code() == "InvalidNetworkAclID.NotFound" {
|
||||||
|
log.Printf("[DEBUG] Network ACL (%s) not found", d.Id())
|
||||||
|
d.SetId("")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if resp == nil {
|
if resp == nil {
|
||||||
|
|
Loading…
Reference in New Issue