mach-composer-cli icon indicating copy to clipboard operation
mach-composer-cli copied to clipboard

Shared variables with multiple variable files

Open boro2g opened this issue 2 years ago • 1 comments

Is your proposal related to a problem?

As per discussion with TimL, in our project we're using a SOPS encoded variables file for secrets, but would also like to benefit from shared (non-secret) values we can apply to multiple components.

Examples would be things like common urls which need to be available in multiple components. One hackfix is to add a new component which exposes all the shared variables, which then exposes each as an output

Some gotchas

  • which value takes priority if variables clash

boro2g avatar Aug 22 '22 13:08 boro2g

I see no reason to not support multiple variable files. E.g.: mach-composer apply --var-file=config1.yml --var-file=config2.yml

mvantellingen avatar Dec 02 '22 16:12 mvantellingen