Consul: Does consul support HCL for config files?

Created on 29 Apr 2015  路  13Comments  路  Source: hashicorp/consul

HCL is supported for ACL definitions, but it doesn't seem to be supported for config files. Is this a planned feature?

themcli typenhancement

Most helpful comment

@grantr eventually! We've had requests for it before so I think it makes sense to add it as long as the JSON format is preserved. The main want seems to be around adding comments to configs/service definitions etc which seems reasonable. Marking as an enhancement.

All 13 comments

@grantr eventually! We've had requests for it before so I think it makes sense to add it as long as the JSON format is preserved. The main want seems to be around adding comments to configs/service definitions etc which seems reasonable. Marking as an enhancement.

Yep, comments would be great. Thanks @ryanuber!

:+1:

:+1:

:+1:

:+1:

:thumbsup:

:+1:

馃憤 because I want to put a comment in the config file that indicates that it is managed by Ansible -- e.g.:

# {{ ansible_managed }}

I can't do this with JSON.

I tried this:

"ansible_managed": "XXX",

but Consul doesn't like it when it sees keys that it doesn't know about:

==> Error decoding '/etc/consul.conf': Config has invalid keys: ansible_managed

so I guess if we can't have HCL in the near term, could we have some mechanism for putting keys that Consul ignores that can be used for user metadata -- e.g.: if they start with an underscore or a double underscore?

I like the idea. Nomad supports HCL, so for people using both together this would allow more consistency across configurations.

馃憤

// , This might make it easier on us Puppeteers and Salt Stackers.

3480 will add HCL support

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lmb picture lmb  路  4Comments

powerman picture powerman  路  3Comments

nicholasjackson picture nicholasjackson  路  3Comments

darron picture darron  路  4Comments

pritam97 picture pritam97  路  3Comments