delightful-queen-14969
08/25/2025, 5:09 AMerror: my-plugin:index:MyResource resource 'my-resource' has a problem: Unexpected <class 'Exception'>: Failed to export output. Root resource is not an instance of 'Stack':
What would have to be true for the root resource to not be a stack during the execution of pulumi up
? Almost certainly I am doing something wrong, just trying to understand how to debug issues like this oneechoing-dinner-19531
08/25/2025, 6:20 AMdelightful-queen-14969
08/25/2025, 6:33 AMechoing-dinner-19531
08/25/2025, 6:35 AMaloof-chef-41549
08/27/2025, 5:38 PMpulumi.export()
inside the constructor of a ComponentResource
. Export only work at the stack (root) level, not inside component resources.
You can remove the pulumi.export()
from the resource constructor and instead return the values from your componentResource
via self.register_outputs()
. then in your main.py, you can call pulumi.export()
on the properties exposed by your component.