Optum / dce-cli

Disposable Cloud Environment CLI
Apache License 2.0
38 stars 20 forks source link

The DCE leases create prompt implies budget-currency is not required because it has a default of USD. It is required. #90

Open nelsonjchen opened 3 years ago

nelsonjchen commented 3 years ago

Version information

0.5.0 "reports as 0.4.0" due to #86 Ubuntu 20.04 on WSL2 Unknown Go Version Bundled Terraform

Describe the bug

The DCE leases create prompt implies budget-currency is not required because it has a default of USD. It is required.

To Reproduce

$ dce leases create -b 10.0 -e crazysim@gmail.com -E 1d -p nelson                                                                                                                                                                            
Error: required flag(s) "budget-currency" not set
Usage:
  dce leases create [flags]

Flags:
  -b, --budget-amount float      The leased accounts budget amount
  -c, --budget-currency string   The leased accounts budget currency (default "USD")
  -e, --email stringArray        The email address that budget notifications will be sent to
  -E, --expires-on string        The leased accounts expiry date as a long (UNIX epoch) or string (eg., '7d', '8h' (default "7d")
  -h, --help                     help for create
  -p, --principal-id string      Principle ID for the user of the leased account

Global Flags:
      --config string   config file (default is "$HOME/.dce/config.yaml")

Expected behavior

dce leases create -b 10.0 -e crazysim@gmail.com -E 1d -p nelson                                                                                                                                                                            

and it just does its thing.

The command assumes USD and does not fatally exit with a help prompt.

Additional context