gruntwork-io/cloud-nuke

Error deleting elasticache within replication group

Closed this issue · 1 comments

[cloud-nuke] INFO[2022-07-21T13:27:28-04:00] Terminating 1 resources in batches
[cloud-nuke] INFO[2022-07-21T13:27:28-04:00] Deleting 1 Elasticache clusters in region us-east-1
[cloud-nuke] ERRO[2022-07-21T13:27:28-04:00] [Failed] InvalidCacheClusterState: Cannot delete the cache cluster since it is the only member of a replication group. Delete the replication group instead.
        status code: 400, request id: 4846d313-aa5c-40d7-95f0-f7d868407904
[cloud-nuke] INFO[2022-07-21T13:27:28-04:00] [OK] 0 Elasticache clusters deleted in us-east-1

Looks like we may need to issue a call to DeleteReplicationGroup if the elasticache node exists within a replication group.