https://pulumi.com logo
#general
Title
# general
l

little-garage-43399

05/18/2019, 3:27 PM
Hi guys! I want to get the outputs for a stack from an HTTP API, not using the command line (running in serverless/node js app), is there any way supported?
a

ambitious-van-68615

05/18/2019, 3:55 PM
Maybe you can pass it to your API and get it with any http get for node ? (like request or axios) ?
l

little-garage-43399

05/18/2019, 4:07 PM
I can, but I don't see the point passing data around which is already stored on Pulumi's servers. Additionally, every stack is run as a job which means I don't 'wait' for it to return so I would have loved some way of just getting the outputs from an HTTP endpoint.
s

stocky-spoon-28903

05/18/2019, 4:57 PM
There is an endpoint which exposes this (which is what
StackReference
and friends use) - what I can’t tell you right now is whether the API endpoint is “public contract” API or an implementation detail subject to change.
l

little-garage-43399

05/18/2019, 5:46 PM
I wasn't aware of the StackReference, thanks, this could have probably solved my problem, tho trying to use it and get the following error:
Copy code
Error: Program run without the `pulumi` CLI; this may not be what you want (enable PULUMI_TEST_MODE to disable this error)
I tried to set the Environment Variable PULUMI_TEST_MODE to: false, False,1, true, True, 0. still doesn't work, haven't found any documentation.
s

stocky-spoon-28903

05/18/2019, 11:22 PM
Are you executing your program via
pulumi up
?
l

little-garage-43399

05/19/2019, 7:42 AM
no, intentionally. I want to use the API without the command line.
@stocky-spoon-28903 can it be done?
s

stocky-spoon-28903

05/19/2019, 12:18 PM
Not via stack reference - that’s a resource that will only execute in the context of the engine
The underlying API may be usable but I don’t know offhand if it’s guaranteed stable