consul-esm icon indicating copy to clipboard operation
consul-esm copied to clipboard

Add command line option to verify ESM configuration

Open edevil opened this issue 4 years ago • 3 comments

It would be helpful to have a command line flag to verify the configuration file syntax.

edevil avatar Nov 09 '20 11:11 edevil

@edevil, thanks for creating this issue! Is there any particular types of validation you're thinking about or use-cases you've encountered? For example, validating the configuration value type or checking for unsupported configuration fields.

lornasong avatar Nov 09 '20 22:11 lornasong

I think a good start would be validating HCL syntax and configuration keys. Field values would be nice, but I don't know if it's feasible for every field.

A use-case was me upgrading our ESMs and using the configuration that I had originally used (metrics_endpoint) instead of client_address, and none of them restarted. Fortunately it was a testing cluster. :)

edevil avatar Nov 12 '20 10:11 edevil

@edevil, thanks for sharing and helpful to know. I'm glad it was a testing cluster! I agree what you propose is a good start and can build on the feature as needed in the future.

lornasong avatar Nov 17 '20 20:11 lornasong