This message was deleted.
# general
s
This message was deleted.
l
Don't make them
public
?
There is no relationship between registered outputs, and code that developers can use. Registered outputs is a Pulumi-internal concept, used for finalizing dependencies and update the graph (in the CLI) and resource widgets (Pulumi service).
To make something private in your ComponentResource class, just declare it as private / not public.
p
I'm using Python, which does not have private attributes.
There is no relationship between registered outputs, and code that developers can use.
What do you mean? Our stacks can't access a value from a previously deployed stack unless it was exported, and when you export a component it exposes every registered output.
Or does it just attempt to expose every attribute? That seems to be the case.
The docs say we should call
register_output
no matter what at the end of
__init__
. When would it matter whether we do or not?
l
The component method register_outputs isn't related to stack outputs. It's only about component outputs.
👍 1
There's a separate list of stack exports that you get to explicitly choose in your main project file.
E.g. this project exports only two values. The resources it creates probably have over 50 registered outputs between them, but only two are exported.
p
Thanks for the example. I was mixing up those two concepts.
👍 1
I have a class that produces many
Output
wrapped objects. Should they all be passed into
register_output
? Does it really matter?