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

Consul validate should accept -config-format flag #3996

Closed
snocorp opened this issue Mar 28, 2018 · 0 comments · Fixed by #4002
Closed

Consul validate should accept -config-format flag #3996

snocorp opened this issue Mar 28, 2018 · 0 comments · Fixed by #4002
Assignees
Labels
theme/cli Flags and documentation for the CLI interface type/bug Feature does not function as expected

Comments

@snocorp
Copy link

snocorp commented Mar 28, 2018

Description of the Issue (and unexpected/desired result)

We are using ansible to build our consul configuration and we would like to be able to validate our configration during the template generation phase. Ansible creates a temporary file without an extension to be the file that gets tested. Unfortunately this means the config file will be skipped and the validation will fail. While looking into this issue I noticed that when running the agent, one can override the format using the -config-format flag but this flag is not accepted in the validate command.

The expected result would be if I specify the format, it will override or choose the format (hcl|json) using that flag instead of only using the file extension.

Reproduction steps

$ consul validate -config-format json consul.conf
flag provided but not defined: -config-format

consul version for both Client and Server

Client: 1.0.6
Server: 1.0.6

consul info for both Client and Server

n/a

Operating system and Environment details

Ubuntu 16.04.3

Log Fragments or Link to gist

n/a

@mkeeler mkeeler added type/bug Feature does not function as expected theme/cli Flags and documentation for the CLI interface labels Mar 29, 2018
@mkeeler mkeeler self-assigned this Mar 29, 2018
mkeeler referenced this issue Apr 3, 2018
Add --config-format option to the validate subcommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/cli Flags and documentation for the CLI interface type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants