Hello, I'm trying to run a Fargate task whenever I...
# general
m
Hello, I'm trying to run a Fargate task whenever I deploy with
pulumi up
. I'm currently getting a runtime error because it seems pulumi is trying to execute the task during preview inspite of the fact that the call to
TaskDefinition.run()
is inside a pulumi
apply
call. How can I make sure this code is executed during deployment and not before ? The relevant error is
Copy code
error: Running program '/home/luis/Code/outmind/outmind-app/aws-architecture/src/index.ts' failed with an unhandled exception:
    Error: Cannot call '.get' during update or preview.
    To manipulate the value of this Output, use '.apply' instead.
and the origin of this is on
node_modules/@pulumi/ecs/taskDefinition.ts:226:39
where the code is getting the cluster id.