https://pulumi.com logo
#general
Title
# general
r

red-lamp-97876

01/25/2019, 9:36 PM
is it possible to set configuration values in the global
Pulumi.yaml
file and override the values if needed in the
Pulumi.{stack}.yaml
?
w

white-balloon-205

01/25/2019, 10:18 PM
There isn't a notion of "default configuration" in the
Pulumi.yaml
currently. Instead, you just put the defaults in code:
Copy code
const config = new pulumi.Config();
const myconfigvalue = config.get("myconfigvalue") || "helloworld";
👍 1
r

red-lamp-97876

01/25/2019, 10:28 PM
it is something that could make it's way into pulumi? Seems it would make sense to have project-wide configurations.
w

white-balloon-205

01/25/2019, 10:36 PM
project-wide configurations
Note that the code above does accomplish "project-wide configurations". Just like all the other default behaviour of the project is defined in the code. That said, there is a documentation benefit to specifiying what configuration (from outside the code) is allowed, and what defaults will be used in case that configuration is not provided. We're tracking this generally in https://github.com/pulumi/pulumi/issues/1052.
r

red-lamp-97876

01/25/2019, 10:43 PM
that and you wouldn't have to track configuration in code and/or yaml files + you could make use of the configuration secrets.
w

white-balloon-205

01/25/2019, 10:48 PM
Yes - "default secrets" is indeed an important use case for this which isn't really possible today.