high-barista-92349
10/07/2022, 10:20 AMimport * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
import * as pulumi from "@pulumi/pulumi";
const vpcId = "vpc-xxx";
const awsxVpc = new awsx.ec2.Vpc("vpc", {vpcId});
console.log(`subnets: ${await awsxVpc.publicSubnetsIds}`);
console.log(`private: ${await awsxVpc.privateSubnetIds}`);
...
// A bunch of resources generated e.g. new aws.ec2.Instance(...)
IIUC, I can only run the pulumi runtime via pulumi pre to trigger the code above and see the output because the entry point is always index.ts.
For new projects this is fine as the overall resources managed is small and this is fast. However, for existing large pulumi projects, this workflow becomes very tedious and annoying because it tries to preview all the other resources that aren't changed.billowy-army-68599
I can only run the pulumi runtime via pulumi pre to trigger the code above and see the output because the entry point is always index.ts.You can use automation API to trigger deployments, but they invoke the pulumi CLI, yes
console.log
an output, you need to do that inside an applyhigh-barista-92349
10/07/2022, 3:57 PMDiagnostics:
pulumi:pulumi:Stack (demo)
error: Running program '...' failed with an unhandled exception:
SyntaxError: Unexpected identifier
billowy-army-68599
high-barista-92349
10/07/2022, 4:53 PMripe-russia-4239
10/09/2022, 10:51 AMdebugger
statement somewhere in your program?