Hey folks, is it possible to access local Pulumi o...
# getting-started
l
Hey folks, is it possible to access local Pulumi outputs from an application that isn’t a Pulumi project? Trying to use the outputs of the infrastructure to run some automated tests dynamically. Doing the following gives me an error of `TypeError: Cannot read properties of undefined (reading 'mainVMIPAddress')`:
Copy code
const infrastructureStack = new pulumi.StackReference("organization/infrastructure/dev");
    const mainVMIPAddress = (await infrastructureStack.getOutputDetails("mainVMIPAddress")).value as string;
g
Not directly using
StackReference
outside the context of a Pulumi project. Two options would be to use the Pulumi CLI to access the outputs of the desired project using a bash script or you could also use the Automation API. The latter seems possibly a better choice for you as you appear to want to do this in typsecript code.
l
That worked, thank you!
g
👍