cli
cli copied to clipboard
[Feature Request]: Add instance destruction protection option to exo compute instance create/update
What feature would you like to have in the cli?
Please add instance destruction protection to exo compute instance create/update.
Hi, thanks for the request, this feature is planned for implementation soon. I can't give an ETA but it will be done.
Hi @sauterp what is the current way to remove instance protection ? I couldn't find an matching parameter in the UI, the CLI doesn't allow to remove it, and trying to do it via API isn't quite simple due to mandatory signature in the AuthZ header (from what I understand).
I ended up writing my own Go client @sboulkour. I agree it is unfortunate there is no other option, not even in the Web UI.
I did open a support case to remove the instance for now. If someone has managed to use the API with Postman I'd be happy to have a hint on how to generate properly the signature in the authZ header.
@sboulkour all the operations in our API spec are available in the CLI under exo api, these commands aren't very polished as they are generated code.
❯ exo api remove-instance-protection -h
Remove instance destruction protection
Usage:
exo x remove-instance-protection id [flags]
Flags:
-h, --help help for remove-instance-protection
Global Flags:
-C, --config string Specify an alternate config file [env EXOSCALE_CONFIG]
-e, --environment string Exoscale API environment
-o, --output-format string Output format [json, yaml] (default "json")
--output-template string Template to use if output format is "text"
-q, --query string Filter / project results using JMESPath
-Q, --quiet Quiet mode (disable non-essential command output)
--raw Output result as raw rather than pretty JSON
--server string Override server URL
-A, --use-account string Account to use in config file [env EXOSCALE_ACCOUNT]
--verbose Enable verbose log output
-z, --zone string Exoscale zone
Oooooh ! I didn't know. Thanks for the pointer. In the mean time I deleted the flag using https://github.com/exoscale/requests-exoscale-auth. But definitly note the method you provided :)
This has been implemented here https://github.com/exoscale/cli/pull/608