mirror of https://github.com/pulumi/pulumi.git
0bec028ad7
An important precondition of Pulumi state snapshots is that there are no *dangling references* -- that is, references to resources which do not exist in the snapshot. Snapshots which have such references will yield snapshot integrity errors when `Snapshot.VerifyIntegrity` is called. This commit introduces the `Snapshot.Prune` method, which walks a snapshot and removes dangling references. The snapshot is assumed to be toplogically sorted and URN changes due to dangling parent references are propagated appropriately. In combination with the recently added `Topsort` method, this should set us in good stead for introducing a `state repair` command to automatically clean up many kinds of invalid snapshots. |
||
---|---|---|
.. | ||
analyzer | ||
deploy | ||
edit | ||
graph | ||
provider | ||
stack | ||
testdata |