Hello everybody! Would you have any updates on thi...
# general
s
Hello everybody! Would you have any updates on this feature request: https://github.com/pulumi/pulumi/issues/2307? We are looking for some elegant way to load defaults from the template?
w
Could you share a little more (either here or in the issue) on what problem exactly you are trying to solve? There may be recommendations on alternative food approaches you can take today.
s
We would like to define default values in a main configuration file then each environment configuration file would override only the necessary config values. Main point would be not to define redundant values in each environment.
w
The typical way to do that today is to put default values in the Pulumi program. Does that work for your scenario?
s
Yes, thanks that will work! I guess to get it from a config file we need to build some yaml merge script to combine default values and environment values.
w
Great. Yes - if you want the defaults to live in YAML/JSON - you can read off disk - or else just put the default values directly in data in your
.ts
or
.py
files. The fact that it’s all just code means you can generally solve for hierarchicical config in very flexible ways without the need for a built-in feature.
s
Yeah! That is the reason why I prefer Pulumi over Terraform!
🙂 1