Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: multiple key's prefixes in templates like in envconsul #2751

Closed
pznamensky opened this issue Jun 28, 2017 · 3 comments
Closed

Comments

@pznamensky
Copy link

Recently @schmichael implemented envconsul-like support #2654. But as mentioned in closed #1765 it would be great to support multiple prefixes.
We are using multiple prefixes in envconsul when executing some applications. And it is very convenient.
Didn't you think about adding ability to merge keys from multiple prefixes in nomad's template?

@dadgar
Copy link
Contributor

dadgar commented Jul 1, 2017

Hey this can be achieved already:

       template {
         data          = <<EOF
{{ range ls "foo/" }}
{{ .Key }}={{ .Value }}{{ end }}
         EOF
         destination   = "local/file.yml"
         env = true
       }

@dadgar dadgar closed this as completed Jul 1, 2017
@pznamensky
Copy link
Author

Indeed keys from multiple prefixes are merged.
@dadgar, thanks!

       template {
         data          = <<EOF
{{ range ls "global/" }}
{{ .Key }}={{ .Value }}{{ end }}
{{ range ls "app/appname" }}
{{ .Key }}={{ .Value }}{{ end }}
         EOF
         destination   = "local/file.yml"
         env = true
       }

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants