is it possible to set configuration values in the ...
# general
r
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
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
it is something that could make it's way into pulumi? Seems it would make sense to have project-wide configurations.
w
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
that and you wouldn't have to track configuration in code and/or yaml files + you could make use of the configuration secrets.
w
Yes - "default secrets" is indeed an important use case for this which isn't really possible today.