This message was deleted.
# general
s
This message was deleted.
l
To delete resources from the provider, remove them from code (or comment them out for a while) then run
pulumi up
.
c
I'd suggest adding that parent resource back in the state and attempting another
pulumi up
. I haven't been in this situation though so I'm not positive it will work
l
Likely, you can import it fairly easily using the existing code, and adding the
import
opt.
r
I see so create it in azure and use the import option?
c
not sure if the children will be properly configured to be "attached" to the parent if you create it manually and import it though
l
Is it not already in Azure?
If it is gone from Azure and state, then I think the easiest thing is likely to be to resolve everything manually. Remove the code, delete the resources from state manually, and delete them from Azure manually.
Depending on how many child resources there are, of course.
r
Yeah so the parent resource is deleted. It has some sql users that are children that I wanted to avoid manually deleting but looks like that’s the route I’ll need to likely take
r
have you tried
pulumi refresh
?
r
Yeah refresh ended up detecting the parent was deleted, but then the children were left in a state where they reference the parent but the parent doesn’t exist.
If anyone was curious what we ended up doing, the child was a sql user and the parent was deleted in azure so we exported the stack to a Json file and changed the parent in the json file to be the database then imported the stack json file back in and ended up nuking the database by removing it from the Index file so it cleanly deleted everything and updated the stack properly then added it back in to regenerate all the resources cleanly. Thanks for all the help, everyone.