This commit adds CLI support for resource providers to provide partial state upon failure. For resource providers that model resource operations across multiple API calls, the Provider RPC interface can now accomodate saving bags of state for resource operations that failed. This is a common pattern for Terraform-backed providers that try to do post-creation steps on resource as part of Create or Update resource operations.
9 lines
317 B
TypeScript
9 lines
317 B
TypeScript
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
|
|
|
import * as pulumi from "@pulumi/pulumi";
|
|
import { Resource } from "./resource";
|
|
|
|
// resource "not-doomed" is updated, but the update partially fails.
|
|
const a = new Resource("doomed", 4);
|
|
|
|
// "a" should still be in the checkpoint with its new value.
|