https://pulumi.com logo
#python
Title
# python
n

nutritious-shampoo-16116

10/27/2021, 2:19 PM
sorry, I think I misunderstood the goal of register_outputs 🤔
g

great-sunset-355

10/27/2021, 3:24 PM
yeah it's kind of forgotten function. If you want stack outputs I'd strongly recommend creating the stack outputs only in
__main__.py
otherwise you'll run into problems
n

nutritious-shampoo-16116

10/27/2021, 3:30 PM
we do have mostly our custom classes inheriting from
pulumi.ResourceComponent
, doing
pulumi.export
in those classes
__init__
seems to work pretty well
g

great-sunset-355

10/27/2021, 3:32 PM
I just hope it won't bite you back because with
pulumi.export
you are literally exposing a local value globally. And it is just waiting for a name clash in the
exports
dictionary.
it also makes searching for the orging where the export came from very difficult