You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm... The gomplate docs implies that environment variable is a URL, I'm not sure I was aware that the consul package also understood that env var!
What's also concerning to me is that it looks like you're specifying the consul server address in both the env var and on the -d flag, and gomplate should use the -d value rather than the env var.
So there are two bugs here unfortunately. I'll take a look at these soon. FYI I'm gearing up to release gomplate 3.10.0 soon, and I'll make sure to get this fixed in that release 😉
As for workaround - you should be able to simply omit CONSUL_HTTP_ADDR entirely. Or setting the schema on CONSUL_HTTP_ADDR as well.
gomplate version: 3.9.0
Expected:
Running this command should successfully render the template.
env var:
CONSUL_HTTP_ADDR=127.0.0.1:8501
(which is valid as per consul docs)Actual:
Fails with error:
Additional info
This looks like it is due to
url.Parse
treating127.0.0.1:8501
as a relative url at line 82 in consul.go.This might be an instance of this issue.
Is there a suggested workaround /fix for this? I guess the most obvious is to add the optional scheme to the
CONSUL_HTTP_ADDR
env var?The text was updated successfully, but these errors were encountered: