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

magnificent-smartphone-40853

06/16/2023, 9:08 PM
for a typescript project, if you execute resources by calling a an async function() within index.ts - how are resources exported to be used for stack reference? for example: index.ts
Copy code
const main = async (): Promise<void> => {
    const coreVpc = vpc.createVpc(...);
}

main();
should I just return the coreVpc var within the async function? does pulumi resolve the output in this case?
Copy code
const main = async (): Promise<{ coreVpc: Vpc }> => {
    const coreVpc = vpc.createVpc(...);

    return { coreVpc };
}

main();
36 Views