https://pulumi.com logo
h

high-translator-22614

07/25/2019, 8:07 PM
ok, one thing that's never clear: What's the best way to get the current AWS region inside of a
ComponentResource
?
w

white-balloon-205

07/25/2019, 8:08 PM
It's unfortunately not super simple if you want to handle both first-class providers and default providers.
But there is some boilerplate that does work - let me find it.
We do hope to generalize the helpers in
aws.config.region
to be able to look up the region associated with a given provider or resource to automate the process better (those helpers were designed before we had first-class providers).
h

high-translator-22614

07/25/2019, 8:11 PM
what sort of
Resource
defines
getProvider
?
ok, looks like its defined on the top-level
Resource
w

white-balloon-205

07/25/2019, 8:13 PM
Yep - that's right.
h

high-translator-22614

07/25/2019, 8:14 PM
thanks, i can work with that