consul-esm
consul-esm copied to clipboard
Add command line option to verify ESM configuration
It would be helpful to have a command line flag to verify the configuration file syntax.
@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.
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, 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.