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

[FEATURE] Support multiple var-files #179

Closed
rkettelerij opened this issue May 25, 2018 · 2 comments
Closed

[FEATURE] Support multiple var-files #179

rkettelerij opened this issue May 25, 2018 · 2 comments

Comments

@rkettelerij
Copy link
Contributor

Currently levant only supports one -var-file argument. It's possible to overwrite variables in the variables file by providing one or more -var="k=v" arguments. It would be convenient to also support multiple -var-file arguments.

My use case is that I have one generic variables files and several application specific variable files. Therefore I'd like to do something like this:

./levant render -var-file=generic.yaml -var-file=specific.tf -var="job_name=myjob" mytemplate.nomad

Thus supply multiple -var-files where variable files are evaluated in the order in which they are specified on the command line. If a particular variable is defined in more than one variable file, the last value specified is effective. This is identical to the way Terraform handles multiple var-files.

@rkettelerij
Copy link
Contributor Author

PR submitted: #180

@stevenscg
Copy link

Nice feature idea! I've run into this a few times myself. While I've been able to work around those cases, this would allow some de-duplication of some vars.

jrasell added a commit that referenced this issue Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants