This message was deleted.
# general
s
This message was deleted.
l
Is it not possible to import it to the new resource, in order to avoid delete/recreate?
If it's not, then the easiest solution is to comment out the "new" place it goes, run
up
to delete it, then put the new code back in and
up
again.
e
Thanks! How would I go about importing it to the new resource? Manually edit the state file somehow?
l
Sometimes that's necessary, but usually you can add
import: <importid>
to the
opts
of the new place. What the value of the importid is, is usually the trick.
e
Amazing! Thank you so much 🙂
l
If your provider is based on one of the Terraform providers (e.g. AWS), then the Terraform docs describe the import ids at the bottom of the corresponding doc page on https://terraform.io
Don't forget to remove the
import
opt after you've imported it.
e
Great, thanks a ton, yep I'm working on EKS so that should do the trick. I'll keep in mind to remove the import
👍 1
b
@little-cartoon-10569 there’s a good upgrade to import and it’s docs coming soon ;)
👍 2
b
@elegant-island-39916 in case you need it in the future, we have the provider options
deleteBeforeReplace
https://www.pulumi.com/docs/intro/concepts/programming-model/#deletebeforereplace which will do what you originally asked for
👍 1