I was looking through the docs and some GitHub issues, but still wasn't able to find a clear answer to this. I did attempt to use the namespace name in
new Config()
as well, but it seemed to be looking in the correct one originally as well 🤔
t
tall-librarian-49374
12/28/2020, 7:33 AM
Hi Olga, welcome!
Every config value is prefixed with a namespace. The default namespace is the same as you project name. So,
new Config
looks for config values named
dotnettestservice:foo
. You should either
a) Change you
yaml
files to contain settings called
dotnettestservice:environment
b) Leave the config files as-is and change your code to
var config = new Config("app"); config.Require("environment");
❤️ 1
tall-librarian-49374
12/28/2020, 7:34 AM
You can use the Pulumi CLI to set config values.
pulumi config set environment test
will automatically add the project name to the YAML file. Give it a try.
b
bitter-coat-39627
12/28/2020, 2:14 PM
🤦♀️ That makes so much sense. I definitely misinterpreted the documentation. It worked 😄
THANK YOU!
t
tall-librarian-49374
12/28/2020, 2:20 PM
I feel like it’s a common misunderstanding. We should probably improve our docs. Feel free to fire an issue if you see a part that’s particularly confusing.
For sure, don’t feel bad about yourself!
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.