vultr / vultr-cli

Official command line tool for Vultr services
Apache License 2.0
469 stars 75 forks source link

[BUG] cannot add firewall rule #411

Closed Ddataa closed 6 months ago

Ddataa commented 6 months ago

Describe the bug

I have been using vultr-cli via a script and today I receive a new error on a command to create firewall rule like below

../bin/vultr-cli firewall rule create --id=$SECGROUPID --protocol="TCP" --ip-type="v6" --port="$PORT" --size="0" --subnet="::"

receive the error

Error: unknown flag: --id

To Reproduce

create a new security group add a rule to the newly created group

Expected behavior like before, my script can create a security group and then apply rules to it

Screenshots nope

Desktop (please complete the following information where applicable:

Additional context

please help

optik-aper commented 6 months ago

Hello @Ddataa and thank you for the bug report. It looks like this got inadvertently removed in v3. I'll add it back for the next release this week. In the meantime, if you need a working version, use one of the v2 releases.

Ddataa commented 6 months ago

sorry, but you guys at Vultr never heard of testing as part of software developement ?

is this cli not mean to be used in production environment ?

optik-aper commented 6 months ago

@Ddataa v3 was a big shift for the CLI so, inevitably, mistakes will happen. My apologies. I've offered you a workable alternative for a production environment.

optik-aper commented 6 months ago

This is actually implemented already, just not correctly documented:

vultr-cli  firewall rule create <FIREWALL GROUP ID> --protocol="TCP" --ip-type="v6" --port="80" --size="0" --subnet="::"

The --id flag was intentionally removed to remain consistent with other commands. I will update the documentation.