hm, pondering GitOps, Pulumi, refactors, and state...
# general
h
hm, pondering GitOps, Pulumi, refactors, and state manipulations (eg, shuffling resources around without actually adding/removing stuff) I wonder if some kind of migrations system that allows users to define state transformations would be useful. Stuff like, "these resources moved components" or "we switched between the classic and native versions"
the current systems might be able to do that? But I'm finding them unintuitive and hard to grok
g
h
right, but it feels hard to use those when you make structural changes and make heavy use of components?
so, like, you need to replicate the old structure in alias name generation?
given, i don't completely understand resource name requirements and best practices
g
If you move a resource to a new component, then you need to use an alias to the previous component so Pulumi can trace it. So in one sense yes you still have that history of what the old definition was. The alias can be removed after running
pulumi up
and the resources are moved in the state but it is a bit of work.
h
yeah, my point is that the alias system doesn't feel great and maybe there's better ways of handling it?
g
I'm not aware of a better way, but I'm very new to using Pulumi.
h
there isn't yet, hence the original ponder
like, instead of a bunch of alias code threaded through everything, you had state migrations
g
That's an interesting idea.
m
Jamie, right there with you. I am moving something into a component, and manually deleting and re-importing resources to update the parent relationship is incredibly time consuming.