I'd like to manage resources across >1 Azure subscriptions simultaneously in one Pulumi program / stack. Is there a good example for this scenario I could start from?
g
green-school-95910
06/04/2020, 9:07 PM
You can create multiple providers
Not sure if there is an example using azure, but essentially you pass the provider to the resource options
n
numerous-garage-30550
06/04/2020, 9:12 PM
Thanks! Is there any other (non-Azure) example I can get insights from?
There's also an example somewhere of using multiple AWS providers, one per region.. can't locate it right now...
n
numerous-garage-30550
06/04/2020, 9:16 PM
Perfect, thanks! That's exactly what I was looking for!
👍 1
g
gentle-diamond-70147
06/04/2020, 9:34 PM
Explicit providers is the way to do this as @little-cartoon-10569 suggested.
Here's a Go/AWS example that iterates a list of regions to deploy to and creates a provider and set of resources in each region - https://github.com/pulumi/examples/blob/master/aws-go-console-slack-notification/main.go. The concept would be the same for Azure or any other provider.