https://pulumi.com logo
Title
a

ancient-megabyte-79588

04/01/2020, 6:26 PM
export const resourceGroupName = "<your_resource_group_name>";
// get the Azure Resource Group
const resourceGroup = azure.core.ResourceGroup.get(resourceGroupName, `/subscriptions/<subscriptionId>/resourceGroups/${resourceGroupName}`);
@enough-kite-69616 ^^^
e

enough-kite-69616

04/01/2020, 6:27 PM
What's the subscriptionId there from?
@ancient-megabyte-79588 ^^^
a

ancient-megabyte-79588

04/01/2020, 6:29 PM
You can find it in the azure portal
It might be available somewhere in the pulumi object model already.. I haven't looked for it to make this totally automated
const clientConfig = azure.core.getClientConfig();
export const subscriptionId = clientConfig.subscriptionId;
This gets the subscriptionId from your currently connected
az
connection
I'm not certain how that would work in a CI/CD scenario
Oh.. I also just noticed that one of your error messages had the ID in it too! 😄
e

enough-kite-69616

04/01/2020, 7:26 PM
Ah, thanks!