1a51507206
* Delete Before Create This commit implements the full semantics of delete before create. If a resource is replaced and requires deletion before creation, the engine will use the dependency graph saved in the snapshot to delete all resources that depend on the resource being replaced prior to the deletion of the resource to be replaced. * Rebase against master * CR: Simplify the control flow in makeRegisterResourceSteps * Run Check on new inputs when re-creating a resource * Fix an issue where the planner emitted benign but incorrect deletes of DBR-deleted resources * CR: produce the list of dependent resources in dependency order and iterate over the list in reverse * CR: deps->dependents, fix an issue with DependingOn where duplicate nodes could be added to the dependent set * CR: Fix an issue where we were considering old defaults and new inputs inappropriately when re-creating a deleted resource * CR: save 'iter.deletes[urn]' as a local, iterate starting at cursorIndex + 1 for dependency graph
9 lines
298 B
TypeScript
9 lines
298 B
TypeScript
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
|
|
|
import { Resource } from "./resource";
|
|
|
|
// Base depends on nothing.
|
|
const a = new Resource("base", { uniqueKey: 1, state: 99 });
|
|
|
|
// Dependent depends on Base with state 99.
|
|
const b = new Resource("dependent", { state: a.state });
|