pulumi/tests/integration/delete_before_create/step2/index.ts

22 lines
769 B
TypeScript

// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
import { Resource } from "./resource";
// The changing of a.state causes base to be DBR replaced. This in turn
// causes the deletion of b and c eagerly.
// The planner should execute these steps (in this exact order):
// 1. DeleteReplacement Dependent-2
// 2. DeleteReplacement Dependent
// 3. DeleteReplacement Base
// 4. Replace Base
// 5. CreateReplacement Base
const a = new Resource("base", { uniqueKey: 1, state: 99 });
// 6. Replace Dependent
// 7. CreateReplacement Dependent
const b = new Resource("dependent", { state: a.state });
// 8. Replace Dependent-2
// 9. CreateReplacement Dependent-2
const c = new Resource("dependent-2", { state: 99 }, { dependsOn: [a, b] });