netherframe.protocol.tfplugin 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- netherframe/protocol/tfplugin/__init__.py +1 -0
- netherframe/protocol/tfplugin/_sources/MPL-2.0.txt +353 -0
- netherframe/protocol/tfplugin/_sources/NOTICE.md +19 -0
- netherframe/protocol/tfplugin/_sources/SOURCES.json +34 -0
- netherframe/protocol/tfplugin/_sources/grpc_controller.proto +11 -0
- netherframe/protocol/tfplugin/_sources/grpc_stdio.proto +30 -0
- netherframe/protocol/tfplugin/_sources/tfplugin5.proto +1013 -0
- netherframe/protocol/tfplugin/_sources/tfplugin6.proto +1092 -0
- netherframe/protocol/tfplugin/grpc_controller_pb2.py +41 -0
- netherframe/protocol/tfplugin/grpc_controller_pb2.pyi +11 -0
- netherframe/protocol/tfplugin/grpc_controller_pb2_grpc.py +102 -0
- netherframe/protocol/tfplugin/grpc_stdio_pb2.py +44 -0
- netherframe/protocol/tfplugin/grpc_stdio_pb2.pyi +25 -0
- netherframe/protocol/tfplugin/grpc_stdio_pb2_grpc.py +114 -0
- netherframe/protocol/tfplugin/py.typed +0 -0
- netherframe/protocol/tfplugin/tfplugin5_pb2.py +344 -0
- netherframe/protocol/tfplugin/tfplugin5_pb2.pyi +1096 -0
- netherframe/protocol/tfplugin/tfplugin5_pb2_grpc.py +1440 -0
- netherframe/protocol/tfplugin/tfplugin6_pb2.py +380 -0
- netherframe/protocol/tfplugin/tfplugin6_pb2.pyi +1207 -0
- netherframe/protocol/tfplugin/tfplugin6_pb2_grpc.py +1634 -0
- netherframe_protocol_tfplugin-0.3.0.dist-info/METADATA +29 -0
- netherframe_protocol_tfplugin-0.3.0.dist-info/RECORD +37 -0
- netherframe_protocol_tfplugin-0.3.0.dist-info/WHEEL +4 -0
- netherframe_protocol_tfplugin-0.3.0.dist-info/licenses/LICENSE +21 -0
- netherframe_protocol_tfplugin-0.3.0.dist-info/licenses/LICENSES/MPL-2.0.txt +353 -0
- netherframe_protocol_tfplugin-0.3.0.dist-info/licenses/NOTICE.md +19 -0
- nf/protocol/tfplugin/__init__.py +4 -0
- nf/protocol/tfplugin/grpc_controller_pb2.py +4 -0
- nf/protocol/tfplugin/grpc_controller_pb2_grpc.py +4 -0
- nf/protocol/tfplugin/grpc_stdio_pb2.py +4 -0
- nf/protocol/tfplugin/grpc_stdio_pb2_grpc.py +4 -0
- nf/protocol/tfplugin/py.typed +0 -0
- nf/protocol/tfplugin/tfplugin5_pb2.py +4 -0
- nf/protocol/tfplugin/tfplugin5_pb2_grpc.py +4 -0
- nf/protocol/tfplugin/tfplugin6_pb2.py +4 -0
- nf/protocol/tfplugin/tfplugin6_pb2_grpc.py +4 -0
|
@@ -0,0 +1,1013 @@
|
|
|
1
|
+
// Copyright (c) HashiCorp, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
|
|
4
|
+
// Terraform Plugin RPC protocol version 5.10
|
|
5
|
+
//
|
|
6
|
+
// This file defines version 5.10 of the RPC protocol. To implement a plugin
|
|
7
|
+
// against this protocol, copy this definition into your own codebase and
|
|
8
|
+
// use protoc to generate stubs for your target language.
|
|
9
|
+
//
|
|
10
|
+
// Any minor versions of protocol 5 to follow should modify this file while
|
|
11
|
+
// maintaining backwards compatibility. Breaking changes, if any are required,
|
|
12
|
+
// will come in a subsequent major version with its own separate proto definition.
|
|
13
|
+
//
|
|
14
|
+
// Note that only the proto files included in a release tag of Terraform are
|
|
15
|
+
// official protocol releases. Proto files taken from other commits may include
|
|
16
|
+
// incomplete changes or features that did not make it into a final release.
|
|
17
|
+
// In all reasonable cases, plugin developers should take the proto file from
|
|
18
|
+
// the tag of the most recent release of Terraform, and not from the main
|
|
19
|
+
// branch or any other development branch.
|
|
20
|
+
//
|
|
21
|
+
syntax = "proto3";
|
|
22
|
+
option go_package = "github.com/hashicorp/terraform/internal/tfplugin5";
|
|
23
|
+
|
|
24
|
+
import "google/protobuf/timestamp.proto";
|
|
25
|
+
|
|
26
|
+
package tfplugin5;
|
|
27
|
+
|
|
28
|
+
// DynamicValue is an opaque encoding of terraform data, with the field name
|
|
29
|
+
// indicating the encoding scheme used.
|
|
30
|
+
message DynamicValue {
|
|
31
|
+
bytes msgpack = 1;
|
|
32
|
+
bytes json = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message Diagnostic {
|
|
36
|
+
enum Severity {
|
|
37
|
+
INVALID = 0;
|
|
38
|
+
ERROR = 1;
|
|
39
|
+
WARNING = 2;
|
|
40
|
+
}
|
|
41
|
+
Severity severity = 1;
|
|
42
|
+
string summary = 2;
|
|
43
|
+
string detail = 3;
|
|
44
|
+
AttributePath attribute = 4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message FunctionError {
|
|
48
|
+
string text = 1;
|
|
49
|
+
// The optional function_argument records the index position of the
|
|
50
|
+
// argument which caused the error.
|
|
51
|
+
optional int64 function_argument = 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message AttributePath {
|
|
55
|
+
message Step {
|
|
56
|
+
oneof selector {
|
|
57
|
+
// Set "attribute_name" to represent looking up an attribute
|
|
58
|
+
// in the current object value.
|
|
59
|
+
string attribute_name = 1;
|
|
60
|
+
// Set "element_key_*" to represent looking up an element in
|
|
61
|
+
// an indexable collection type.
|
|
62
|
+
string element_key_string = 2;
|
|
63
|
+
int64 element_key_int = 3;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
repeated Step steps = 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message Stop {
|
|
70
|
+
message Request {
|
|
71
|
+
}
|
|
72
|
+
message Response {
|
|
73
|
+
string Error = 1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// RawState holds the stored state for a resource to be upgraded by the
|
|
78
|
+
// provider. It can be in one of two formats, the current json encoded format
|
|
79
|
+
// in bytes, or the legacy flatmap format as a map of strings.
|
|
80
|
+
message RawState {
|
|
81
|
+
bytes json = 1;
|
|
82
|
+
map<string, string> flatmap = 2;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
enum StringKind {
|
|
86
|
+
PLAIN = 0;
|
|
87
|
+
MARKDOWN = 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ResourceIdentitySchema represents the structure and types of data used to identify
|
|
91
|
+
// a managed resource type. Effectively, resource identity is a versioned object
|
|
92
|
+
// that can be used to compare resources, whether already managed and/or being
|
|
93
|
+
// discovered.
|
|
94
|
+
message ResourceIdentitySchema {
|
|
95
|
+
// IdentityAttribute represents one value of data within resource identity. These
|
|
96
|
+
// are always used in resource identity comparisons.
|
|
97
|
+
message IdentityAttribute {
|
|
98
|
+
// name is the identity attribute name
|
|
99
|
+
string name = 1;
|
|
100
|
+
|
|
101
|
+
// type is the identity attribute type
|
|
102
|
+
bytes type = 2;
|
|
103
|
+
|
|
104
|
+
// required_for_import when enabled signifies that this attribute must be
|
|
105
|
+
// defined for ImportResourceState to complete successfully
|
|
106
|
+
bool required_for_import = 3;
|
|
107
|
+
|
|
108
|
+
// optional_for_import when enabled signifies that this attribute is not
|
|
109
|
+
// required for ImportResourceState, because it can be supplied by the
|
|
110
|
+
// provider. It is still possible to supply this attribute during import.
|
|
111
|
+
bool optional_for_import = 4;
|
|
112
|
+
|
|
113
|
+
// description is a human-readable description of the attribute in Markdown
|
|
114
|
+
string description = 5;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// version is the identity version and separate from the Schema version.
|
|
118
|
+
// Any time the structure or format of identity_attributes changes, this version
|
|
119
|
+
// should be incremented. Versioning implicitly starts at 0 and by convention
|
|
120
|
+
// should be incremented by 1 each change.
|
|
121
|
+
//
|
|
122
|
+
// When comparing identity_attributes data, differing versions should always be treated
|
|
123
|
+
// as inequal.
|
|
124
|
+
int64 version = 1;
|
|
125
|
+
|
|
126
|
+
// identity_attributes are the individual value definitions which define identity data
|
|
127
|
+
// for a managed resource type. This information is used to decode DynamicValue of
|
|
128
|
+
// identity data.
|
|
129
|
+
//
|
|
130
|
+
// These attributes are intended for permanent identity data and must be wholly
|
|
131
|
+
// representative of all data necessary to compare two managed resource instances
|
|
132
|
+
// with no other data. This generally should include account, endpoint, location,
|
|
133
|
+
// and automatically generated identifiers. For some resources, this may include
|
|
134
|
+
// configuration-based data, such as a required name which must be unique.
|
|
135
|
+
repeated IdentityAttribute identity_attributes = 2;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
message ResourceIdentityData {
|
|
139
|
+
// identity_data is the resource identity data for the given definition. It should
|
|
140
|
+
// be decoded using the identity schema.
|
|
141
|
+
//
|
|
142
|
+
// This data is considered permanent for the identity version and suitable for
|
|
143
|
+
// longer-term storage.
|
|
144
|
+
DynamicValue identity_data = 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// ActionSchema defines the schema for an action that can be invoked by Terraform.
|
|
148
|
+
message ActionSchema {
|
|
149
|
+
message LinkedResource {
|
|
150
|
+
string type_name = 1;
|
|
151
|
+
// description is a human-readable description of the role of the linked resource.
|
|
152
|
+
// For lifecycle actions this is most likely just the resource being acted upon.
|
|
153
|
+
// For linked actions where multiple resources are linked, this description should
|
|
154
|
+
// help the user understand what the resource is used for.
|
|
155
|
+
// We expect markdown formatting for the description.
|
|
156
|
+
string description = 2;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// An Unlinked action is an action that is not linked to any resources. It may contain
|
|
160
|
+
// references to resources but it can not change the resource state of any resource.
|
|
161
|
+
message Unlinked {}
|
|
162
|
+
|
|
163
|
+
// A Lifecycle action is an action that is linked to a resources lifecycle. It runs as part of
|
|
164
|
+
// the lifecycle and may change the resource state of the resource it is linked to to a degree.
|
|
165
|
+
// It can only affect computed attributes of the resource it is linked to.
|
|
166
|
+
message Lifecycle {
|
|
167
|
+
// ExecutionOrder defines if the action should be executed before or after the resource,
|
|
168
|
+
// in whose lifecycle the action runs, applies
|
|
169
|
+
enum ExecutionOrder {
|
|
170
|
+
INVALID = 0;
|
|
171
|
+
BEFORE = 1;
|
|
172
|
+
AFTER = 2;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
ExecutionOrder executes = 1;
|
|
176
|
+
LinkedResource linked_resource = 2;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// A linked action can be linked to multiple resources and can change the resource state of those resources. It can not be run as part of plan and apply.
|
|
180
|
+
message Linked {
|
|
181
|
+
repeated LinkedResource linked_resources = 1;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
Schema schema = 1; // of the action itself
|
|
185
|
+
|
|
186
|
+
oneof type {
|
|
187
|
+
Unlinked unlinked = 2;
|
|
188
|
+
Lifecycle lifecycle = 3;
|
|
189
|
+
Linked linked = 4;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Schema is the configuration schema for a Resource, Provider, or Provisioner.
|
|
194
|
+
message Schema {
|
|
195
|
+
message Block {
|
|
196
|
+
int64 version = 1;
|
|
197
|
+
repeated Attribute attributes = 2;
|
|
198
|
+
repeated NestedBlock block_types = 3;
|
|
199
|
+
string description = 4;
|
|
200
|
+
StringKind description_kind = 5;
|
|
201
|
+
bool deprecated = 6;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
message Attribute {
|
|
205
|
+
string name = 1;
|
|
206
|
+
bytes type = 2;
|
|
207
|
+
string description = 3;
|
|
208
|
+
bool required = 4;
|
|
209
|
+
bool optional = 5;
|
|
210
|
+
bool computed = 6;
|
|
211
|
+
bool sensitive = 7;
|
|
212
|
+
StringKind description_kind = 8;
|
|
213
|
+
bool deprecated = 9;
|
|
214
|
+
bool write_only = 10;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
message NestedBlock {
|
|
218
|
+
enum NestingMode {
|
|
219
|
+
INVALID = 0;
|
|
220
|
+
SINGLE = 1;
|
|
221
|
+
LIST = 2;
|
|
222
|
+
SET = 3;
|
|
223
|
+
MAP = 4;
|
|
224
|
+
GROUP = 5;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
string type_name = 1;
|
|
228
|
+
Block block = 2;
|
|
229
|
+
NestingMode nesting = 3;
|
|
230
|
+
int64 min_items = 4;
|
|
231
|
+
int64 max_items = 5;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// The version of the schema.
|
|
235
|
+
// Schemas are versioned, so that providers can upgrade a saved resource
|
|
236
|
+
// state when the schema is changed.
|
|
237
|
+
int64 version = 1;
|
|
238
|
+
|
|
239
|
+
// Block is the top level configuration block for this schema.
|
|
240
|
+
Block block = 2;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
message Function {
|
|
244
|
+
// parameters is the ordered list of positional function parameters.
|
|
245
|
+
repeated Parameter parameters = 1;
|
|
246
|
+
|
|
247
|
+
// variadic_parameter is an optional final parameter which accepts
|
|
248
|
+
// zero or more argument values, in which Terraform will send an
|
|
249
|
+
// ordered list of the parameter type.
|
|
250
|
+
Parameter variadic_parameter = 2;
|
|
251
|
+
|
|
252
|
+
// Return is the function return parameter.
|
|
253
|
+
Return return = 3;
|
|
254
|
+
|
|
255
|
+
// summary is the human-readable shortened documentation for the function.
|
|
256
|
+
string summary = 4;
|
|
257
|
+
|
|
258
|
+
// description is human-readable documentation for the function.
|
|
259
|
+
string description = 5;
|
|
260
|
+
|
|
261
|
+
// description_kind is the formatting of the description.
|
|
262
|
+
StringKind description_kind = 6;
|
|
263
|
+
|
|
264
|
+
// deprecation_message is human-readable documentation if the
|
|
265
|
+
// function is deprecated.
|
|
266
|
+
string deprecation_message = 7;
|
|
267
|
+
|
|
268
|
+
message Parameter {
|
|
269
|
+
// name is the human-readable display name for the parameter.
|
|
270
|
+
string name = 1;
|
|
271
|
+
|
|
272
|
+
// type is the type constraint for the parameter.
|
|
273
|
+
bytes type = 2;
|
|
274
|
+
|
|
275
|
+
// allow_null_value when enabled denotes that a null argument value can
|
|
276
|
+
// be passed to the provider. When disabled, Terraform returns an error
|
|
277
|
+
// if the argument value is null.
|
|
278
|
+
bool allow_null_value = 3;
|
|
279
|
+
|
|
280
|
+
// allow_unknown_values when enabled denotes that only wholly known
|
|
281
|
+
// argument values will be passed to the provider. When disabled,
|
|
282
|
+
// Terraform skips the function call entirely and assumes an unknown
|
|
283
|
+
// value result from the function.
|
|
284
|
+
bool allow_unknown_values = 4;
|
|
285
|
+
|
|
286
|
+
// description is human-readable documentation for the parameter.
|
|
287
|
+
string description = 5;
|
|
288
|
+
|
|
289
|
+
// description_kind is the formatting of the description.
|
|
290
|
+
StringKind description_kind = 6;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
message Return {
|
|
294
|
+
// type is the type constraint for the function result.
|
|
295
|
+
bytes type = 1;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// ServerCapabilities allows providers to communicate extra information
|
|
300
|
+
// regarding supported protocol features. This is used to indicate
|
|
301
|
+
// availability of certain forward-compatible changes which may be optional
|
|
302
|
+
// in a major protocol version, but cannot be tested for directly.
|
|
303
|
+
message ServerCapabilities {
|
|
304
|
+
// The plan_destroy capability signals that a provider expects a call
|
|
305
|
+
// to PlanResourceChange when a resource is going to be destroyed.
|
|
306
|
+
bool plan_destroy = 1;
|
|
307
|
+
|
|
308
|
+
// The get_provider_schema_optional capability indicates that this
|
|
309
|
+
// provider does not require calling GetProviderSchema to operate
|
|
310
|
+
// normally, and the caller can used a cached copy of the provider's
|
|
311
|
+
// schema.
|
|
312
|
+
bool get_provider_schema_optional = 2;
|
|
313
|
+
|
|
314
|
+
// The move_resource_state capability signals that a provider supports the
|
|
315
|
+
// MoveResourceState RPC.
|
|
316
|
+
bool move_resource_state = 3;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// ClientCapabilities allows Terraform to publish information regarding
|
|
320
|
+
// supported protocol features. This is used to indicate availability of
|
|
321
|
+
// certain forward-compatible changes which may be optional in a major
|
|
322
|
+
// protocol version, but cannot be tested for directly.
|
|
323
|
+
message ClientCapabilities {
|
|
324
|
+
// The deferral_allowed capability signals that the client is able to
|
|
325
|
+
// handle deferred responses from the provider.
|
|
326
|
+
bool deferral_allowed = 1;
|
|
327
|
+
|
|
328
|
+
// The write_only_attributes_allowed capability signals that the client
|
|
329
|
+
// is able to handle write_only attributes for managed resources.
|
|
330
|
+
bool write_only_attributes_allowed = 2;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// Deferred is a message that indicates that change is deferred for a reason.
|
|
334
|
+
message Deferred {
|
|
335
|
+
// Reason is the reason for deferring the change.
|
|
336
|
+
enum Reason {
|
|
337
|
+
// UNKNOWN is the default value, and should not be used.
|
|
338
|
+
UNKNOWN = 0;
|
|
339
|
+
// RESOURCE_CONFIG_UNKNOWN is used when the config is partially unknown and the real
|
|
340
|
+
// values need to be known before the change can be planned.
|
|
341
|
+
RESOURCE_CONFIG_UNKNOWN = 1;
|
|
342
|
+
// PROVIDER_CONFIG_UNKNOWN is used when parts of the provider configuration
|
|
343
|
+
// are unknown, e.g. the provider configuration is only known after the apply is done.
|
|
344
|
+
PROVIDER_CONFIG_UNKNOWN = 2;
|
|
345
|
+
// ABSENT_PREREQ is used when a hard dependency has not been satisfied.
|
|
346
|
+
ABSENT_PREREQ = 3;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// reason is the reason for deferring the change.
|
|
350
|
+
Reason reason = 1;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
service Provider {
|
|
354
|
+
//////// Information about what a provider supports/expects
|
|
355
|
+
|
|
356
|
+
// GetMetadata returns upfront information about server capabilities and
|
|
357
|
+
// supported resource types without requiring the server to instantiate all
|
|
358
|
+
// schema information, which may be memory intensive.
|
|
359
|
+
// This method is CURRENTLY UNUSED and it serves mostly for convenience
|
|
360
|
+
// of code generation inside of terraform-plugin-mux.
|
|
361
|
+
rpc GetMetadata(GetMetadata.Request) returns (GetMetadata.Response);
|
|
362
|
+
|
|
363
|
+
// GetSchema returns schema information for the provider, data resources,
|
|
364
|
+
// and managed resources.
|
|
365
|
+
rpc GetSchema(GetProviderSchema.Request) returns (GetProviderSchema.Response);
|
|
366
|
+
rpc PrepareProviderConfig(PrepareProviderConfig.Request) returns (PrepareProviderConfig.Response);
|
|
367
|
+
rpc ValidateResourceTypeConfig(ValidateResourceTypeConfig.Request) returns (ValidateResourceTypeConfig.Response);
|
|
368
|
+
rpc ValidateDataSourceConfig(ValidateDataSourceConfig.Request) returns (ValidateDataSourceConfig.Response);
|
|
369
|
+
rpc UpgradeResourceState(UpgradeResourceState.Request) returns (UpgradeResourceState.Response);
|
|
370
|
+
|
|
371
|
+
// GetResourceIdentitySchemas returns the identity schemas for all managed
|
|
372
|
+
// resources.
|
|
373
|
+
rpc GetResourceIdentitySchemas(GetResourceIdentitySchemas.Request) returns (GetResourceIdentitySchemas.Response);
|
|
374
|
+
// UpgradeResourceIdentityData should return the upgraded resource identity
|
|
375
|
+
// data for a managed resource type.
|
|
376
|
+
rpc UpgradeResourceIdentity(UpgradeResourceIdentity.Request) returns (UpgradeResourceIdentity.Response);
|
|
377
|
+
|
|
378
|
+
//////// One-time initialization, called before other functions below
|
|
379
|
+
rpc Configure(Configure.Request) returns (Configure.Response);
|
|
380
|
+
|
|
381
|
+
//////// Managed Resource Lifecycle
|
|
382
|
+
rpc ReadResource(ReadResource.Request) returns (ReadResource.Response);
|
|
383
|
+
rpc PlanResourceChange(PlanResourceChange.Request) returns (PlanResourceChange.Response);
|
|
384
|
+
rpc ApplyResourceChange(ApplyResourceChange.Request) returns (ApplyResourceChange.Response);
|
|
385
|
+
rpc ImportResourceState(ImportResourceState.Request) returns (ImportResourceState.Response);
|
|
386
|
+
rpc MoveResourceState(MoveResourceState.Request) returns (MoveResourceState.Response);
|
|
387
|
+
rpc ReadDataSource(ReadDataSource.Request) returns (ReadDataSource.Response);
|
|
388
|
+
|
|
389
|
+
//////// Ephemeral Resource Lifecycle
|
|
390
|
+
rpc ValidateEphemeralResourceConfig(ValidateEphemeralResourceConfig.Request) returns (ValidateEphemeralResourceConfig.Response);
|
|
391
|
+
rpc OpenEphemeralResource(OpenEphemeralResource.Request) returns (OpenEphemeralResource.Response);
|
|
392
|
+
rpc RenewEphemeralResource(RenewEphemeralResource.Request) returns (RenewEphemeralResource.Response);
|
|
393
|
+
rpc CloseEphemeralResource(CloseEphemeralResource.Request) returns (CloseEphemeralResource.Response);
|
|
394
|
+
|
|
395
|
+
/////// List
|
|
396
|
+
rpc ListResource(ListResource.Request) returns (stream ListResource.Event);
|
|
397
|
+
rpc ValidateListResourceConfig(ValidateListResourceConfig.Request) returns (ValidateListResourceConfig.Response);
|
|
398
|
+
|
|
399
|
+
// GetFunctions returns the definitions of all functions.
|
|
400
|
+
rpc GetFunctions(GetFunctions.Request) returns (GetFunctions.Response);
|
|
401
|
+
|
|
402
|
+
//////// Provider-contributed Functions
|
|
403
|
+
rpc CallFunction(CallFunction.Request) returns (CallFunction.Response);
|
|
404
|
+
|
|
405
|
+
//////// Actions
|
|
406
|
+
rpc PlanAction(PlanAction.Request) returns (PlanAction.Response);
|
|
407
|
+
rpc InvokeAction(InvokeAction.Request) returns (stream InvokeAction.Event);
|
|
408
|
+
rpc ValidateActionConfig(ValidateActionConfig.Request) returns (ValidateActionConfig.Response);
|
|
409
|
+
|
|
410
|
+
//////// Graceful Shutdown
|
|
411
|
+
rpc Stop(Stop.Request) returns (Stop.Response);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
message GetMetadata {
|
|
415
|
+
message Request {
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
message Response {
|
|
419
|
+
ServerCapabilities server_capabilities = 1;
|
|
420
|
+
repeated Diagnostic diagnostics = 2;
|
|
421
|
+
repeated DataSourceMetadata data_sources = 3;
|
|
422
|
+
repeated ResourceMetadata resources = 4;
|
|
423
|
+
// functions returns metadata for any functions.
|
|
424
|
+
repeated FunctionMetadata functions = 5;
|
|
425
|
+
repeated EphemeralMetadata ephemeral_resources = 6;
|
|
426
|
+
repeated ListResourceMetadata list_resources = 7;
|
|
427
|
+
repeated ActionMetadata actions = 8;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
message EphemeralMetadata {
|
|
431
|
+
string type_name = 1;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
message FunctionMetadata {
|
|
435
|
+
// name is the function name.
|
|
436
|
+
string name = 1;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
message DataSourceMetadata {
|
|
440
|
+
string type_name = 1;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
message ResourceMetadata {
|
|
444
|
+
string type_name = 1;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
message ListResourceMetadata {
|
|
448
|
+
string type_name = 1;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
message ActionMetadata {
|
|
452
|
+
string type_name = 1;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
message GetProviderSchema {
|
|
457
|
+
message Request {
|
|
458
|
+
}
|
|
459
|
+
message Response {
|
|
460
|
+
Schema provider = 1;
|
|
461
|
+
map<string, Schema> resource_schemas = 2;
|
|
462
|
+
map<string, Schema> data_source_schemas = 3;
|
|
463
|
+
map<string, Function> functions = 7;
|
|
464
|
+
map<string, Schema> ephemeral_resource_schemas = 8;
|
|
465
|
+
map<string, Schema> list_resource_schemas = 9;
|
|
466
|
+
map<string, ActionSchema> action_schemas = 10;
|
|
467
|
+
repeated Diagnostic diagnostics = 4;
|
|
468
|
+
Schema provider_meta = 5;
|
|
469
|
+
ServerCapabilities server_capabilities = 6;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
message PrepareProviderConfig {
|
|
474
|
+
message Request {
|
|
475
|
+
DynamicValue config = 1;
|
|
476
|
+
}
|
|
477
|
+
message Response {
|
|
478
|
+
DynamicValue prepared_config = 1;
|
|
479
|
+
repeated Diagnostic diagnostics = 2;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
message UpgradeResourceState {
|
|
484
|
+
// Request is the message that is sent to the provider during the
|
|
485
|
+
// UpgradeResourceState RPC.
|
|
486
|
+
//
|
|
487
|
+
// This message intentionally does not include configuration data as any
|
|
488
|
+
// configuration-based or configuration-conditional changes should occur
|
|
489
|
+
// during the PlanResourceChange RPC. Additionally, the configuration is
|
|
490
|
+
// not guaranteed to exist (in the case of resource destruction), be wholly
|
|
491
|
+
// known, nor match the given prior state, which could lead to unexpected
|
|
492
|
+
// provider behaviors for practitioners.
|
|
493
|
+
message Request {
|
|
494
|
+
string type_name = 1;
|
|
495
|
+
|
|
496
|
+
// version is the schema_version number recorded in the state file
|
|
497
|
+
int64 version = 2;
|
|
498
|
+
|
|
499
|
+
// raw_state is the raw states as stored for the resource. Core does
|
|
500
|
+
// not have access to the schema of prior_version, so it's the
|
|
501
|
+
// provider's responsibility to interpret this value using the
|
|
502
|
+
// appropriate older schema. The raw_state will be the json encoded
|
|
503
|
+
// state, or a legacy flat-mapped format.
|
|
504
|
+
RawState raw_state = 3;
|
|
505
|
+
}
|
|
506
|
+
message Response {
|
|
507
|
+
// new_state is a msgpack-encoded data structure that, when interpreted with
|
|
508
|
+
// the _current_ schema for this resource type, is functionally equivalent to
|
|
509
|
+
// that which was given in prior_state_raw.
|
|
510
|
+
DynamicValue upgraded_state = 1;
|
|
511
|
+
|
|
512
|
+
// diagnostics describes any errors encountered during migration that could not
|
|
513
|
+
// be safely resolved, and warnings about any possibly-risky assumptions made
|
|
514
|
+
// in the upgrade process.
|
|
515
|
+
repeated Diagnostic diagnostics = 2;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
message GetResourceIdentitySchemas {
|
|
520
|
+
message Request {
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
message Response {
|
|
524
|
+
// identity_schemas is a mapping of resource type names to their identity schemas.
|
|
525
|
+
map<string, ResourceIdentitySchema> identity_schemas = 1;
|
|
526
|
+
|
|
527
|
+
// diagnostics is the collection of warning and error diagnostics for this request.
|
|
528
|
+
repeated Diagnostic diagnostics = 2;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
message UpgradeResourceIdentity {
|
|
533
|
+
message Request {
|
|
534
|
+
// type_name is the managed resource type name
|
|
535
|
+
string type_name = 1;
|
|
536
|
+
|
|
537
|
+
// version is the version of the resource identity data to upgrade
|
|
538
|
+
int64 version = 2;
|
|
539
|
+
|
|
540
|
+
// raw_identity is the raw identity as stored for the resource. Core does
|
|
541
|
+
// not have access to the identity schema of prior_version, so it's the
|
|
542
|
+
// provider's responsibility to interpret this value using the
|
|
543
|
+
// appropriate older schema. The raw_identity will be json encoded.
|
|
544
|
+
RawState raw_identity = 3;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
message Response {
|
|
548
|
+
// upgraded_identity returns the upgraded resource identity data
|
|
549
|
+
ResourceIdentityData upgraded_identity = 1;
|
|
550
|
+
|
|
551
|
+
// diagnostics is the collection of warning and error diagnostics for this request
|
|
552
|
+
repeated Diagnostic diagnostics = 2;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
message ValidateResourceTypeConfig {
|
|
557
|
+
message Request {
|
|
558
|
+
string type_name = 1;
|
|
559
|
+
DynamicValue config = 2;
|
|
560
|
+
ClientCapabilities client_capabilities = 3;
|
|
561
|
+
}
|
|
562
|
+
message Response {
|
|
563
|
+
repeated Diagnostic diagnostics = 1;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
message ValidateDataSourceConfig {
|
|
568
|
+
message Request {
|
|
569
|
+
string type_name = 1;
|
|
570
|
+
DynamicValue config = 2;
|
|
571
|
+
}
|
|
572
|
+
message Response {
|
|
573
|
+
repeated Diagnostic diagnostics = 1;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
message ValidateEphemeralResourceConfig {
|
|
578
|
+
message Request {
|
|
579
|
+
string type_name = 1;
|
|
580
|
+
DynamicValue config = 2;
|
|
581
|
+
}
|
|
582
|
+
message Response {
|
|
583
|
+
repeated Diagnostic diagnostics = 1;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
message Configure {
|
|
588
|
+
message Request {
|
|
589
|
+
string terraform_version = 1;
|
|
590
|
+
DynamicValue config = 2;
|
|
591
|
+
ClientCapabilities client_capabilities = 3;
|
|
592
|
+
}
|
|
593
|
+
message Response {
|
|
594
|
+
repeated Diagnostic diagnostics = 1;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
message ReadResource {
|
|
599
|
+
// Request is the message that is sent to the provider during the
|
|
600
|
+
// ReadResource RPC.
|
|
601
|
+
//
|
|
602
|
+
// This message intentionally does not include configuration data as any
|
|
603
|
+
// configuration-based or configuration-conditional changes should occur
|
|
604
|
+
// during the PlanResourceChange RPC. Additionally, the configuration is
|
|
605
|
+
// not guaranteed to be wholly known nor match the given prior state, which
|
|
606
|
+
// could lead to unexpected provider behaviors for practitioners.
|
|
607
|
+
message Request {
|
|
608
|
+
string type_name = 1;
|
|
609
|
+
DynamicValue current_state = 2;
|
|
610
|
+
bytes private = 3;
|
|
611
|
+
DynamicValue provider_meta = 4;
|
|
612
|
+
ClientCapabilities client_capabilities = 5;
|
|
613
|
+
ResourceIdentityData current_identity = 6;
|
|
614
|
+
}
|
|
615
|
+
message Response {
|
|
616
|
+
DynamicValue new_state = 1;
|
|
617
|
+
repeated Diagnostic diagnostics = 2;
|
|
618
|
+
bytes private = 3;
|
|
619
|
+
// deferred is set if the provider is deferring the change. If set the caller
|
|
620
|
+
// needs to handle the deferral.
|
|
621
|
+
Deferred deferred = 4;
|
|
622
|
+
ResourceIdentityData new_identity = 5;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
message PlanResourceChange {
|
|
627
|
+
message Request {
|
|
628
|
+
string type_name = 1;
|
|
629
|
+
DynamicValue prior_state = 2;
|
|
630
|
+
DynamicValue proposed_new_state = 3;
|
|
631
|
+
DynamicValue config = 4;
|
|
632
|
+
bytes prior_private = 5;
|
|
633
|
+
DynamicValue provider_meta = 6;
|
|
634
|
+
ClientCapabilities client_capabilities = 7;
|
|
635
|
+
ResourceIdentityData prior_identity = 8;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
message Response {
|
|
639
|
+
DynamicValue planned_state = 1;
|
|
640
|
+
repeated AttributePath requires_replace = 2;
|
|
641
|
+
bytes planned_private = 3;
|
|
642
|
+
repeated Diagnostic diagnostics = 4;
|
|
643
|
+
|
|
644
|
+
// This may be set only by the helper/schema "SDK" in the main Terraform
|
|
645
|
+
// repository, to request that Terraform Core >=0.12 permit additional
|
|
646
|
+
// inconsistencies that can result from the legacy SDK type system
|
|
647
|
+
// and its imprecise mapping to the >=0.12 type system.
|
|
648
|
+
// The change in behavior implied by this flag makes sense only for the
|
|
649
|
+
// specific details of the legacy SDK type system, and are not a general
|
|
650
|
+
// mechanism to avoid proper type handling in providers.
|
|
651
|
+
//
|
|
652
|
+
// ==== DO NOT USE THIS ====
|
|
653
|
+
// ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
|
|
654
|
+
// ==== DO NOT USE THIS ====
|
|
655
|
+
bool legacy_type_system = 5;
|
|
656
|
+
|
|
657
|
+
// deferred is set if the provider is deferring the change. If set the caller
|
|
658
|
+
// needs to handle the deferral.
|
|
659
|
+
Deferred deferred = 6;
|
|
660
|
+
|
|
661
|
+
ResourceIdentityData planned_identity = 7;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
message ApplyResourceChange {
|
|
666
|
+
message Request {
|
|
667
|
+
string type_name = 1;
|
|
668
|
+
DynamicValue prior_state = 2;
|
|
669
|
+
DynamicValue planned_state = 3;
|
|
670
|
+
DynamicValue config = 4;
|
|
671
|
+
bytes planned_private = 5;
|
|
672
|
+
DynamicValue provider_meta = 6;
|
|
673
|
+
ResourceIdentityData planned_identity = 7;
|
|
674
|
+
}
|
|
675
|
+
message Response {
|
|
676
|
+
DynamicValue new_state = 1;
|
|
677
|
+
bytes private = 2;
|
|
678
|
+
repeated Diagnostic diagnostics = 3;
|
|
679
|
+
|
|
680
|
+
// This may be set only by the helper/schema "SDK" in the main Terraform
|
|
681
|
+
// repository, to request that Terraform Core >=0.12 permit additional
|
|
682
|
+
// inconsistencies that can result from the legacy SDK type system
|
|
683
|
+
// and its imprecise mapping to the >=0.12 type system.
|
|
684
|
+
// The change in behavior implied by this flag makes sense only for the
|
|
685
|
+
// specific details of the legacy SDK type system, and are not a general
|
|
686
|
+
// mechanism to avoid proper type handling in providers.
|
|
687
|
+
//
|
|
688
|
+
// ==== DO NOT USE THIS ====
|
|
689
|
+
// ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
|
|
690
|
+
// ==== DO NOT USE THIS ====
|
|
691
|
+
bool legacy_type_system = 4;
|
|
692
|
+
|
|
693
|
+
ResourceIdentityData new_identity = 5;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
message ImportResourceState {
|
|
698
|
+
message Request {
|
|
699
|
+
string type_name = 1;
|
|
700
|
+
string id = 2;
|
|
701
|
+
ClientCapabilities client_capabilities = 3;
|
|
702
|
+
ResourceIdentityData identity = 4;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
message ImportedResource {
|
|
706
|
+
string type_name = 1;
|
|
707
|
+
DynamicValue state = 2;
|
|
708
|
+
bytes private = 3;
|
|
709
|
+
ResourceIdentityData identity = 4;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
message Response {
|
|
713
|
+
repeated ImportedResource imported_resources = 1;
|
|
714
|
+
repeated Diagnostic diagnostics = 2;
|
|
715
|
+
// deferred is set if the provider is deferring the change. If set the caller
|
|
716
|
+
// needs to handle the deferral.
|
|
717
|
+
Deferred deferred = 3;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
message MoveResourceState {
|
|
722
|
+
message Request {
|
|
723
|
+
// The address of the provider the resource is being moved from.
|
|
724
|
+
string source_provider_address = 1;
|
|
725
|
+
|
|
726
|
+
// The resource type that the resource is being moved from.
|
|
727
|
+
string source_type_name = 2;
|
|
728
|
+
|
|
729
|
+
// The schema version of the resource type that the resource is being
|
|
730
|
+
// moved from.
|
|
731
|
+
int64 source_schema_version = 3;
|
|
732
|
+
|
|
733
|
+
// The raw state of the resource being moved. Only the json field is
|
|
734
|
+
// populated, as there should be no legacy providers using the flatmap
|
|
735
|
+
// format that support newly introduced RPCs.
|
|
736
|
+
RawState source_state = 4;
|
|
737
|
+
|
|
738
|
+
// The resource type that the resource is being moved to.
|
|
739
|
+
string target_type_name = 5;
|
|
740
|
+
|
|
741
|
+
// The private state of the resource being moved.
|
|
742
|
+
bytes source_private = 6;
|
|
743
|
+
|
|
744
|
+
// The raw identity of the resource being moved. Only the json field is
|
|
745
|
+
// populated, as there should be no legacy providers using the flatmap
|
|
746
|
+
// format that support newly introduced RPCs.
|
|
747
|
+
RawState source_identity = 7;
|
|
748
|
+
|
|
749
|
+
// The identity schema version of the resource type that the resource
|
|
750
|
+
// is being moved from.
|
|
751
|
+
int64 source_identity_schema_version = 8;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
message Response {
|
|
755
|
+
// The state of the resource after it has been moved.
|
|
756
|
+
DynamicValue target_state = 1;
|
|
757
|
+
|
|
758
|
+
// Any diagnostics that occurred during the move.
|
|
759
|
+
repeated Diagnostic diagnostics = 2;
|
|
760
|
+
|
|
761
|
+
// The private state of the resource after it has been moved.
|
|
762
|
+
bytes target_private = 3;
|
|
763
|
+
|
|
764
|
+
ResourceIdentityData target_identity = 4;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
message ReadDataSource {
|
|
769
|
+
message Request {
|
|
770
|
+
string type_name = 1;
|
|
771
|
+
DynamicValue config = 2;
|
|
772
|
+
DynamicValue provider_meta = 3;
|
|
773
|
+
ClientCapabilities client_capabilities = 4;
|
|
774
|
+
}
|
|
775
|
+
message Response {
|
|
776
|
+
DynamicValue state = 1;
|
|
777
|
+
repeated Diagnostic diagnostics = 2;
|
|
778
|
+
// deferred is set if the provider is deferring the change. If set the caller
|
|
779
|
+
// needs to handle the deferral.
|
|
780
|
+
Deferred deferred = 3;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
service Provisioner {
|
|
785
|
+
rpc GetSchema(GetProvisionerSchema.Request) returns (GetProvisionerSchema.Response);
|
|
786
|
+
rpc ValidateProvisionerConfig(ValidateProvisionerConfig.Request) returns (ValidateProvisionerConfig.Response);
|
|
787
|
+
rpc ProvisionResource(ProvisionResource.Request) returns (stream ProvisionResource.Response);
|
|
788
|
+
rpc Stop(Stop.Request) returns (Stop.Response);
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
message GetProvisionerSchema {
|
|
792
|
+
message Request {
|
|
793
|
+
}
|
|
794
|
+
message Response {
|
|
795
|
+
Schema provisioner = 1;
|
|
796
|
+
repeated Diagnostic diagnostics = 2;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
message ValidateProvisionerConfig {
|
|
801
|
+
message Request {
|
|
802
|
+
DynamicValue config = 1;
|
|
803
|
+
}
|
|
804
|
+
message Response {
|
|
805
|
+
repeated Diagnostic diagnostics = 1;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
message ProvisionResource {
|
|
810
|
+
message Request {
|
|
811
|
+
DynamicValue config = 1;
|
|
812
|
+
DynamicValue connection = 2;
|
|
813
|
+
}
|
|
814
|
+
message Response {
|
|
815
|
+
string output = 1;
|
|
816
|
+
repeated Diagnostic diagnostics = 2;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
message OpenEphemeralResource {
|
|
821
|
+
message Request {
|
|
822
|
+
string type_name = 1;
|
|
823
|
+
DynamicValue config = 2;
|
|
824
|
+
ClientCapabilities client_capabilities = 3;
|
|
825
|
+
}
|
|
826
|
+
message Response {
|
|
827
|
+
repeated Diagnostic diagnostics = 1;
|
|
828
|
+
optional google.protobuf.Timestamp renew_at = 2;
|
|
829
|
+
DynamicValue result = 3;
|
|
830
|
+
optional bytes private = 4;
|
|
831
|
+
Deferred deferred = 5;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
message RenewEphemeralResource {
|
|
836
|
+
message Request {
|
|
837
|
+
string type_name = 1;
|
|
838
|
+
optional bytes private = 2;
|
|
839
|
+
}
|
|
840
|
+
message Response {
|
|
841
|
+
repeated Diagnostic diagnostics = 1;
|
|
842
|
+
optional google.protobuf.Timestamp renew_at = 2;
|
|
843
|
+
optional bytes private = 3;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
message CloseEphemeralResource {
|
|
848
|
+
message Request {
|
|
849
|
+
string type_name = 1;
|
|
850
|
+
optional bytes private = 2;
|
|
851
|
+
}
|
|
852
|
+
message Response {
|
|
853
|
+
repeated Diagnostic diagnostics = 1;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
message GetFunctions {
|
|
858
|
+
message Request {}
|
|
859
|
+
|
|
860
|
+
message Response {
|
|
861
|
+
// functions is a mapping of function names to definitions.
|
|
862
|
+
map<string, Function> functions = 1;
|
|
863
|
+
|
|
864
|
+
// diagnostics is any warnings or errors.
|
|
865
|
+
repeated Diagnostic diagnostics = 2;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
message CallFunction {
|
|
870
|
+
message Request {
|
|
871
|
+
string name = 1;
|
|
872
|
+
repeated DynamicValue arguments = 2;
|
|
873
|
+
}
|
|
874
|
+
message Response {
|
|
875
|
+
DynamicValue result = 1;
|
|
876
|
+
FunctionError error = 2;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
message ListResource {
|
|
881
|
+
message Request {
|
|
882
|
+
// type_name is the list resource type name.
|
|
883
|
+
string type_name = 1;
|
|
884
|
+
|
|
885
|
+
// configuration is the list ConfigSchema-based configuration data.
|
|
886
|
+
DynamicValue config = 2;
|
|
887
|
+
|
|
888
|
+
// when include_resource_object is set to true, the provider should
|
|
889
|
+
// include the full resource object for each result
|
|
890
|
+
bool include_resource_object = 3;
|
|
891
|
+
|
|
892
|
+
// The maximum number of results that Terraform is expecting.
|
|
893
|
+
// The stream will stop, once this limit is reached.
|
|
894
|
+
int64 limit = 4;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
message Event {
|
|
898
|
+
// identity is the resource identity data of the resource instance.
|
|
899
|
+
ResourceIdentityData identity = 1;
|
|
900
|
+
|
|
901
|
+
// display_name can be displayed in a UI to make it easier for humans to identify a resource
|
|
902
|
+
string display_name = 2;
|
|
903
|
+
|
|
904
|
+
// optional resource object which can be useful when combining list blocks in configuration
|
|
905
|
+
optional DynamicValue resource_object = 3;
|
|
906
|
+
|
|
907
|
+
// A warning or error diagnostics for this event
|
|
908
|
+
repeated Diagnostic diagnostic = 4;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
message ValidateListResourceConfig {
|
|
913
|
+
message Request {
|
|
914
|
+
string type_name = 1;
|
|
915
|
+
DynamicValue config = 2;
|
|
916
|
+
DynamicValue include_resource_object = 3;
|
|
917
|
+
DynamicValue limit = 4;
|
|
918
|
+
}
|
|
919
|
+
message Response {
|
|
920
|
+
repeated Diagnostic diagnostics = 1;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
message PlanAction {
|
|
925
|
+
message Request {
|
|
926
|
+
message LinkedResource {
|
|
927
|
+
// prior_state is the state of the linked resource before the action is planned.
|
|
928
|
+
DynamicValue prior_state = 1;
|
|
929
|
+
// planned_state describes the value the linked resource has been last planned with.
|
|
930
|
+
// This could also be the output of a predecessor action.
|
|
931
|
+
DynamicValue planned_state = 2;
|
|
932
|
+
DynamicValue config = 3;
|
|
933
|
+
ResourceIdentityData prior_identity = 4;
|
|
934
|
+
}
|
|
935
|
+
string action_type = 1;
|
|
936
|
+
// linked resources, this should match the order the resources are specified in the schema.
|
|
937
|
+
repeated LinkedResource linked_resources = 2;
|
|
938
|
+
// config of the action, based on the schema of the actual action
|
|
939
|
+
DynamicValue config = 6;
|
|
940
|
+
// metadata
|
|
941
|
+
ClientCapabilities client_capabilities = 8;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
message Response {
|
|
945
|
+
message LinkedResource {
|
|
946
|
+
DynamicValue planned_state = 1;
|
|
947
|
+
ResourceIdentityData planned_identity = 2;
|
|
948
|
+
}
|
|
949
|
+
// planned changes to the linked resources in the order they are specified in the schema.
|
|
950
|
+
repeated LinkedResource linked_resources = 1;
|
|
951
|
+
repeated Diagnostic diagnostics = 2;
|
|
952
|
+
// metadata
|
|
953
|
+
Deferred deferred = 3;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
message InvokeAction {
|
|
958
|
+
message Request {
|
|
959
|
+
message LinkedResource {
|
|
960
|
+
DynamicValue prior_state = 1;
|
|
961
|
+
// planned_state describes the value the linked resource has been last planned
|
|
962
|
+
// with. This could also be the output of a predecessor action.
|
|
963
|
+
DynamicValue planned_state = 2;
|
|
964
|
+
DynamicValue config = 3;
|
|
965
|
+
ResourceIdentityData planned_identity = 4;
|
|
966
|
+
}
|
|
967
|
+
string action_type = 1;
|
|
968
|
+
// linked resources, matching the order they are specified in the schema
|
|
969
|
+
repeated LinkedResource linked_resources = 2;
|
|
970
|
+
// response from the plan
|
|
971
|
+
DynamicValue config = 3;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
message Event {
|
|
975
|
+
message Progress {
|
|
976
|
+
// message to be printed in the console / HCPT
|
|
977
|
+
string message = 1;
|
|
978
|
+
}
|
|
979
|
+
message Completed {
|
|
980
|
+
message LinkedResource {
|
|
981
|
+
DynamicValue new_state = 1;
|
|
982
|
+
ResourceIdentityData new_identity = 2;
|
|
983
|
+
// Can only be set if error diagnostics are present.
|
|
984
|
+
bool requires_replace = 3;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
// linked resources, matching the order they are specified in the schema
|
|
988
|
+
repeated LinkedResource linked_resources = 1;
|
|
989
|
+
repeated Diagnostic diagnostics = 3;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
oneof type {
|
|
993
|
+
Progress progress = 1;
|
|
994
|
+
Completed completed = 2;
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
message ValidateActionConfig {
|
|
1000
|
+
message Request {
|
|
1001
|
+
string type_name = 1;
|
|
1002
|
+
DynamicValue config = 2;
|
|
1003
|
+
repeated LinkedResourceConfig linked_resources = 3;
|
|
1004
|
+
}
|
|
1005
|
+
message Response {
|
|
1006
|
+
repeated Diagnostic diagnostics = 1;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
message LinkedResourceConfig {
|
|
1011
|
+
string type_name = 1;
|
|
1012
|
+
DynamicValue config = 2;
|
|
1013
|
+
}
|