adamant-motorcycle-38425
11/18/2019, 2:22 PMindex.ts
. It returns a promise. How can I do:
const someAwsValue = await new AWS().someService().someMethod().promise();
or similar in index.ts? Or even:
new AWS().someService().someMethod(params, (someAwsValue)=> {
// do Pulumi things in here, referencing someAwsValue in scope
})
Pulumi won't let me wrap everything in a top-level async function without dying. I tried looking in the docs how to use aws-sdks or perform async things inside of a Pulumi project, not sure how to proceed. 😐billowy-laptop-45963
11/18/2019, 4:46 PMconst someAttribute = pulumi.output(myPromise).apply(result => result.someAttribute)
and then it can be used:
new aws.s3.Bucket('mybucket', {name: someAttribute})
pulumi.all([promise1, promise2,...]).apply(([resolved1, resolved2, ...]) => ....)
adamant-motorcycle-38425
11/18/2019, 9:49 PM