Hello everyone, I'm trying to perform resource mig...
# kubernetes
f
Hello everyone, I'm trying to perform resource migrations i.e moving a bunch of resources to a new stack. All of these resources have a parent component, a custom class that extends from
pulumi.ComponentResource
. I performed a
pulumi state move
of the top level class , which resulted in the transfer of all its child resources to the new stack, which is what I expected. To match the code, I moved the relavent portion in to the new stack and also used the import argument in the code (CustomresourceOptions), mapping them to the id. I can see the child resources being imported but a new parent class i.e the parent component is being created in the new stack, I also see warnings related to potential import failures. To me it looks like I have to somehow tell Pulumi the top level class in my new stack is the same. 1. There is no difference in code and its config values
h
you can create an alias for the top resource https://www.pulumi.com/blog/cumundi-guest-post/
f
Thanks, will check it out. Also, curious to know, I initially tried a
pulumi import
to have a duplicate urn of the same resource , but pulumi import creates a replacement but I don't see that with
pulumi state move
though 🤔, which is a good thing 🙂 . I just dont't know why that happens