sorry, I think I misunderstood the goal of registe...
# python
n
sorry, I think I misunderstood the goal of register_outputs 🤔
g
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
we do have mostly our custom classes inheriting from
pulumi.ResourceComponent
, doing
pulumi.export
in those classes
__init__
seems to work pretty well
g
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