This message was deleted.
s
This message was deleted.
w
Correction: it has created the replacement. I guess I just have to get rid of the uses manually now.
l
You'll have to export/fix/import in this situation. If you don't have a pending operation, you may be able to get away with
pulumi state delete
.
w
Is that normal? I managed to fix it by removing the usage and rerunning. Now I get a worse problem saying that the CLI was interrupted and I have to do what you say and export/import. I'm pretty sure it wasn't interrupted. These problems are rather frustrating. The sort of thing I used to always hit with Terraform and I had really hoped Pulumi wouldn't suffer the same fate.
If they are in an unknown state why doesn't refresh sort it out?
l
There's a couple of possibilities. Maybe the thing that is being refreshed has changed its id, so the updates aren't being found (or the reverse, where the thing in state doesn't exist, and Pulumi can't tell if it needs to deploy it or remove it from state).
Can't remember the other cases now.. it has happened to me, not often, but just for a small number of reasons, and always avoidable once you learn them.
w
I have had to delete things manually before but refresh has always sorted it out. I just had the case where a resource doesn't exist at all and refresh didn't remove it from the state. Surely it can remove something if it doesn't find the resource with that id.
👍 1
l
Not sure. Maybe with the
--force
option? It sounds like you might want to force a delete in that case, because Pulumi can't tell if the state is right (and resource needs to be created), or cloud provider is right...