Hello everyone. I have some resources especially t...
# typescript
Hello everyone. I have some resources especially task Definitions that I have manually deleted on my aws ecs console page. Now that I’m trying to destroy all resources (
pulumi destroy -s <my-stack>
), I can’t get them destroyed as it can’t successfully delete those resources that I’ve manually deleted on the aws console. I also tried to delete the stack entirely (
pulumi stack rm <my-stack>
), and it’s the same error I’m getting. Please see image below for more info:
Hi, The way to go here is to identity the URNs of the resources you deleted manually, and then remove them from your pulumi state.
Copy code
$ pulumi stack --show-urns | grep <regex-used-to-identify-resource>
# Then having identified the resource URN
$ pulumi state delete '<resource-urn>' # use single quotes to prevent param expansion as resources urns may contain '$'s.
Another possibility is to refresh your stack state, pulumi should then become aware of the resources that have been deleted.
Copy code
$ pulumi refresh
# or pulumi refresh -t '<resource-urn>'
Thanks @astonishing-exabyte-93491. I’ve been able to solve that issue. I have new issues:
I can’t delete them manually from the AWS console either. I will appreciate any direction on this
Dependency problems are nightmare.
This is the AWS API returning a client error. It’s best practice to handle your resources lifecycle using pulumi only, instead of making manual interventions. The error looks pretty straighforward. Would you mind sharing your code?
If you have properly set the resource dependencies, then you could run:
Copy code
$ pulumi destroy -t <parent-resource-urn> --target-dependents
but I’m not confident enough this is your case.