damp-cartoon-25024
12/14/2022, 9:28 AMpulumi config set azure:subscriptionId 12345678-1234-1234-1234-123456789abc
And using it in code:
_currentId = config.require("azure:subscriptionId");
Which fails
error: Missing required configuration variable 'app:azure:subscriptionId'
please set a value using the command `pulumi config set app:azure:subscriptionId <value>`
Where did the app:
come from?
The command it suggests fails as well:
~#@❯ pulumi config set app:azure:subscriptionId 12345678-1234-1234-1234-123456789abc
error: invalid configuration key: could not parse app:azure:subscriptionId as a configuration key (configuration keys should be of the form `<namespace>:<name>`)
What am I missing?limited-rainbow-51650
12/14/2022, 9:47 AMapp
is your project name? This is for config the default namespace. If you want to retrieve subscriptionId
from the azure
namespace, you have to create a separate config object for the azure
namespace first, then retrieve the right key:
const azureConfig = new pulumi.Config("azure");
const subscription = azureConfig.require("subscriptionId");
damp-cartoon-25024
12/14/2022, 9:55 AM