If one were to put a new root ComponentResource (w...
# general
l
If one were to put a new root ComponentResource (which is not describing anything in the cloud -- it's basically a stub) as a new parent resource of everything currently at the topmost level, what would be the easiest & fastest way to apply the change, without having to re-create any existing resources?
b
set parent of the existing resources that you move into the component resource, then set an
aliases: [{parent: pulumi.rootStackResource}]
.. so that your options would look like this:
Copy code
},{
            parent: this,
            aliases: [{parent: pulumi.rootStackResource}]
        })
Run the program for each of your existing stacks to update the relationships, once all are updated, you can remove the alias again
l
@better-shampoo-48884 That works perfectly, thanks!