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

consistent output ie version across hashicorp tools #18570

Open
rjhornsby opened this issue Dec 29, 2022 · 0 comments
Open

consistent output ie version across hashicorp tools #18570

rjhornsby opened this issue Dec 29, 2022 · 0 comments

Comments

@rjhornsby
Copy link
Contributor

Feature Description

This isn't vault specific, but is general ask for Hashicorp tools to be consistent in their responses to common/shared commands like <command> --version. At the moment boundary, consul, vault, terraform, and packer all respond differently to --version:

  • boundary (0.11.2): will not accept the --version flag, but supports a hidden version command:
$ boundary version

Version information:
  Git Revision:        02e410af7a2606ae242b8637d8a02754f0a5f43e
  Version Number:      0.11.2

(whitespace in the original)

  • consul (1.14.3):
$ consul --version
Consul v1.14.3
Revision bd257019
Build Date 2022-12-13T17:13:55Z
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
  • packer (1.8.5): provides the most succinct answer of all:
$ packer --version
1.8.5
  • terraform (1.3.6):
$ terraform --version
Terraform v1.3.6
on darwin_arm64
  • vault (1.12.2):
$ vault --version
Vault v1.12.2 (415e1fe3118eebd5df6cb60d13defdc01aa17b03), built 2022-11-23T12:53:46Z

Every tool presents its own version information with its own unique format and unique build details - some on one line, some output multiple lines, some the version is prefixed with a v, some are not.

Use Case(s)

It would be nice that within the Hashicorp family of tools one could rely upon a response to --version (or other common commands?) without having to parse each command's output uniquely.

The (admittedly very) specific use case I'm hitting here is a single cookbook that can deploy/upgrade hashicorp agents (consul and vault now, boundary in the future). To see if an agent needs an upgrade (especially on windows...grr), one needs to ask the binary for its version number.

Distinct parsers that are aware of each tool's quirks are not the worst thing in the world - but ideally each binary could for example, report its version number (and only the version number ala how packer does this) on the first line, and then subsequent lines could provide more details if it wished.

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

No branches or pull requests

2 participants