feat: recovery mode
Add capabilities to switch Droplet to recovery mode.
godo.Recovery(ctx, 3164444, true)
This method has in the console already.
Yes, of course. Thank you)
Unfortunately, I was mistaken here.
Web console uses API v1, godo - v2, method set_boot_device is not working as I expected.
This is not documented feature. And I do not know the second parameter.
{'local_disk':false} API-v2 not supported.
If I call api /v2/droplets/1/actions with body {"type": "set_boot_device",'local_disk':false} API receives the request and send notice to the web-console that boot-disk was changed.
But nothing has happened.
I am trying to add RecoveryMode to the hashicorp packer provider. https://github.com/sergelogvinov/packer-plugin-digitalocean/commit/bfec3b82c7eed0c01b5992661c8502bda1dffa0d
Can you help me.
What is the second parameter of method set_boot_device? @ChiefMateStarbuck
Thank you.
hello @sergelogvinov,
i believe {"type": "set_boot_device"} should do the trick.
As recovery is not an officially supported action, we cannot merge this PR.
A workaround would be to make a custom function that implements the recovery functionality.
Does this help?