var config = new Pulumi.Config();
var clientId = config.Require("azure:clientId");
This is also incorrect, config is namespaced, so you’d need to do:
Copy code
var config = new Pulumi.Config("azure");
var clientId = config.Require("clientId");
Config is namespaced. Again, note the casing.
❤️ 1
n
numerous-solstice-19110
05/29/2023, 4:39 PM
ok. so when I add my own namespace I need to say in the Pulumi.Config to tell it to use my configs from that section?
so pulumi config set aws:foo <value>
Copy code
var config = new Pulumi.Config("aws");
var clientId = config.Require("foo");
?
b
billowy-army-68599
05/29/2023, 4:42 PM
yes that’s right
billowy-army-68599
05/29/2023, 4:42 PM
but provider namespaces are reserved for that provider
billowy-army-68599
05/29/2023, 4:42 PM
so if you use the AWS provider
var config = new Pulumi.Config("aws");
needs a valid value from the AWS provider
n
numerous-solstice-19110
05/29/2023, 4:44 PM
ok. What I do it that in Powershell I create an app registration and a sercvice principle for that one. I can't do it with Pulumi because I can't set the build server as an owner to tha app registration. So in that case I want to store the serviceprinciple to my config. that's why i named it azure:clientId but then it might be bad to say azure: I wanted to namespace all settings I might need to add for azure parts to my pulumi.<env>.yamls
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.