cloud-machine
cloud-machine copied to clipboard
Load EBS by ID if it exists, else Create
Right now we load and attach an EBS disk if a specific ID is passed. It would be nice if we could detect when that volume ID does not exist and then Create a new volume with the specified configuration.
Maybe, it's important to user knows if volume ID doens't exists... For example, if you always have a volume ready, you want always specify the volume ID, and if you specify a wrong, or invalid ID it will be created even you don't want. I'm not sure, but that can be a flag (inside of yml) or a command line flag (like -force), in this case you can control both case, what do you think?
@guilherme-santos "warning message" for this case would not be sufficient ?
I agree with the idea of having the flag inside the .yml file, only because the warning message would not stop the unwanted volume creation, right?
@vitorarins yes, I think that too, warning will not stop the creating, and the volume will be created, since it was wrong!
Another idea would be to stop execution and ask a question to the user instead of just a warning. But I am not sure that's a good solution. @lborguetti what do you think?
The problem with this approch is because you have to decide before execute cloud-machine what you want to do, because we cannot rollback secure, if we stop and ask to user, maybe some machine already be created, and you have to decide if you want to create or load by new Id. For that, I don't know if is a good way...
Now, I understand the problem with "warning message" ... I agree with the idea of the flag inside the .yml file too.
@vitorarins I think interaction with user never is a good way, because it breaks full automation
Agreed!