I have a project with a couple of resources in its...
# getting-started
I have a project with a couple of resources in its state that don't actually exist, yet refresh isn't catching the fact that these resources don't exist, which is causing deployments to fail when it tries to 'replace' the resource.
pulumi refresh
claims that the state is correct, though in the state file I can see that it's
pendingReplacement: true
, which I think is probably the cause of this error. Is there an established way to fix this (short of manually identifying/deleting from state)?
doesn't appear to work here
I think you are running into the issue tracked in https://github.com/pulumi/pulumi/issues/16288. Ahead of a proper fix for that, I expect you can manually remove these from the state file or use https://www.pulumi.com/docs/cli/commands/pulumi_state_delete/.
ah I didn't come across that issue, that does seem to be what I'm hitting, thanks! I did end up deleting the resources manually with
state delete
, but was wondering if there was a better way