# general


11/10/2023, 6:03 PM
Hi all, I've come across an issue I believe requires me to manually edit our stack's state and figured I'd post it to this channel after reading this part of docs: "The Pulumi engine uses both your program and your stack’s existing state to make decisions about what resources to create, read, update, or delete. The most common problem that makes it impossible to make changes to your stack is that the stack’s state has been corrupted in some way. There are a variety of ways that a stack’s state could be corrupted, but in almost all cases it is possible to manually edit the stack’s state to fix the issue. This is an advanced operation and should be an absolute last resort. We recommend you check-in with the Pulumi Community Slack first before editing your snapshot." Basically this is the error we get on any deployment or preview:
Copy code
resource complete event returned an error: failed to verify snapshot: resource URN-FOR-RESOURCE-A dependency URN-FOR-RESOURCE-B refers to missing resource
Due to some badly ordered deployments, (I deployed an individual resource with the target flag, not realizing that a deployment hadn't been run against the full stack yet. The end result is we have stack state where Resource A has Resource B in it's dependencies list but Resource B does not exist as a top level resource in the state). I've tried a variety of commands but all return the "failed to verify snapshot" error. I believe the fix here is to just manually delete that URN out of the dependency lists that it is mistakenly in. Is this the right path forward or is there an alternative?