pulumi/sdk/proto/languages.proto
joeduffy b7576b9b14 Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change.  As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.

This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name.  Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.

This resolves pulumi/pulumi#330.
2017-10-04 08:22:21 -04:00

53 lines
2.4 KiB
Protocol Buffer

// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
syntax = "proto3";
import "google/protobuf/struct.proto";
import "provider.proto";
package pulumirpc;
// LanguageRuntime is the interface that the planning monitor uses to drive execution of an interpreter responsible
// for confguring and creating resource objects.
service LanguageRuntime {
rpc Run(RunRequest) returns (RunResponse) {}
}
// RunRequest asks the interpreter to execute a program.
message RunRequest {
string pwd = 1; // the program's working directory.
string program = 2; // the path to the program to execute.
repeated string args = 3; // any arguments to pass to the program.
map<string, string> config = 4; // the configuration variables to apply before running.
bool dryRun = 5; // true if we're only doing a dryrun (preview).
int32 parallel = 6; // the degree of parallelism for resource operations (<=1 for serial).
}
// RunResponse is the response back from the interpreter/source back to the monitor.
message RunResponse {
string error = 1; // an unhandled error if any occurred.
}
// ResourceMonitor is the interface a source uses to talk back to the planning monitor orchestrating the execution.
service ResourceMonitor {
rpc Invoke(InvokeRequest) returns (InvokeResponse) {}
rpc NewResource(NewResourceRequest) returns (NewResourceResponse) {}
}
// NewResourceRequest contains information about a resource object that was newly allocated.
message NewResourceRequest {
string type = 1; // the type of the object allocated.
string name = 2; // the name, for URN purposes, of the object.
google.protobuf.Struct object = 3; // an object produced by the interpreter/source.
}
// NewResourceResponse reflects back the properties initialized during creation, if applicable.
message NewResourceResponse {
string id = 1; // the unique ID assigned by the provider.
string urn = 2; // the URN assigned by the fabric.
google.protobuf.Struct object = 3; // the resulting object properties, including provider defaults.
bool stable = 4; // if true, the object's state is stable and may be trusted not to change.
repeated string stables = 5; // an optional list of guaranteed-stable properties.
}