String instanceId = instance.getInstanceId();
// IDEA: We could have a strategy where we detach some of the volumes...
boolean force = true;
for (String volumeId : cloudClient.listAttachedVolumes(instanceId, false)) {
cloudClient.detachVolume(instanceId, volumeId, force);
}
}
}