question about component resources and registering...
# general
f
question about component resources and registering new outputs... is there special syntax for accessing those outputs later? I have code like this to register the output:
Copy code
self.register_outputs({
    "endpoint":
    pulumi.Output.concat(
        "redis://",
        self.cluster.cache_nodes[0].address,
        ":",
        str(self.cluster.cache_nodes[0].port)
    )
})
but when I go to use it like this:
Copy code
cache.endpoint
I end up with the following:
Copy code
AttributeError: 'Cache' object has no attribute 'endpoint'
(this is all Python, BTW). Thanks in advance 🙇
l
Component resources are normal classes / objects in your language. You need to have a public property "endpoint" to access that.
register_outputs()
is used to register the property with Pulumi, as something that can be a stack output.
f
ah, gotcha... thanks, I'll give that a try.