gray-belgium-81846
07/11/2021, 6:31 PMtaskDefinition.run({cluster})
However, when I run pulumi up
I get:
error: Error: Cannot call '.get' during update or preview.
To manipulate the value of this Output, use '.apply' instead.
at Proxy.get (.../node_modules/@pulumi/pulumi/output.js:173:15)
at FargateTaskDefinition.run (.../node_modules/@pulumi/ecs/taskDefinition.ts:229:39)
Any ideas? I think I need to wrap this is an async function somehow, but some guidance would be appreciated. The sample code shows this working in response to an API gateway handler, but I’d like it to execute when the pulumi program runs.many-yak-61188
07/11/2021, 6:56 PMpulumi up
runs preview
before confirmation which is why the error is occurring. going to guess taskdefinition is of type Output
try using apply
- https://www.pulumi.com/docs/intro/concepts/inputs-outputs/gray-belgium-81846
07/11/2021, 7:07 PMawsx.ecs.FargateTaskDefinition
.
Somehow I need to create a new Output
that defers the execution of the taskDefinition.run