sparse-intern-71089
09/25/2020, 12:34 PMproud-pizza-80589
09/25/2020, 12:54 PMlemon-agent-27707
09/25/2020, 1:00 PMlemon-agent-27707
09/25/2020, 1:00 PMlemon-agent-27707
09/25/2020, 1:07 PMnode index.js
and everything works as expected including debugging. Here's an example program that I wrote in typescript:
import { LocalWorkspace, UpOptions } from "@pulumi/pulumi/x/automation";
import * as aws from "@pulumi/aws";
LocalWorkspace.UpsertStackInlineSource("pulumi/myBucket", "inlineNodeProject", async () => {
const bucket = new aws.s3.Bucket("my-bucket");
return { exp_static: "foo", abc: "def", bucketName: bucket.id };
}).then((stack) => {
return stack.setConfig("aws:region", { value: "us-west-2" }).then(() => {
const upOpts: UpOptions = { onOutput: (out) => { <http://console.info|console.info>(out.toString()) } };
return stack.up(upOpts).then((res) => { console.log(res.outputs) })
})
}).catch(err => console.log(err));