fixed possibly incorrectly returning destroyed
This commit is contained in:
parent
c22f271fb0
commit
c92b7a980c
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue