https://pulumi.com logo
#general
Title
# general
f

full-dress-10026

04/15/2019, 4:34 PM
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

white-balloon-205

04/15/2019, 4:37 PM
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

full-dress-10026

04/15/2019, 4:38 PM
Can't recall how it was deleted but am 100% certain it does not exist anymore.
w

white-balloon-205

04/15/2019, 4:38 PM
Okay - then
pulumi state delete
should help here.
f

full-dress-10026

04/15/2019, 4:39 PM
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

white-balloon-205

04/15/2019, 4:40 PM
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

full-dress-10026

04/15/2019, 4:41 PM
That makes sense. Though if the resource does not exist, I don't think it would change after 10 mins.
5 Views