This message was deleted.
# general
s
This message was deleted.
l
You can use the alias opt, so that each resource has both its original URN and its new one.
To do the same thing without aliases is more complex and probably not worth it in a big reworking like this, but I've used this approach with one or two resources at a time and it's a clean and repeatable process. 1. Freeze all changes except for this! It's a multistep process. Backup your state (
pulumi stack output --file x.json
). 2. Comment / flag out all the resources that will be changing, so that you create all their parents correctly without importing anything. 3. Comment / flag out the original resources and remove them from state (
pulumi state delete
). 4. Run
pulumi import --parent ...
to import the resources to the correct place. 5. Comment / flag in the new code for the resources, making it look like the code that Pulumi generated. 6. Tidy up old commented / flagged-out code. 7.
pulumi preview
to check everything in state matches.