Skip to content

Improve parameters handling

Current situation

When using opentf-ctl, specifying parameters is a bit to strict and constraining, and at the same times allows for expected things, such as specifying multiple output parameters.

Desired outcome

Some improvements:

  • In sub-commands, options should be specifiable in any order, allowing the UUID to be specified last
  • In sub-commands, it should be possible to abbreviate the UUIDs
  • Parameters that should not be duplicated should be reported (but parameters that can be repeated, such as -e or -f should be still allowed

[The only options that can appear before the subcommand.]

Examples

opentf-ctl --context foo get workflows
opentf-ctl get --context foo workflows   # weird, but why not
opentf-ctl get workflow --step-depth 12 cafebabe

opentf-ctl -c=0 get workflow cafebabe    # invalid, -c is not a global option
Edited by Martin Lafaix