Skip to content

Commit

Permalink
Merge #3767: Tolerate ElastiCache clusters being deleted.
Browse files Browse the repository at this point in the history
  • Loading branch information
apparentlymart committed Nov 5, 2015
2 parents bf11be8 + 9cee18b commit d72084e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ BUG FIXES:
* provider/aws: Allow cluster name, not only ARN for `aws_ecs_service` [GH-3668]
* provider/aws: ignore association not exist on route table destroy [GH-3615]
* provider/aws: Fix policy encoding issue with SNS Topics [GH-3700]
* provider/aws: Tolerate ElastiCache clusters being deleted outside Terraform [GH-3767]
* provider/azure: various bugfixes [GH-3695]
* provider/digitalocean: fix issue preventing SSH fingerprints from working [GH-3633]
* provider/openstack: Fix several issues causing unresolvable diffs [GH-3440]
Expand Down
6 changes: 6 additions & 0 deletions builtin/providers/aws/resource_aws_elasticache_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{})

res, err := conn.DescribeCacheClusters(req)
if err != nil {
if eccErr, ok := err.(awserr.Error); ok && eccErr.Code() == "CacheClusterNotFound" {
log.Printf("[WARN] ElastiCache Cluster (%s) not found", d.Id())
d.SetId("")
return nil
}

return err
}

Expand Down

0 comments on commit d72084e

Please sign in to comment.