Hi, I'm referencing values from one stack to anoth...
# general
Hi, I'm referencing values from one stack to another, but some of those values might not exist, which is fine. I know the difference between RequireOutput and GetOutput using StackReference, but there doesn't seem to be a way to actually check if the value exists or not using an
. GetOutput never fails, but returns
as an Output, which then translates to the boolean
. Is there any way around this?
Copy code
import * as pulumi from "@pulumi/pulumi";

const config = new pulumi.Config("my-config");
const myVar = config.get("my-config-value");

if (typeof myVar !== 'undefined') {
    console.log('Config value exists');
} else {
    console.log('Config value does not exist');
But that's for configuration values, not Pulumi outputs from another stack.