I'm working on consul-template for the first time. I'm trying to do a simple test for existence, before fetching a value from Vault. I've already validated that I can't fetch the value from Vault, but consul-template doesn't seem to like my conditional:
FOO_VALUE {{ if isset .ENV.FOO }} {{ .ENV.FOO }} {{ else }} {{ with secret "secret/stuff"}}{{.Data.FOO }}{{ end }}
But when I try to run it, I get this error:
Consul Template returned errors:
template: template: test.tmpl:1: function "isset" not defined
I thought the documentation for consul-template indicates that templates are in Go Template format and I pulled "isset" right out of the primer for conditionals in the Go Template documentation.
Am I missing something?