Add create and del subcommands to manage devurls #57
Description
Proposal to add new subcommands,
create <env_name> <port> <access>
del <env_name> <port>
... allowing management of devurls and a full CRUD capability via coder-cli.
- Requires prior login as a user with access to admin <env_name>
- Subject to same site-install/org devurl access policies as doing this through the web frontend
- The
create
subcommand should be an idempotent operation. Callingcreate
on an existing<env_name> <port>
will update the devurl's<access>
if a new value is specified, otherwise the command will do nothing and return success.
These commands would be useful both for end users and for integration testing with cemanager, enabling scripted devurl testing to ensure the API endpoints haven't broken by changes either in coder-cli or enterprise.
The create
and del
subcommands may require work on cdr/enterprise as well but the existing endpoints used by the web FE can/should be usable. should be able to use existing endpoints available for the web frontend.
TBD: subcommand names. create
and del
may be too generic if coder-cli eventually manages other resources. Will implement as these for now, but suggest addurl
and delurl
instead?