Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
instance: add a protection flag to exo compute (#608)
# Description added add/remove a protection flag to exo compute, however it did not work as expected ## Checklist (For exoscale contributors) * [ ] Changelog updated (under *Unreleased* block) * [x] Testing ## Testing I tested the cli after the changes locally but the protection flag does not work. ```bash ❯ ./exo compute instance update --help This command updates an Instance . Supported output template annotations: .ID, .Name, .CreationDate, .InstanceType, .Template, .Zone, .AntiAffinityGroups, .DeployTarget, .SecurityGroups, .PrivateInstance, .PrivateNetworks, .ElasticIPs, .IPAddress, .IPv6Address, .SSHKey, .DiskSize, .State, .Labels, .ReverseDNS Usage: exo compute instance update NAME|ID [flags] Flags: -c, --cloud-init string instance cloud-init user data configuration file path --cloud-init-compress compress instance cloud-init user data -h, --help help for update --label stringToString instance label (format: key=value) (default []) -n, --name string instance name --protection enable delete protection --reverse-dns string Reverse DNS Domain -z, --zone string instance zone Global Flags: -C, --config string Specify an alternate config file [env EXOSCALE_CONFIG] -O, --output-format string Output format (table|json|text), see "exo output --help" for more information --output-template string Template to use if output format is "text" -Q, --quiet Quiet mode (disable non-essential command output) -A, --use-account string Account to use in config file [env EXOSCALE_ACCOUNT] ❯ ./exo compute instance update 4ed629e1-9a63-4d74-b8c9-165d83292f9d --protection ┼──────────────────────┼──────────────────────────────────────┼ │ COMPUTE INSTANCE │ │ ┼──────────────────────┼──────────────────────────────────────┼ │ ID │ 4ed629e1-9a63-4d74-b8c9-165d83292f9d │ │ Name │ test │ │ Creation Date │ 2024-05-28 08:31:56 +0000 UTC │ │ Instance Type │ standard.medium │ │ Template │ Linux Ubuntu 22.04 LTS 64-bit │ │ Zone │ at-vie-1 │ │ Anti-Affinity Groups │ n/a │ │ Deploy Target │ - │ │ Security Groups │ default │ │ Private Instance │ No │ │ Private Networks │ n/a │ │ Elastic IPs │ n/a │ │ IP Address │ 194.182.184.154 │ │ IPv6 Address │ - │ │ SSH Key │ - │ │ Disk Size │ 50 GiB │ │ State │ running │ │ Labels │ n/a │ │ Reverse DNS │ │ ┼──────────────────────┼──────────────────────────────────────┼ ❯ ./exo compute instance delete 4ed629e1-9a63-4d74-b8c9-165d83292f9d [+] Are you sure you want to delete instance "4ed629e1-9a63-4d74-b8c9-165d83292f9d"? [yN]: y ✔ Deleting instance "4ed629e1-9a63-4d74-b8c9-165d83292f9d"... 6s ```
- Loading branch information