https://pulumi.com logo
#getting-started
Title
# getting-started
c

clever-address-74879

06/07/2022, 9:18 PM
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

little-cartoon-10569

06/07/2022, 9:25 PM
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

clever-address-74879

06/07/2022, 9:28 PM
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
3 Views