moved block renames a resource in Pulumi state. It compiles to aliases: ["old_name"] in the target unit’s Pulumi resource options.
Syntax
from and to — both plain block references (no ~ prefix). The moved block emits no TypeScript of its own.
Example
ubx apply, Pulumi locates the existing state entry under "old_assets" and moves it to "new_assets" without destroying and recreating the resource.
Combined with lifecycle
Multiple moved Blocks
Constraints
- v1: only
unitblocks can be source or target fromandtomust reference the same resource type- The
toblock must be declared in the same file - A resource may only be the
totarget of onemovedblock
