Hi again <#C01PF3E1B8V|getting-started> I'm settin...
# getting-started
c
Hi again #getting-started I'm setting a
mysql:admin-password
in my
Pulumi.test.yml
and then I do
_config = new Pulumi.Config();
. But when I try to fetch it with
_config.RequireSecret("mysql:admin-password")
it throws
Pulumi.Config+ConfigMissingException: Missing Required configuration variable 'bigday:mysql:admin-password'
l
Use the bit before the colon as the parameter to
new Config()
. The bit after the (last) colon is require/get parameter
Copy code
_config = new Pulumi.Config("mysql")
_config.RequireSecret("admin-password")
🙏 1
When you call
new Config()
, it's implicitly adding the project name. For any other prefix / namespace, you have to provide it as the parameter to
new Config()
.
🙏 1
c
Aaah I see! Thanks @little-cartoon-10569!
👍 1
Copy code
var config = new Pulumi.Config("mysql");
_config.RequireSecret("admin-password")
Copy code
➜ pulumi config
KEY                    VALUE
azure-native:location  westeurope
mysql:admin-password   [secret]
Pulumi.Config+ConfigMissingException: Missing Required configuration variable 'bigday:admin-password'
please set a value using the command
pulumi config set bigday:admin-password <value>
Ah my bad
Works now 😄
🎉 1