https://pulumi.com logo
Title
b

breezy-answer-83664

04/24/2020, 7:12 PM
Hello, In one stack, I'm deploying a VNet (Spoke) in subscription A / resource group B. Now, I would like to peer this VNet (Spoke) to another VNet (Hub) in subscription C / resource group D. The service principal I'm using to run pulumi up has Contributor role on both resource groups B and D. I'm able to deploy the peering from VNet (Spoke) to VNet (Hub) as the pulumi up config is using subscription A. Of course when trying to deploy the peering in the other way, it's not working, resource group D is not known in subscription A. How could I deploy in multiple subscriptions inside the same stack? is it possible?
t

tall-librarian-49374

04/24/2020, 8:08 PM
Yes, you can create an explicit Provider, set its subscriptionId, and then pass that provider in the resource options for the VNet https://github.com/pulumi/pulumi-azure/blob/master/sdk/nodejs/provider.ts#L133
b

breezy-answer-83664

04/25/2020, 12:04 PM
Thanks a lot, it works super fine 😊
🎉 1