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

ambitious-agent-35343

08/05/2022, 9:39 AM
Is there a way to have ``pulumi destroy`` delete as much as possible and ignore failures?
l

limited-rainbow-51650

08/05/2022, 10:04 AM
You shouldn’t have failures. If you have them because resources are still in use, most probably you don’t have the right dependencies between your resources in your Pulumi code. For instance, you create a dependency between two resources if you pass an
Output
from one resource as an input to a next. This will sequence the creation of the resources at
pulumi up
and will (in reverse order) sequence the deletion of resources at
pulumi destroy
.
a

ambitious-agent-35343

08/23/2022, 12:02 PM
hmmm... I probably messed something up, but I am still curios if this is an option X)
d

damp-honey-93158

08/23/2022, 2:48 PM
Not as far as I know either - I solved my issues in this arena by following Ringo's advice. In my particular case I had resources in an AKS cluster that needed a few explicit dependsOn statements (C# in my work - concept is the same across any language though). This worked wonders!
a

ambitious-agent-35343

08/23/2022, 2:54 PM
Thanks I will give it a try, but it would be nice if there was a way to destroy independent resources. My cache cluster not being deleted due to an unrelated EKS manual configuration causing problems..
Copy code
argo-example-nodeLaunchConfiguration (eks:index:Cluster$aws:ec2/launchConfiguration:LaunchConfiguration)
error: deleting urn:pulumi:dev::full::eks:index:Cluster$aws:ec2/launchConfiguration:LaunchConfiguration::argo-example-nodeLaunchConfiguration: 1 error occurred: * deleting Auto Scaling Launch Configuration (argo-example-nodeLaunchConfiguration-50...): ResourceInUse: Cannot delete launch configuration argo-example-nodeLaunchConfiguration-50... because it is attached to AutoScalingGroup argo-example-.. status code: 400, request id: cba89ef6-..
When migrating from EKS EC2 => EKS Fargate
5 Views