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

[ Question ] Is there a way to override dependency var using -var-file ? #612

Open
guyteubbe opened this issue Dec 20, 2024 · 1 comment

Comments

@guyteubbe
Copy link

Hi,

When creating a main pack which in turns uses dependencies, I would like my main pack to override the var values in these dependencies.

Context:
This main pack uses prometheus pack dependency from the community registry.

If I use the -var-file argument, with an override file in which I define prometheus_task_resources={"cpu" = 500, "memory" = 512}, it's not working:

nomad-pack render --parser-v1 -var-file="./monitoring/override.hcl" ./monitoring

The dependency variables values still apply.

My understanding, taken from the docs, is that I need to use the entire dependency object to modify the var value. Indeed, the doc says:

nomad-pack run hello_pack_with_deps --var demo_dep.message="example"

What I'm doing:

So, when using -var argument and not -var-file anymore, if I use:

nomad-pack render --parser-v1 -var 'prometheus.prometheus_task_resources={"cpu"=500,"memory"=512}' ./monitoring

It's working.

Question:

How to do the same with -var-file ?

I see there is this issue which mentions something similar. Is this a missing feature ?

Thanks

@guyteubbe
Copy link
Author

@angrycub Maybe you can help me with that ?
Thanks !

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

1 participant