You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
Renaming resources and moving them into and out of component resources is doable in pulumi with aliases, but it requires you to know how resource URNs work. Using aliases requires you to make multiple code edits to insert the aliases, run pulumi up --expect-no-changes and then manually remove the aliases.
We should add a new flag to pulumi up: --refactor. When pulumi up --refactor is run, pulumi runs the user program and tries to modify the existing state to match the new state suggested by the user's program.
Old resource state can be matched up with new resource requests via:
Name
Property set
Importantly, pulumi up --refactor would allow the creation and deletion of component resources, making it simple to move a resource (or a set of resources) into a component resource our out of a component resource.
To avoid ambiguity, --refactor prevents creates, updates and deletes of custom resources.
Hello!
Issue details
Renaming resources and moving them into and out of component resources is doable in pulumi with aliases, but it requires you to know how resource URNs work. Using aliases requires you to make multiple code edits to insert the aliases, run
pulumi up --expect-no-changes
and then manually remove the aliases.We should add a new flag to
pulumi up
:--refactor
. Whenpulumi up --refactor
is run, pulumi runs the user program and tries to modify the existing state to match the new state suggested by the user's program.Old resource state can be matched up with new resource requests via:
Importantly,
pulumi up --refactor
would allow the creation and deletion of component resources, making it simple to move a resource (or a set of resources) into a component resource our out of a component resource.To avoid ambiguity,
--refactor
prevents creates, updates and deletes of custom resources.This is a possible implementation of #6078.
Affected area/feature
The text was updated successfully, but these errors were encountered: