provider/aws: Remove Network ACL from state if not found

This commit is contained in:
Clint 2016-04-05 11:11:16 -05:00
parent 75bd44e29d
commit 053ba9005d
1 changed files with 7 additions and 0 deletions

View File

@ -169,6 +169,13 @@ func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error {
})
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
}
if resp == nil {