Hi there, is `register_outputs()` mandatory in a ...
# python
b
Hi there, is
register_outputs()
mandatory in a
ComponentResource
to use a variable output in another top level resource ? or can i reference directly the
ComponentResource
class property ?
w
You can reference the class properties.
register_outputs()
should be called to indicate when you are done adding children (so the
...
in the CLI stop displaying), but other than that, any properties returned are just used for display in the CLI/diffs, not for anything in the programming model itself.
b
@white-balloon-205 Thank you for the explanation.
p
@white-balloon-205, how does another resource refer to the registered output promises so that they properly get included in the DAG? Or should I refer to the actual resources created inside the ComponentResource? eg, ComponentResource creates an AWS VPC and I register an output of the vpc.id as vpc_id. Should I refer to Component.vpc.id or Component.vpc_id?