Skip to content

Commit

Permalink
fixed possibly incorrectly returning destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
SamClinckspoor committed Jun 26, 2015
1 parent c22f271 commit c92b7a9
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,12 @@ func resourceAwsElasticacheParameterGroupDeleteRefreshFunc(

if _, err := conn.DeleteCacheParameterGroup(&deleteOpts); err != nil {
elasticahceerr, ok := err.(awserr.Error)
if !ok {
return d, "error", err
}

if elasticahceerr.Code() != "CacheParameterGroupNotFoundFault" {
if ok && elasticahceerr.Code() == "CacheParameterGroupNotFoundFault" {
d.SetId("")
return d, "error", err
}
return d, "error", err
}

return d, "destroyed", nil
}
}
Expand Down

0 comments on commit c92b7a9

Please sign in to comment.