https://pulumi.com logo
Title
m

most-mouse-38002

11/29/2022, 10:53 AM
We have a case where I need to we have resources shared across different subscriptions (or accounts). In this specific case I need to update the firewall in one subscription and telling it to accept data from a vnet in a different subscription. What would I do? I cannot find any obvious documentation regarding this (other than manually creating a provider, but I just need to use a different subscription).
m

many-telephone-49025

11/29/2022, 11:22 AM
Did you tried to using StackReferences?
m

most-mouse-38002

11/29/2022, 11:23 AM
No, because I actually have to make changes in both subscriptions and one of them are not part of any stack. Probably a very edge case-ish thing?
m

many-telephone-49025

11/29/2022, 11:26 AM
Interessting. Maybe @limited-rainbow-51650 has some thoughts on this. I will check also internally with engineering about this.
l

limited-rainbow-51650

11/29/2022, 11:43 AM
@most-mouse-38002 are you talking about different Azure subscriptions? If so, this is a case where you create two explicit provider instances in your Pulumi program, each configured for a specific subscription. Once you have your two provider intances, you pass the first as the
provider
option to the firewall resource and the other to the vnet resource. https://www.pulumi.com/registry/packages/azure-native/api-docs/provider/#inputs
m

most-mouse-38002

11/29/2022, 11:48 AM
I guess the confusion on my end is the lack of “SubscriptionId” in the struct. I was using the
azuread.NewProvider()
, this makes more sense. Thank you! 👍
Thank you both 🙂