Unable to manually delete a resource that no longer exists because of dependents #11177
Labels
kind/enhancement
Improvements or new features
resolution/duplicate
This issue is a duplicate of another issue
What happened?
I created an EKS cluster with a FargateProfile via Pulumi. Then I switched to a new EKS cluster (different resource name) with a managed node group instead. When I ran Pulumi Up, it couldn't delete the Fargate profile, so I manually went in the AWS console UI and deleted the profile (by accepting a dialog which warned that it would also delete running nodes).
So I was left in the state where I had most of an EKS cluster to destroy, but no Fargate cluster in reality. I tried
pulumi state delete
on the Fargate profile's URN, but I got an error that "This resource can't be safely deleted because the following resources depend on it" citing the EKS cluster top-level resource. I also tried using--force
though I saw on another ticket that's about "protected" resources and I guess dependents are a different concept.I was able to use
pulumi refresh
, which deleted the Fargate profile from my state.Steps to reproduce
Expected Behavior
I would expect
pulumi state delete
not to be constrained, because I am using it to reflect reality, and if in reality I am have deleted the Fargate profile w/o also deleting the rest of the EKS cluster resources, I should be able to modify the state. I am confused thatpulumi refresh
is allowed to make that edit even thoughpulumi state delete
was not.Actual Behavior
When I
pulumi state delete
d a single resource that I had already manually deleted, I got an error.Also when I did a
pulumi refresh
on my stack, it seems to have incorrectly updated another part of my stack and now there's an IAM group that it's trying to create that already exists, which was not happening before.Output of
pulumi about
$ pulumi about
CLI
Version 3.38.0
Go Version go1.19
Go Compiler gc
Plugins
NAME VERSION
aws 5.7.2
awsx 1.0.0-beta.11
docker 3.4.1
eks 0.42.5
honeycomb 0.0.11
kubernetes 3.22.0
python unknown
Host
OS ubuntu
Version 20.04
Arch x86_64
Additional context
Related to:
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: