Hello @aloof-sugar-9157, if you create the cluster and the tasks in the same Pulumi stack, when you destroy that stack, Pulumi tries to destroy the task(s) and the cluster.
If the cluster should be shared by many tasks, create the cluster in a separate Pulumi program+stack and export the cluster information as stack output(s). From the program setting up the tasks, use a StackReference to resolve this information and deploy the tasks on the shared cluster. If you now destroy a stack managing one or more tasks, it will not touch the shared cluster.
Diagnostics:
aws:ecs:Service (ITD-1234-wc-ecs-service):
error: deleting urn:pulumi:ITD-1234::wirecare::aws:ecs/service:Service::ITD-1234-wc-ecs-service: 1 error occurred:
* waiting for ECS Service (arn:aws:ecs:us-east-1:877180728458:service/p-wirecare/ITD-1234-wc-ecs-service) delete: timeout while waiting for state to become 'INACTIVE' (last state: 'DRAINING', timeout: 20m0s)
aloof-sugar-9157
07/03/2023, 6:51 PM
We are creating the service cluster in a different stack set
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.