If you're using Pulumi Cloud, you could try using the rest api to get the stack's state:
https://www.pulumi.com/docs/pulumi-cloud/cloud-rest-api/#get-stack-state
However I'm not sure if this will expose secrets or not.
I ended up using the pulumi cli to access outputs across tooling, which I know you're trying to avoid
f
full-oxygen-23886
11/08/2023, 4:46 PM
Thanks for the info and the REST API reference. IMO, ideally with a library it could access the state from wherever it is stored.
d
dry-keyboard-94795
11/08/2023, 4:57 PM
It's something that's been asked for a few times. I think Pulumi ESC will fill the gap in the future once more functionality is added