vultr / vultr-cli

Official command line tool for Vultr services
Apache License 2.0
478 stars 76 forks source link

[Feature] - Allow update of bare metal user data without reading from a file #352

Open optik-aper opened 1 year ago

optik-aper commented 1 year ago

Is your feature request related to a problem? Please describe. It would be nice to be able to make the --userdata flag on the bare-metal user-data set --userdata=... accept a string directly from the command line and not have to read in a file:

vultr-cli bare-metal user-data set 08dad366-0d84-469a-b2a4-fc319e4e4dbc --userdata="VEVTVCBVU0VSIERBVEEzMzMzMwo="                                                                                             
error reading user-data : open VEVTVCBVU0VSIERBVEEzMzMzMwo=: no such file or directory
exit status 1

Describe the solution you'd like A separate flag for filename to parse and make --userdata read in a string instead of a file. Or have it check for a file then try parsing it as a string (though that option seems worse).

Describe alternatives you've considered It's just an update to the bare metal route--there is no special route in play here. So, this is kind of the only way to make this happen.