Once a cluster is created only the last one is deleted once cleanup is called.
So, my proposed solution is to tag all cluster which are created by the script.
and then once the cleanup.sh is called, it can either delete the only one cluster if there is only one or it can delete all the tagged clusters.
Or if you find it more clever, it can give the choice to choose which cluster need to be deleted.
Once a cluster is created only the last one is deleted once cleanup is called.
So, my proposed solution is to tag all cluster which are created by the script.
and then once the cleanup.sh is called, it can either delete the only one cluster if there is only one or it can delete all the tagged clusters.
Or if you find it more clever, it can give the choice to choose which cluster need to be deleted.