Hey! I’m running into an issue idk how to get rid of. Pulumi tries to replace (delete) my kubernetes default namespace, and I don’t know how to stop it from doing it, since the default namespace can’t be deleted and naturally the CLI complains about it.
This is happening because I mistakenly created a namespace resource named after “default” and tied it to a Helm Release. After noticing the error, I went ahead and change the name of the namespace to one different than “default”. Now Pulumi wants to replace and delete the “default” one.
h
hundreds-gpu-71155
04/19/2024, 3:26 PM
probably the simplest way is to manually edit the state and remove that resource, so pulumi thinks it needs to create
hundreds-gpu-71155
04/19/2024, 3:26 PM
(export json, edit, import)
hundreds-gpu-71155
04/19/2024, 3:27 PM
to understand: you have a resource that pulumi currently thinks it is managing, and you want it to stop and make a new resource instead, without deleting the original resource
c
colossal-kilobyte-61996
04/19/2024, 3:34 PM
you were right! It was actually kind of confusing cause there were two resources with the same URN in the Pulumi UI and the same namespace name. But one pointed to the proper namespace, the other one pointed to the default namespace, and the intended namespace. Modifying the state directly via the CLI and deleting the URN prompted the right resource to delete from the state (default)
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.