big-glass-16858
05/22/2019, 12:24 PMregisterOutputs()
, for example gh:jen20/pulumi-aws-vpc does not look to have one but the docs says it is recommended, should all the exported values by registered in registerOutputs()
? . Also, is it okay to access directly members of an ComponentRessource Instance ? let's say I have a something like this :
class MyRes(ComponentResource):
def __init__(self, str_example: pulumi.Input[str], opts=None) -> None:
props = {
"str_example": str_example,
}
super(MyRes, self).__init__(
'custom:my_res',
name,
props,
opts)
self.str_example = str_example
self.register_outputs({})
my_res = MyRes('example')
# use my_res.str_example
It seems to work just fine (getting type pulumi.Output[T]) , is that incorrect ?broad-dog-22463
05/22/2019, 12:53 PMstocky-spoon-28903
05/22/2019, 12:56 PMbig-glass-16858
05/22/2019, 12:57 PMstocky-spoon-28903
05/22/2019, 2:24 PMregisterOutputs
herebig-glass-16858
05/22/2019, 2:51 PMregisterOutputs()
? Also Is it okay to use instance members from a ComponentResource to use in another component ?