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

boundless-angle-56560

06/15/2021, 2:06 PM
Hi all, when working two resource providers (two AWS accounts), is there some better way (less boiler plate) to work with two resoure providers then having to pass ResourceOptions(provider=aws_acc) to every single resource I need in my pulumi program ?
b

billowy-army-68599

06/15/2021, 2:07 PM
there currently isn't, short of using different stacks and passing providers that way
b

boundless-angle-56560

06/15/2021, 2:09 PM
different stack means different pulumi programs and thus different runs right ?
b

bored-oyster-3147

06/15/2021, 2:31 PM
Alternatively with some code organization you could limit the number of times you need to explicitly pass your provider because ComponentResources enabling inheriting resource providers. But this just means that in your component resource you will be doing
ResourceOptions(parent=this)
for all resources instead
b

boundless-angle-56560

06/15/2021, 3:07 PM
I kinda like this because the parent relationship I already have in place 🙂
It actually sounds like the ComponentResource is a good container to hold various other common settings