Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/aws: Elasticache cluster describe instances CacheClusterNotFound err handling #3767

Closed

Conversation

stack72
Copy link
Contributor

@stack72 stack72 commented Nov 5, 2015

Fixing the Read method to take into account that an elasticache cluster may have been deleted manually

Fixes #3689

//cc @apparentlymart

@@ -241,6 +241,11 @@ 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" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's log before we remove it

log.Printf("[WARN] ElastiCache Cluster (%s) not found", d.Id())
d.SetId("")
return nil

@catsby catsby added enhancement waiting-response An issue/pull request is waiting for a response from the community provider/aws labels Nov 5, 2015
@stack72
Copy link
Contributor Author

stack72 commented Nov 5, 2015

@catsby done :)

@apparentlymart apparentlymart removed the waiting-response An issue/pull request is waiting for a response from the community label Nov 5, 2015
@apparentlymart
Copy link
Contributor

Awesome! I squashed this and merged it as 9cee18b. Thanks!

@stack72 stack72 deleted the f-aws-elasticache-cluster-delete branch November 5, 2015 17:36
jen20 added a commit that referenced this pull request Nov 10, 2015
Also adds a regression test using Mock UI. Fixes #3767.
jen20 added a commit that referenced this pull request Nov 10, 2015
Also adds a regression test using Mock UI. Fixes #3767.
@jen20
Copy link
Contributor

jen20 commented Nov 10, 2015

My bad here, I referenced the wrong issue number in a PR.

dpetzold pushed a commit to clearcare/terraform that referenced this pull request Nov 12, 2015
Also adds a regression test using Mock UI. Fixes hashicorp#3767.
omeid pushed a commit to omeid/terraform that referenced this pull request Mar 30, 2018
…dfront_distribution-domain_name-validatefunc

resource/aws_cloudfront_distribution: Validate origin domain_name and origin_id at plan time
omeid pushed a commit to omeid/terraform that referenced this pull request Mar 30, 2018
@ghost
Copy link

ghost commented Apr 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_elasticache_cluster does not correctly handle deleted clusters
4 participants