why can't I access component resource outputs within pulumi export?
Copy code
vpc = VPC(...)
pulumi.export("vpc_id", vpc.id) # this doesn't work
2. could you point me in the doc where it is described the purpose of Pulumi.stack.yaml file, and what can I do with it? in particular I am interested in how not to use it and provide region and role programmaticallyhttps://www.pulumi.com/docs/iac/concepts/config/
a
adorable-computer-41765
01/15/2025, 7:45 PM
In your case does vpc.vpc.id work. register_outputs() only really tells the engine that the component resource is done provisioning.
c
calm-actor-89994
01/15/2025, 9:07 PM
vpc.vpc.id does work, but that's not what I want. as it feels like a leaking abstraction for component consumers.
a
adorable-computer-41765
01/15/2025, 9:08 PM
You can assign
self.id = self.vpc.id
and it would work the way you want it there.
c
calm-actor-89994
01/15/2025, 9:14 PM
ok, I will do that, thanks. how do pulumi defined resources handle this? as there isn't any problem to access outputs from those
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.