https://pulumi.com logo
s

silly-dusk-21491

01/29/2020, 11:24 AM
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

white-balloon-205

01/29/2020, 3:15 PM
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

silly-dusk-21491

01/29/2020, 3:43 PM
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

white-balloon-205

01/29/2020, 4:52 PM
The typical way to do that today is to put default values in the Pulumi program. Does that work for your scenario?
s

silly-dusk-21491

01/29/2020, 5:28 PM
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

white-balloon-205

01/29/2020, 5:30 PM
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

silly-dusk-21491

01/29/2020, 5:57 PM
Yeah! That is the reason why I prefer Pulumi over Terraform!
🙂 1