Packet provider: project-id required
vielmetti opened this issue · comments
In the Packet provider, if you omit the --project-id
flag, you get
a 404 error when you attempt to create the machine instead of
a working machine.
I think but am not 100% sure that this is also true for GCE.
Expected Behaviour
If the --project-id
flag is omitted, a message should appear
stating that it's required.
Current Behaviour
Command to create a server is accepted without the --project-id
flag,
and the response looks like this:
ed@iyengar:~$ inletsctl create --provider packet --access-token VBGBq525BcpXXXXXXXXXXX
Using provider: packet
Requesting host: charming-brown5 in ams1, from packet
POST https://api.packet.net/projects//devices: 404 Not found
Possible Solution
At https://github.com/inlets/inletsctl/blob/master/cmd/create.go#L156 where --project-id
is parsed, introduce a check to see that it's of non-zero length if it's required for the provider.
Context
This came up in the course of a first-time test to get inletsctl
running and was easy to remedy.
Your Environment
- inletsctl version 0.4.4
- Windows on Arm + WSL Ubuntu for arm64
Thanks for fixing this!
You're welcome. Hope it's useful to the community. I'd love to see it used more