public void destroyInstance(ClusterSpec clusterSpec, String instanceId) throws IOException {
LOG.info("Destroying instance {}", instanceId);
/* Destroy the instance */
ComputeService computeService = getCompute().apply(clusterSpec).getComputeService();
computeService.destroyNode(instanceId);
/* .. and update the cluster state storage */
ClusterStateStore store = stateStoreFactory.create(clusterSpec);
Cluster cluster = store.load();
cluster.removeInstancesMatching(withIds(instanceId));