consul-template icon indicating copy to clipboard operation
consul-template copied to clipboard

Can we have a way to load the consul-template from web in addition from disk

Open ShriprasadM opened this issue 4 years ago • 6 comments

Currently, there is a way for defining the source of the consul template source = path/to/disk

Looking for a way where I can pick the template from HTTP location. For example

  1. Kubernetes is deploying a specific tagged version of an application
  2. Vault is setup as sidecar container for this application
  3. want to pass application specific YAML file to vault as consul template.
  4. Here application specific file will be present inside tag hosted on github. e.g. http://githuburl/app/v12/application.yaml
  5. Here looking for way where I can specify http path like
  6. source = http://githuburl/app/v12/application.yaml

ShriprasadM avatar Sep 16 '20 13:09 ShriprasadM

Hey @ShriprasadM, thanks for taking the time to submit.

There is obviously nothing built into consul-template to do this right now. I'd probably try to do something to grab that template in a startup script as the templates are read in during initial setup so they must already be present.

eikenb avatar Sep 16 '20 20:09 eikenb

Thanks @eikenb for the update ! I think that would be helpful.

ShriprasadM avatar Sep 17 '20 09:09 ShriprasadM

@eikenb it would be nice if we can make some provision to pass the token while making this call.

ShriprasadM avatar Sep 22 '20 05:09 ShriprasadM

Any updates on this ?

ShriprasadM avatar Oct 09 '20 07:10 ShriprasadM

Hey @ShriprasadM,

Nothing yet. We're currently heads down on a new product. Once that has settled down a bit we'll be able to get back around to existing projects and bring in some of the new work on them. You are always welcome work on this yourself and submit a PR if you'd like to speed things up. Thank you for your patience.

eikenb avatar Oct 09 '20 23:10 eikenb

Just throwing in my two cents. Personally, I think accessing arbitrary URLs is probably out of scope for this. But I've repeatedly wanted to be able to do things like:

source = "consul:///path/to/a/kv/entry.tpl"
source_fallback = "<nothing set>"

*fallback not strictly required, but would be immensely helpful

dekimsey avatar Jun 23 '21 21:06 dekimsey