This commit is contained in:
2023-03-25 23:58:22 +02:00
parent e58c403780
commit 624528ae70

View File

@@ -137,7 +137,7 @@ We get the name of the location.
We get the id of the location.
# Listing virtual machines
# Listing virtual machines 🧮
To list the virtual machines you can run `python3 secdep.py -P <provider> -l` or `python3 secdep.py --provider <provider> --list`.
@@ -145,11 +145,11 @@ You can also do the same without the provider flag to list all the virtual machi
The print flag also works with the list flag like this `python3 secdep.py -P <provider> -l -p` or `python3 secdep.py --provider <provider> --list --print`.
# Deleting a virtual machine
# Deleting a virtual machine 🗑️
To delete a virtual machine you perform an action with the -a or --action flag.
When the action is delete you choose one of the virtual machines from the list and it will be deleted. Compined with the provider flag it lists all the virtual machines from that one provider.
When the action is `delete`, you choose one of the virtual machines from the list and it will be deleted. Combined with the provider flag it lists all the virtual machines from that one provider.
`python3 secdep.py -P <provider> -a delete`
@@ -161,6 +161,28 @@ If you want to delete them all in either case you can use the `deleteall` action
Same goes for stop, start and reboot.
# Using actions more efficiently ⚖️
Possible actions are `delete`, `stop`, `start`, `reboot` and all of them with the `all` suffix.
Essentially, an action that does not end with `all` will ask you to choose a virtual machine from the list and perform the action on that one.
That means that there is an intermediate step where you choose the virtual machine from the list.
If you know you only have one virtual machine you could use the `<action>all` action to skip the confirmation step.
For example, if you know you only have one virtual machine with the gce provider you can run `python3 secdep.py -P gce -a deleteall` to delete it.
That way we skipped not only the confirmation step but also looking for more virtual machines from azure and aws.
If you only use one provider you should always specify the provider flag to never have to look for virtual machines from the others.
Especially in the case of aws, it is highly beneficial to specify the `--awsregion` flag to not go through all the regions.
Another example would be if you want to stop all the virtual machines from a specific aws region.
To do that you can simply run `python3 secdep.py -P aws --awsregion <region> -a stopall` where `<region>` is the region you want to stop the virtual machines from.
# SSHing into a virtual machine 🚀
* Interactive TUI programs such as `vim` and similar will not work.