I'm getting this error while trying to delete my s...
# general
f
I'm getting this error while trying to delete my stack:
Copy code
aws:ecs:Cluster (app):
    error: Plan apply failed: deleting urn:pulumi:basic-web-kenny::basic-web::awsinfra:x:ecs:Cluster$aws:ecs/cluster:Cluster::app: ClusterContainsServicesException: The Cluster cannot be deleted while Services are active.
        status code: 400, request id: aa1fa14b-5f9b-11e9-bfb5-ab10608170ab
The ECS cluster named
app
does not exist so I'm not sure how it could have active Services. Any ideas?
w
When you say it doesn't exist - you mean it was deleted somehow outside of Pulumi? If so, you can
pulumi state delete 'urn:pulumi:basic-web-kenny::basic-web::awsinfra:x:ecs:Cluster$aws:ecs/cluster:Cluster::app'
to remove it from Pulumi's state so that Pulumi doesn't try to delete it again. That said - the error message you are seeing sounds surprising if that is the case. Are you sure the cluster does not exist in AWS anymore?
f
Can't recall how it was deleted but am 100% certain it does not exist anymore.
w
Okay - then
pulumi state delete
should help here.
f
Also, a bit annoying - when I run
pulumi destroy
on this stack, it stays on this UI for 10 minutes:
Copy code
Type                 Name                       Status       
     pulumi:pulumi:Stack  basic-web-basic-web-kenny               
 -   └─ aws:ecs:Cluster   app                        deleting
Seems like it could exit a lot earlier.
w
Yes - I believe it retries for 10 minutes. This is unfortunate, but I think there are cases where it can take several minutes to delete successfully even under "normal" conditions.
f
That makes sense. Though if the resource does not exist, I don't think it would change after 10 mins.