Skip to content

Commit

Permalink
provider/aws: Remove Network ACL from state if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby committed Apr 5, 2016
1 parent 75bd44e commit 053ba90
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builtin/providers/aws/resource_aws_network_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 053ba90

Please sign in to comment.