vultr-cli icon indicating copy to clipboard operation
vultr-cli copied to clipboard

[BUG] - Load balancer rule create command doesn't work

Open optik-aper opened this issue 1 year ago • 0 comments

Describe the bug When using the vultr-cli load-balancer rule create ... command, it returns "bad request":

vultr-cli load-balancer rule create eadd59b0-ffe2-45a9-976d-c9faa0a1491f --backend-port=8800 --frontend-port=1230                                                                                            
error listing load balancer rules : {"error":"Bad request.","status":400}
exit status 1

To Reproduce Steps to reproduce the behavior:

  1. Create a load balancer
  2. Try to create a rule with the rule create command
  3. See error

Expected behavior Looking at the code:

		options := &govultr.ForwardingRule{}
		rule, _, err := client.LoadBalancer.CreateForwardingRule(context.Background(), id, options)
		if err != nil {
			fmt.Printf("error listing load balancer rules : %v\n", err)
			os.Exit(1)
		}

It doesn't appear to read any of the flag and is only passing an empty struct of load balancer options. The result is a malformed request.

optik-aper avatar Sep 28 '23 14:09 optik-aper