I'm trying to call fargateTaskDefinition.run after...
# general
b
I'm trying to call fargateTaskDefinition.run after creating it but the sourcecode calls a
.get
function https://github.com/pulumi/pulumi-awsx/blob/5b247e093ed7e8a789c4a34663a5ef8a3a5acef3/nodejs/awsx/ecs/taskDefinition.ts#L226 which then leads to this error
Error: Cannot call '.get' during update or preview.
. I was wondering if there's a correct way of using this or if the source needs an update?
w
Yes - the current
task.run
is designed for use at “runtime” - that is inside code that is serialized into a Lambda or similar. It should be possible to support this same API also being used at deployment time - would you mind opening an issue with this request?