Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a firewall rule requires "action" despite help text saying there is a default #249

Closed
kaihoffman opened this issue Aug 25, 2022 · 4 comments
Assignees

Comments

@kaihoffman
Copy link
Member

In the civo firewall rule create help, there is a note that --action defaults to "allow":

-a, --action string the action of the rule can be allow or deny (default is allow) (default "allow")

However if you run a command without --action it fails with

Error: required flag(s) "action" not set

Either the text about the default value must be removed, or the CLI should honour it.

@alejandrojnm
Copy link
Member

Yes, by default is allow but if you set --action cobra assumes you pass the flag and in this case, is empty because the flag doesn't have any value. The default is in the case you don't pass the flag

@kaihoffman
Copy link
Member Author

That's what I mean, I wasn't including --action and it would not work.

$ civo firewall rule create cli-demo --startport=22 --direction=ingress -l 'SSH access'
Error: required flag(s) "action" not set

version 1.0.32

@alejandrojnm
Copy link
Member

We need fix this then @satakshigarg can you check this ??

@satakshigarg
Copy link
Contributor

Sure @alejandrojnm I'll handle this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants