All, Is it possible to convert my server.cert.template file in to server.cert using consul template and consul KV.
In my Consul am defining a KV pair as follows:
SERVER_SSL_CERT = 4r4ffqh;fhq2fhwhhqwpihpvhqv'in3v3rvnrqpnrvnnvvqn
And my server.cert.template looks as follows:
-----BEGIN CERTIFICATE-----
${SERVER_SSL_CERT}
-----END CERTIFICATE-----
Earlier I was using local files for this substitution. Can consul handle this and if so how ? How do I query consul to dump this value here ?
Thanks
So I got this working as follows. Sharing it in case some one comes across a similar situation. Contents of my template file are as follows:
When we run consul-template on it, it will print the value as part of the last line.