https://pulumi.com logo
#azure
Title
# azure
b

best-jordan-23853

01/28/2020, 9:49 PM
Hi, I’m a newbie for Pulumi. I’d like to create a Azure Policy and following the sample at https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/azure/policy/#Assignment I didn’t find any sample setting the Subscription even Resource Group. I’ve tried core.GetSubscriptionResult and core.GetClientConfigResult to get the SubscriptionId but those values are always None. I’m using Python.
t

tall-librarian-49374

01/29/2020, 7:35 AM
Hi, the example there shows how to assign to a resource group — setting
scope
to
exampleResourceGroup.id
.
You can get the subscription ID from
azure.core.getClientConfig().subscriptionId
That’s TypeScript, but should be almost the same in Python
b

best-jordan-23853

01/29/2020, 3:14 PM
Hi @tall-librarian-49374! Thanks a lot! It’s work 🙂
🎉 1
3 Views