Generating a config file for a Consul agent currently means either using string templating to generate HCL or generating JSON. It would be nice if there were a data that would produce valid config HCL instead of having to resort to templating structured data with string templates, or JSON.
And then written to a file or wherever with data.consul_agent_config_file.example.hcl.
I'm easy on the names. Considering there is already a data called consul_agent_config which refers to fetching config with the API, I'm not sure what to call this to make it clear.
Generating a config file for a Consul agent currently means either using string templating to generate HCL or generating JSON. It would be nice if there were a
data
that would produce valid config HCL instead of having to resort to templating structured data with string templates, or JSON.Similar to
vault_policy_document
.It could look something like this:
And then written to a file or wherever with
data.consul_agent_config_file.example.hcl
.I'm easy on the names. Considering there is already a data called
consul_agent_config
which refers to fetching config with the API, I'm not sure what to call this to make it clear.