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,1092 @@
|
|
|
1
|
+
// Copyright IBM Corp. 2014, 2026
|
|
2
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
|
|
4
|
+
// Terraform Plugin RPC protocol version 6.11
|
|
5
|
+
//
|
|
6
|
+
// This file defines version 6.11 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 6 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/tfplugin6";
|
|
23
|
+
|
|
24
|
+
import "google/protobuf/timestamp.proto";
|
|
25
|
+
|
|
26
|
+
package tfplugin6;
|
|
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 StopProvider {
|
|
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
|
+
Schema schema = 1; // of the action itself
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Schema is the configuration schema for a Resource or Provider.
|
|
153
|
+
message Schema {
|
|
154
|
+
message Block {
|
|
155
|
+
int64 version = 1;
|
|
156
|
+
repeated Attribute attributes = 2;
|
|
157
|
+
repeated NestedBlock block_types = 3;
|
|
158
|
+
string description = 4;
|
|
159
|
+
StringKind description_kind = 5;
|
|
160
|
+
bool deprecated = 6;
|
|
161
|
+
string deprecation_message = 7;
|
|
162
|
+
bool computed = 8;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
message Attribute {
|
|
166
|
+
string name = 1;
|
|
167
|
+
bytes type = 2;
|
|
168
|
+
Object nested_type = 10;
|
|
169
|
+
string description = 3;
|
|
170
|
+
bool required = 4;
|
|
171
|
+
bool optional = 5;
|
|
172
|
+
bool computed = 6;
|
|
173
|
+
bool sensitive = 7;
|
|
174
|
+
StringKind description_kind = 8;
|
|
175
|
+
bool deprecated = 9;
|
|
176
|
+
bool write_only = 11;
|
|
177
|
+
string deprecation_message = 12;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
message NestedBlock {
|
|
181
|
+
enum NestingMode {
|
|
182
|
+
INVALID = 0;
|
|
183
|
+
SINGLE = 1;
|
|
184
|
+
LIST = 2;
|
|
185
|
+
SET = 3;
|
|
186
|
+
MAP = 4;
|
|
187
|
+
GROUP = 5;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
string type_name = 1;
|
|
191
|
+
Block block = 2;
|
|
192
|
+
NestingMode nesting = 3;
|
|
193
|
+
int64 min_items = 4;
|
|
194
|
+
int64 max_items = 5;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
message Object {
|
|
198
|
+
enum NestingMode {
|
|
199
|
+
INVALID = 0;
|
|
200
|
+
SINGLE = 1;
|
|
201
|
+
LIST = 2;
|
|
202
|
+
SET = 3;
|
|
203
|
+
MAP = 4;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
repeated Attribute attributes = 1;
|
|
207
|
+
NestingMode nesting = 3;
|
|
208
|
+
|
|
209
|
+
// MinItems and MaxItems were never used in the protocol, and have no
|
|
210
|
+
// effect on validation.
|
|
211
|
+
int64 min_items = 4 [ deprecated = true ];
|
|
212
|
+
int64 max_items = 5 [ deprecated = true ];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// The version of the schema.
|
|
216
|
+
// Schemas are versioned, so that providers can upgrade a saved resource
|
|
217
|
+
// state when the schema is changed.
|
|
218
|
+
int64 version = 1;
|
|
219
|
+
|
|
220
|
+
// Block is the top level configuration block for this schema.
|
|
221
|
+
Block block = 2;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
message Function {
|
|
225
|
+
// parameters is the ordered list of positional function parameters.
|
|
226
|
+
repeated Parameter parameters = 1;
|
|
227
|
+
|
|
228
|
+
// variadic_parameter is an optional final parameter which accepts
|
|
229
|
+
// zero or more argument values, in which Terraform will send an
|
|
230
|
+
// ordered list of the parameter type.
|
|
231
|
+
Parameter variadic_parameter = 2;
|
|
232
|
+
|
|
233
|
+
// Return is the function return parameter.
|
|
234
|
+
Return return = 3;
|
|
235
|
+
|
|
236
|
+
// summary is the human-readable shortened documentation for the function.
|
|
237
|
+
string summary = 4;
|
|
238
|
+
|
|
239
|
+
// description is human-readable documentation for the function.
|
|
240
|
+
string description = 5;
|
|
241
|
+
|
|
242
|
+
// description_kind is the formatting of the description.
|
|
243
|
+
StringKind description_kind = 6;
|
|
244
|
+
|
|
245
|
+
// deprecation_message is human-readable documentation if the
|
|
246
|
+
// function is deprecated.
|
|
247
|
+
string deprecation_message = 7;
|
|
248
|
+
|
|
249
|
+
message Parameter {
|
|
250
|
+
// name is the human-readable display name for the parameter.
|
|
251
|
+
string name = 1;
|
|
252
|
+
|
|
253
|
+
// type is the type constraint for the parameter.
|
|
254
|
+
bytes type = 2;
|
|
255
|
+
|
|
256
|
+
// allow_null_value when enabled denotes that a null argument value can
|
|
257
|
+
// be passed to the provider. When disabled, Terraform returns an error
|
|
258
|
+
// if the argument value is null.
|
|
259
|
+
bool allow_null_value = 3;
|
|
260
|
+
|
|
261
|
+
// allow_unknown_values when enabled denotes that only wholly known
|
|
262
|
+
// argument values will be passed to the provider. When disabled,
|
|
263
|
+
// Terraform skips the function call entirely and assumes an unknown
|
|
264
|
+
// value result from the function.
|
|
265
|
+
bool allow_unknown_values = 4;
|
|
266
|
+
|
|
267
|
+
// description is human-readable documentation for the parameter.
|
|
268
|
+
string description = 5;
|
|
269
|
+
|
|
270
|
+
// description_kind is the formatting of the description.
|
|
271
|
+
StringKind description_kind = 6;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
message Return {
|
|
275
|
+
// type is the type constraint for the function result.
|
|
276
|
+
bytes type = 1;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// ServerCapabilities allows providers to communicate extra information
|
|
281
|
+
// regarding supported protocol features. This is used to indicate
|
|
282
|
+
// availability of certain forward-compatible changes which may be optional
|
|
283
|
+
// in a major protocol version, but cannot be tested for directly.
|
|
284
|
+
message ServerCapabilities {
|
|
285
|
+
// The plan_destroy capability signals that a provider expects a call
|
|
286
|
+
// to PlanResourceChange when a resource is going to be destroyed.
|
|
287
|
+
bool plan_destroy = 1;
|
|
288
|
+
|
|
289
|
+
// The get_provider_schema_optional capability indicates that this
|
|
290
|
+
// provider does not require calling GetProviderSchema to operate
|
|
291
|
+
// normally, and the caller can used a cached copy of the provider's
|
|
292
|
+
// schema.
|
|
293
|
+
bool get_provider_schema_optional = 2;
|
|
294
|
+
|
|
295
|
+
// The move_resource_state capability signals that a provider supports the
|
|
296
|
+
// MoveResourceState RPC.
|
|
297
|
+
bool move_resource_state = 3;
|
|
298
|
+
|
|
299
|
+
// The generate_resource_config capability signals that a provider supports
|
|
300
|
+
// GenerateResourceConfig.
|
|
301
|
+
bool generate_resource_config = 4;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// ClientCapabilities allows Terraform to publish information regarding
|
|
305
|
+
// supported protocol features. This is used to indicate availability of
|
|
306
|
+
// certain forward-compatible changes which may be optional in a major
|
|
307
|
+
// protocol version, but cannot be tested for directly.
|
|
308
|
+
message ClientCapabilities {
|
|
309
|
+
// The deferral_allowed capability signals that the client is able to
|
|
310
|
+
// handle deferred responses from the provider.
|
|
311
|
+
bool deferral_allowed = 1;
|
|
312
|
+
|
|
313
|
+
// The write_only_attributes_allowed capability signals that the client
|
|
314
|
+
// is able to handle write_only attributes for managed resources.
|
|
315
|
+
bool write_only_attributes_allowed = 2;
|
|
316
|
+
|
|
317
|
+
// store_planned_private indicates that the client will store the private data
|
|
318
|
+
// returned with an initial plan, and send it back to the provider as
|
|
319
|
+
// PlannedPrivate data in a subsequent plan request.
|
|
320
|
+
bool store_planned_private = 3;
|
|
321
|
+
|
|
322
|
+
// computed_blocks_allowed indicates that the client can handle optionally
|
|
323
|
+
// computed nested block values in resources. Because older versions of
|
|
324
|
+
// Terraform without this capability will ignore the computed flag in the
|
|
325
|
+
// schema, it is up to the provider to return an appropriate diagnostic when
|
|
326
|
+
// a resource requiring the computed behavior is used.
|
|
327
|
+
bool computed_blocks_allowed = 4;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// Deferred is a message that indicates that change is deferred for a reason.
|
|
331
|
+
message Deferred {
|
|
332
|
+
// Reason is the reason for deferring the change.
|
|
333
|
+
enum Reason {
|
|
334
|
+
// UNKNOWN is the default value, and should not be used.
|
|
335
|
+
UNKNOWN = 0;
|
|
336
|
+
// RESOURCE_CONFIG_UNKNOWN is used when the config is partially unknown and the real
|
|
337
|
+
// values need to be known before the change can be planned.
|
|
338
|
+
RESOURCE_CONFIG_UNKNOWN = 1;
|
|
339
|
+
// PROVIDER_CONFIG_UNKNOWN is used when parts of the provider configuration
|
|
340
|
+
// are unknown, e.g. the provider configuration is only known after the apply is done.
|
|
341
|
+
PROVIDER_CONFIG_UNKNOWN = 2;
|
|
342
|
+
// ABSENT_PREREQ is used when a hard dependency has not been satisfied.
|
|
343
|
+
ABSENT_PREREQ = 3;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// reason is the reason for deferring the change.
|
|
347
|
+
Reason reason = 1;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
service Provider {
|
|
351
|
+
//////// Information about what a provider supports/expects
|
|
352
|
+
|
|
353
|
+
// GetMetadata returns upfront information about server capabilities and
|
|
354
|
+
// supported resource types without requiring the server to instantiate all
|
|
355
|
+
// schema information, which may be memory intensive.
|
|
356
|
+
// This method is CURRENTLY UNUSED and it serves mostly for convenience
|
|
357
|
+
// of code generation inside of terraform-plugin-mux.
|
|
358
|
+
rpc GetMetadata(GetMetadata.Request) returns (GetMetadata.Response);
|
|
359
|
+
|
|
360
|
+
// GetSchema returns schema information for the provider, data resources,
|
|
361
|
+
// and managed resources.
|
|
362
|
+
rpc GetProviderSchema(GetProviderSchema.Request) returns (GetProviderSchema.Response);
|
|
363
|
+
rpc ValidateProviderConfig(ValidateProviderConfig.Request) returns (ValidateProviderConfig.Response);
|
|
364
|
+
rpc ValidateResourceConfig(ValidateResourceConfig.Request) returns (ValidateResourceConfig.Response);
|
|
365
|
+
rpc ValidateDataResourceConfig(ValidateDataResourceConfig.Request) returns (ValidateDataResourceConfig.Response);
|
|
366
|
+
rpc UpgradeResourceState(UpgradeResourceState.Request) returns (UpgradeResourceState.Response);
|
|
367
|
+
|
|
368
|
+
// GetResourceIdentitySchemas returns the identity schemas for all managed
|
|
369
|
+
// resources.
|
|
370
|
+
rpc GetResourceIdentitySchemas(GetResourceIdentitySchemas.Request) returns (GetResourceIdentitySchemas.Response);
|
|
371
|
+
// UpgradeResourceIdentityData should return the upgraded resource identity
|
|
372
|
+
// data for a managed resource type.
|
|
373
|
+
rpc UpgradeResourceIdentity(UpgradeResourceIdentity.Request) returns (UpgradeResourceIdentity.Response);
|
|
374
|
+
|
|
375
|
+
//////// One-time initialization, called before other functions below
|
|
376
|
+
rpc ConfigureProvider(ConfigureProvider.Request) returns (ConfigureProvider.Response);
|
|
377
|
+
|
|
378
|
+
//////// Managed Resource Lifecycle
|
|
379
|
+
rpc ReadResource(ReadResource.Request) returns (ReadResource.Response);
|
|
380
|
+
rpc PlanResourceChange(PlanResourceChange.Request) returns (PlanResourceChange.Response);
|
|
381
|
+
rpc ApplyResourceChange(ApplyResourceChange.Request) returns (ApplyResourceChange.Response);
|
|
382
|
+
rpc ImportResourceState(ImportResourceState.Request) returns (ImportResourceState.Response);
|
|
383
|
+
rpc MoveResourceState(MoveResourceState.Request) returns (MoveResourceState.Response);
|
|
384
|
+
rpc ReadDataSource(ReadDataSource.Request) returns (ReadDataSource.Response);
|
|
385
|
+
rpc GenerateResourceConfig(GenerateResourceConfig.Request) returns (GenerateResourceConfig.Response);
|
|
386
|
+
|
|
387
|
+
//////// Ephemeral Resource Lifecycle
|
|
388
|
+
rpc ValidateEphemeralResourceConfig(ValidateEphemeralResourceConfig.Request) returns (ValidateEphemeralResourceConfig.Response);
|
|
389
|
+
rpc OpenEphemeralResource(OpenEphemeralResource.Request) returns (OpenEphemeralResource.Response);
|
|
390
|
+
rpc RenewEphemeralResource(RenewEphemeralResource.Request) returns (RenewEphemeralResource.Response);
|
|
391
|
+
rpc CloseEphemeralResource(CloseEphemeralResource.Request) returns (CloseEphemeralResource.Response);
|
|
392
|
+
|
|
393
|
+
/////// List
|
|
394
|
+
rpc ListResource(ListResource.Request) returns (stream ListResource.Event);
|
|
395
|
+
rpc ValidateListResourceConfig(ValidateListResourceConfig.Request) returns (ValidateListResourceConfig.Response);
|
|
396
|
+
|
|
397
|
+
// GetFunctions returns the definitions of all functions.
|
|
398
|
+
rpc GetFunctions(GetFunctions.Request) returns (GetFunctions.Response);
|
|
399
|
+
|
|
400
|
+
//////// Provider-contributed Functions
|
|
401
|
+
rpc CallFunction(CallFunction.Request) returns (CallFunction.Response);
|
|
402
|
+
|
|
403
|
+
// ValidateStateStoreConfig performs configuration validation
|
|
404
|
+
rpc ValidateStateStoreConfig(ValidateStateStore.Request) returns (ValidateStateStore.Response);
|
|
405
|
+
// ConfigureStateStore configures the state store, such as S3 connection in the context of already configured provider
|
|
406
|
+
rpc ConfigureStateStore(ConfigureStateStore.Request) returns (ConfigureStateStore.Response);
|
|
407
|
+
|
|
408
|
+
// ReadStateBytes streams byte chunks of a given state file from a state store
|
|
409
|
+
rpc ReadStateBytes(ReadStateBytes.Request) returns (stream ReadStateBytes.Response);
|
|
410
|
+
// WriteStateBytes streams byte chunks of a given state file into a state store
|
|
411
|
+
rpc WriteStateBytes(stream WriteStateBytes.RequestChunk) returns (WriteStateBytes.Response);
|
|
412
|
+
|
|
413
|
+
// LockState locks a given state (i.e. CE workspace)
|
|
414
|
+
rpc LockState(LockState.Request) returns (LockState.Response);
|
|
415
|
+
// UnlockState unlocks a given state (i.e. CE workspace)
|
|
416
|
+
rpc UnlockState(UnlockState.Request) returns (UnlockState.Response);
|
|
417
|
+
|
|
418
|
+
// GetStates returns a list of all states (i.e. CE workspaces) managed by a given state store
|
|
419
|
+
rpc GetStates(GetStates.Request) returns (GetStates.Response);
|
|
420
|
+
// DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace)
|
|
421
|
+
rpc DeleteState(DeleteState.Request) returns (DeleteState.Response);
|
|
422
|
+
|
|
423
|
+
//////// Actions
|
|
424
|
+
rpc PlanAction(PlanAction.Request) returns (PlanAction.Response);
|
|
425
|
+
rpc InvokeAction(InvokeAction.Request) returns (stream InvokeAction.Event);
|
|
426
|
+
rpc ValidateActionConfig(ValidateActionConfig.Request) returns (ValidateActionConfig.Response);
|
|
427
|
+
|
|
428
|
+
//////// Graceful Shutdown
|
|
429
|
+
rpc StopProvider(StopProvider.Request) returns (StopProvider.Response);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
message GetMetadata {
|
|
433
|
+
message Request {
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
message Response {
|
|
437
|
+
ServerCapabilities server_capabilities = 1;
|
|
438
|
+
repeated Diagnostic diagnostics = 2;
|
|
439
|
+
repeated DataSourceMetadata data_sources = 3;
|
|
440
|
+
repeated ResourceMetadata resources = 4;
|
|
441
|
+
// functions returns metadata for any functions.
|
|
442
|
+
repeated FunctionMetadata functions = 5;
|
|
443
|
+
repeated EphemeralMetadata ephemeral_resources = 6;
|
|
444
|
+
repeated ListResourceMetadata list_resources = 7;
|
|
445
|
+
repeated StateStoreMetadata state_stores = 8;
|
|
446
|
+
repeated ActionMetadata actions = 9;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
message EphemeralMetadata {
|
|
450
|
+
string type_name = 1;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
message FunctionMetadata {
|
|
454
|
+
// name is the function name.
|
|
455
|
+
string name = 1;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
message DataSourceMetadata {
|
|
459
|
+
string type_name = 1;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
message ResourceMetadata {
|
|
463
|
+
string type_name = 1;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
message ListResourceMetadata {
|
|
467
|
+
string type_name = 1;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
message StateStoreMetadata {
|
|
471
|
+
string type_name = 1;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
message ActionMetadata {
|
|
475
|
+
string type_name = 1;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
message GetProviderSchema {
|
|
480
|
+
message Request {
|
|
481
|
+
}
|
|
482
|
+
message Response {
|
|
483
|
+
Schema provider = 1;
|
|
484
|
+
map<string, Schema> resource_schemas = 2;
|
|
485
|
+
map<string, Schema> data_source_schemas = 3;
|
|
486
|
+
map<string, Function> functions = 7;
|
|
487
|
+
map<string, Schema> ephemeral_resource_schemas = 8;
|
|
488
|
+
map<string, Schema> list_resource_schemas = 9;
|
|
489
|
+
map<string, Schema> state_store_schemas = 10;
|
|
490
|
+
map<string, ActionSchema> action_schemas = 11;
|
|
491
|
+
repeated Diagnostic diagnostics = 4;
|
|
492
|
+
Schema provider_meta = 5;
|
|
493
|
+
ServerCapabilities server_capabilities = 6;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
message ValidateProviderConfig {
|
|
498
|
+
message Request {
|
|
499
|
+
DynamicValue config = 1;
|
|
500
|
+
}
|
|
501
|
+
message Response {
|
|
502
|
+
repeated Diagnostic diagnostics = 2;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
message UpgradeResourceState {
|
|
507
|
+
// Request is the message that is sent to the provider during the
|
|
508
|
+
// UpgradeResourceState RPC.
|
|
509
|
+
//
|
|
510
|
+
// This message intentionally does not include configuration data as any
|
|
511
|
+
// configuration-based or configuration-conditional changes should occur
|
|
512
|
+
// during the PlanResourceChange RPC. Additionally, the configuration is
|
|
513
|
+
// not guaranteed to exist (in the case of resource destruction), be wholly
|
|
514
|
+
// known, nor match the given prior state, which could lead to unexpected
|
|
515
|
+
// provider behaviors for practitioners.
|
|
516
|
+
message Request {
|
|
517
|
+
string type_name = 1;
|
|
518
|
+
|
|
519
|
+
// version is the schema_version number recorded in the state file
|
|
520
|
+
int64 version = 2;
|
|
521
|
+
|
|
522
|
+
// raw_state is the raw states as stored for the resource. Core does
|
|
523
|
+
// not have access to the schema of prior_version, so it's the
|
|
524
|
+
// provider's responsibility to interpret this value using the
|
|
525
|
+
// appropriate older schema. The raw_state will be the json encoded
|
|
526
|
+
// state, or a legacy flat-mapped format.
|
|
527
|
+
RawState raw_state = 3;
|
|
528
|
+
}
|
|
529
|
+
message Response {
|
|
530
|
+
// new_state is a msgpack-encoded data structure that, when interpreted with
|
|
531
|
+
// the _current_ schema for this resource type, is functionally equivalent to
|
|
532
|
+
// that which was given in prior_state_raw.
|
|
533
|
+
DynamicValue upgraded_state = 1;
|
|
534
|
+
|
|
535
|
+
// diagnostics describes any errors encountered during migration that could not
|
|
536
|
+
// be safely resolved, and warnings about any possibly-risky assumptions made
|
|
537
|
+
// in the upgrade process.
|
|
538
|
+
repeated Diagnostic diagnostics = 2;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
message GetResourceIdentitySchemas {
|
|
543
|
+
message Request {
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
message Response {
|
|
547
|
+
// identity_schemas is a mapping of resource type names to their identity schemas.
|
|
548
|
+
map<string, ResourceIdentitySchema> identity_schemas = 1;
|
|
549
|
+
|
|
550
|
+
// diagnostics is the collection of warning and error diagnostics for this request.
|
|
551
|
+
repeated Diagnostic diagnostics = 2;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
message UpgradeResourceIdentity {
|
|
556
|
+
message Request {
|
|
557
|
+
// type_name is the managed resource type name
|
|
558
|
+
string type_name = 1;
|
|
559
|
+
|
|
560
|
+
// version is the version of the resource identity data to upgrade
|
|
561
|
+
int64 version = 2;
|
|
562
|
+
|
|
563
|
+
// raw_identity is the raw identity as stored for the resource. Core does
|
|
564
|
+
// not have access to the identity schema of prior_version, so it's the
|
|
565
|
+
// provider's responsibility to interpret this value using the
|
|
566
|
+
// appropriate older schema. The raw_identity will be json encoded.
|
|
567
|
+
RawState raw_identity = 3;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
message Response {
|
|
571
|
+
// upgraded_identity returns the upgraded resource identity data
|
|
572
|
+
ResourceIdentityData upgraded_identity = 1;
|
|
573
|
+
|
|
574
|
+
// diagnostics is the collection of warning and error diagnostics for this request
|
|
575
|
+
repeated Diagnostic diagnostics = 2;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
message ValidateResourceConfig {
|
|
580
|
+
message Request {
|
|
581
|
+
string type_name = 1;
|
|
582
|
+
DynamicValue config = 2;
|
|
583
|
+
ClientCapabilities client_capabilities = 3;
|
|
584
|
+
}
|
|
585
|
+
message Response {
|
|
586
|
+
repeated Diagnostic diagnostics = 1;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
message ValidateDataResourceConfig {
|
|
591
|
+
message Request {
|
|
592
|
+
string type_name = 1;
|
|
593
|
+
DynamicValue config = 2;
|
|
594
|
+
}
|
|
595
|
+
message Response {
|
|
596
|
+
repeated Diagnostic diagnostics = 1;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
message ValidateEphemeralResourceConfig {
|
|
601
|
+
message Request {
|
|
602
|
+
string type_name = 1;
|
|
603
|
+
DynamicValue config = 2;
|
|
604
|
+
}
|
|
605
|
+
message Response {
|
|
606
|
+
repeated Diagnostic diagnostics = 1;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
message ConfigureProvider {
|
|
611
|
+
message Request {
|
|
612
|
+
string terraform_version = 1;
|
|
613
|
+
DynamicValue config = 2;
|
|
614
|
+
ClientCapabilities client_capabilities = 3;
|
|
615
|
+
}
|
|
616
|
+
message Response {
|
|
617
|
+
repeated Diagnostic diagnostics = 1;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
message ReadResource {
|
|
622
|
+
// Request is the message that is sent to the provider during the
|
|
623
|
+
// ReadResource RPC.
|
|
624
|
+
//
|
|
625
|
+
// This message intentionally does not include configuration data as any
|
|
626
|
+
// configuration-based or configuration-conditional changes should occur
|
|
627
|
+
// during the PlanResourceChange RPC. Additionally, the configuration is
|
|
628
|
+
// not guaranteed to be wholly known nor match the given prior state, which
|
|
629
|
+
// could lead to unexpected provider behaviors for practitioners.
|
|
630
|
+
message Request {
|
|
631
|
+
string type_name = 1;
|
|
632
|
+
DynamicValue current_state = 2;
|
|
633
|
+
bytes private = 3;
|
|
634
|
+
DynamicValue provider_meta = 4;
|
|
635
|
+
ClientCapabilities client_capabilities = 5;
|
|
636
|
+
ResourceIdentityData current_identity = 6;
|
|
637
|
+
}
|
|
638
|
+
message Response {
|
|
639
|
+
DynamicValue new_state = 1;
|
|
640
|
+
repeated Diagnostic diagnostics = 2;
|
|
641
|
+
bytes private = 3;
|
|
642
|
+
// deferred is set if the provider is deferring the change. If set the caller
|
|
643
|
+
// needs to handle the deferral.
|
|
644
|
+
Deferred deferred = 4;
|
|
645
|
+
ResourceIdentityData new_identity = 5;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
message PlanResourceChange {
|
|
650
|
+
message Request {
|
|
651
|
+
string type_name = 1;
|
|
652
|
+
DynamicValue prior_state = 2;
|
|
653
|
+
DynamicValue proposed_new_state = 3;
|
|
654
|
+
DynamicValue config = 4;
|
|
655
|
+
bytes prior_private = 5;
|
|
656
|
+
DynamicValue provider_meta = 6;
|
|
657
|
+
ClientCapabilities client_capabilities = 7;
|
|
658
|
+
ResourceIdentityData prior_identity = 8;
|
|
659
|
+
bytes planned_private = 9;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
message Response {
|
|
663
|
+
DynamicValue planned_state = 1;
|
|
664
|
+
repeated AttributePath requires_replace = 2;
|
|
665
|
+
bytes planned_private = 3;
|
|
666
|
+
repeated Diagnostic diagnostics = 4;
|
|
667
|
+
|
|
668
|
+
// This may be set only by the helper/schema "SDK" in the main Terraform
|
|
669
|
+
// repository, to request that Terraform Core >=0.12 permit additional
|
|
670
|
+
// inconsistencies that can result from the legacy SDK type system
|
|
671
|
+
// and its imprecise mapping to the >=0.12 type system.
|
|
672
|
+
// The change in behavior implied by this flag makes sense only for the
|
|
673
|
+
// specific details of the legacy SDK type system, and are not a general
|
|
674
|
+
// mechanism to avoid proper type handling in providers.
|
|
675
|
+
//
|
|
676
|
+
// ==== DO NOT USE THIS ====
|
|
677
|
+
// ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
|
|
678
|
+
// ==== DO NOT USE THIS ====
|
|
679
|
+
bool legacy_type_system = 5;
|
|
680
|
+
|
|
681
|
+
// deferred is set if the provider is deferring the change. If set the caller
|
|
682
|
+
// needs to handle the deferral.
|
|
683
|
+
Deferred deferred = 6;
|
|
684
|
+
|
|
685
|
+
ResourceIdentityData planned_identity = 7;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
message ApplyResourceChange {
|
|
690
|
+
message Request {
|
|
691
|
+
string type_name = 1;
|
|
692
|
+
DynamicValue prior_state = 2;
|
|
693
|
+
DynamicValue planned_state = 3;
|
|
694
|
+
DynamicValue config = 4;
|
|
695
|
+
bytes planned_private = 5;
|
|
696
|
+
DynamicValue provider_meta = 6;
|
|
697
|
+
ResourceIdentityData planned_identity = 7;
|
|
698
|
+
}
|
|
699
|
+
message Response {
|
|
700
|
+
DynamicValue new_state = 1;
|
|
701
|
+
bytes private = 2;
|
|
702
|
+
repeated Diagnostic diagnostics = 3;
|
|
703
|
+
|
|
704
|
+
// This may be set only by the helper/schema "SDK" in the main Terraform
|
|
705
|
+
// repository, to request that Terraform Core >=0.12 permit additional
|
|
706
|
+
// inconsistencies that can result from the legacy SDK type system
|
|
707
|
+
// and its imprecise mapping to the >=0.12 type system.
|
|
708
|
+
// The change in behavior implied by this flag makes sense only for the
|
|
709
|
+
// specific details of the legacy SDK type system, and are not a general
|
|
710
|
+
// mechanism to avoid proper type handling in providers.
|
|
711
|
+
//
|
|
712
|
+
// ==== DO NOT USE THIS ====
|
|
713
|
+
// ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
|
|
714
|
+
// ==== DO NOT USE THIS ====
|
|
715
|
+
bool legacy_type_system = 4;
|
|
716
|
+
|
|
717
|
+
ResourceIdentityData new_identity = 5;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
message ImportResourceState {
|
|
722
|
+
message Request {
|
|
723
|
+
string type_name = 1;
|
|
724
|
+
string id = 2;
|
|
725
|
+
ClientCapabilities client_capabilities = 3;
|
|
726
|
+
ResourceIdentityData identity = 4;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
message ImportedResource {
|
|
730
|
+
string type_name = 1;
|
|
731
|
+
DynamicValue state = 2;
|
|
732
|
+
bytes private = 3;
|
|
733
|
+
ResourceIdentityData identity = 4;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
message Response {
|
|
737
|
+
repeated ImportedResource imported_resources = 1;
|
|
738
|
+
repeated Diagnostic diagnostics = 2;
|
|
739
|
+
// deferred is set if the provider is deferring the change. If set the caller
|
|
740
|
+
// needs to handle the deferral.
|
|
741
|
+
Deferred deferred = 3;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
message GenerateResourceConfig {
|
|
746
|
+
message Request {
|
|
747
|
+
string type_name = 1;
|
|
748
|
+
DynamicValue state = 2;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
message Response {
|
|
752
|
+
// config is the provided state modified such that it represents a valid resource configuration value.
|
|
753
|
+
DynamicValue config = 1;
|
|
754
|
+
repeated Diagnostic diagnostics = 2;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
message MoveResourceState {
|
|
759
|
+
message Request {
|
|
760
|
+
// The address of the provider the resource is being moved from.
|
|
761
|
+
string source_provider_address = 1;
|
|
762
|
+
|
|
763
|
+
// The resource type that the resource is being moved from.
|
|
764
|
+
string source_type_name = 2;
|
|
765
|
+
|
|
766
|
+
// The schema version of the resource type that the resource is being
|
|
767
|
+
// moved from.
|
|
768
|
+
int64 source_schema_version = 3;
|
|
769
|
+
|
|
770
|
+
// The raw state of the resource being moved. Only the json field is
|
|
771
|
+
// populated, as there should be no legacy providers using the flatmap
|
|
772
|
+
// format that support newly introduced RPCs.
|
|
773
|
+
RawState source_state = 4;
|
|
774
|
+
|
|
775
|
+
// The resource type that the resource is being moved to.
|
|
776
|
+
string target_type_name = 5;
|
|
777
|
+
|
|
778
|
+
// The private state of the resource being moved.
|
|
779
|
+
bytes source_private = 6;
|
|
780
|
+
|
|
781
|
+
// The raw identity of the resource being moved. Only the json field is
|
|
782
|
+
// populated, as there should be no legacy providers using the flatmap
|
|
783
|
+
// format that support newly introduced RPCs.
|
|
784
|
+
RawState source_identity = 7;
|
|
785
|
+
|
|
786
|
+
// The identity schema version of the resource type that the resource
|
|
787
|
+
// is being moved from.
|
|
788
|
+
int64 source_identity_schema_version = 8;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
message Response {
|
|
792
|
+
// The state of the resource after it has been moved.
|
|
793
|
+
DynamicValue target_state = 1;
|
|
794
|
+
|
|
795
|
+
// Any diagnostics that occurred during the move.
|
|
796
|
+
repeated Diagnostic diagnostics = 2;
|
|
797
|
+
|
|
798
|
+
// The private state of the resource after it has been moved.
|
|
799
|
+
bytes target_private = 3;
|
|
800
|
+
|
|
801
|
+
ResourceIdentityData target_identity = 4;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
message ReadDataSource {
|
|
806
|
+
message Request {
|
|
807
|
+
string type_name = 1;
|
|
808
|
+
DynamicValue config = 2;
|
|
809
|
+
DynamicValue provider_meta = 3;
|
|
810
|
+
ClientCapabilities client_capabilities = 4;
|
|
811
|
+
}
|
|
812
|
+
message Response {
|
|
813
|
+
DynamicValue state = 1;
|
|
814
|
+
repeated Diagnostic diagnostics = 2;
|
|
815
|
+
// deferred is set if the provider is deferring the change. If set the caller
|
|
816
|
+
// needs to handle the deferral.
|
|
817
|
+
Deferred deferred = 3;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
message OpenEphemeralResource {
|
|
822
|
+
message Request {
|
|
823
|
+
string type_name = 1;
|
|
824
|
+
DynamicValue config = 2;
|
|
825
|
+
ClientCapabilities client_capabilities = 3;
|
|
826
|
+
}
|
|
827
|
+
message Response {
|
|
828
|
+
repeated Diagnostic diagnostics = 1;
|
|
829
|
+
optional google.protobuf.Timestamp renew_at = 2;
|
|
830
|
+
DynamicValue result = 3;
|
|
831
|
+
optional bytes private = 4;
|
|
832
|
+
Deferred deferred = 5;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
message RenewEphemeralResource {
|
|
837
|
+
message Request {
|
|
838
|
+
string type_name = 1;
|
|
839
|
+
optional bytes private = 2;
|
|
840
|
+
}
|
|
841
|
+
message Response {
|
|
842
|
+
repeated Diagnostic diagnostics = 1;
|
|
843
|
+
optional google.protobuf.Timestamp renew_at = 2;
|
|
844
|
+
optional bytes private = 3;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
message CloseEphemeralResource {
|
|
849
|
+
message Request {
|
|
850
|
+
string type_name = 1;
|
|
851
|
+
optional bytes private = 2;
|
|
852
|
+
}
|
|
853
|
+
message Response {
|
|
854
|
+
repeated Diagnostic diagnostics = 1;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
message GetFunctions {
|
|
859
|
+
message Request {}
|
|
860
|
+
|
|
861
|
+
message Response {
|
|
862
|
+
// functions is a mapping of function names to definitions.
|
|
863
|
+
map<string, Function> functions = 1;
|
|
864
|
+
|
|
865
|
+
// diagnostics is any warnings or errors.
|
|
866
|
+
repeated Diagnostic diagnostics = 2;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
message CallFunction {
|
|
871
|
+
message Request {
|
|
872
|
+
string name = 1;
|
|
873
|
+
repeated DynamicValue arguments = 2;
|
|
874
|
+
}
|
|
875
|
+
message Response {
|
|
876
|
+
DynamicValue result = 1;
|
|
877
|
+
FunctionError error = 2;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
message ListResource {
|
|
882
|
+
message Request {
|
|
883
|
+
// type_name is the list resource type name.
|
|
884
|
+
string type_name = 1;
|
|
885
|
+
|
|
886
|
+
// configuration is the list ConfigSchema-based configuration data.
|
|
887
|
+
DynamicValue config = 2;
|
|
888
|
+
|
|
889
|
+
// when include_resource_object is set to true, the provider should
|
|
890
|
+
// include the full resource object for each result
|
|
891
|
+
bool include_resource_object = 3;
|
|
892
|
+
|
|
893
|
+
// The maximum number of results that Terraform is expecting.
|
|
894
|
+
// The stream will stop, once this limit is reached.
|
|
895
|
+
int64 limit = 4;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
message Event {
|
|
899
|
+
// identity is the resource identity data of the resource instance.
|
|
900
|
+
ResourceIdentityData identity = 1;
|
|
901
|
+
|
|
902
|
+
// display_name can be displayed in a UI to make it easier for humans to identify a resource
|
|
903
|
+
string display_name = 2;
|
|
904
|
+
|
|
905
|
+
// optional resource object which can be useful when combining list blocks in configuration
|
|
906
|
+
optional DynamicValue resource_object = 3;
|
|
907
|
+
|
|
908
|
+
// A warning or error diagnostics for this event
|
|
909
|
+
repeated Diagnostic diagnostic = 4;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
message ValidateListResourceConfig {
|
|
914
|
+
message Request {
|
|
915
|
+
string type_name = 1;
|
|
916
|
+
DynamicValue config = 2;
|
|
917
|
+
DynamicValue include_resource_object = 3;
|
|
918
|
+
DynamicValue limit = 4;
|
|
919
|
+
}
|
|
920
|
+
message Response {
|
|
921
|
+
repeated Diagnostic diagnostics = 1;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
message ValidateStateStore {
|
|
926
|
+
message Request {
|
|
927
|
+
string type_name = 1;
|
|
928
|
+
DynamicValue config = 2;
|
|
929
|
+
}
|
|
930
|
+
message Response {
|
|
931
|
+
repeated Diagnostic diagnostics = 1;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
message ConfigureStateStore {
|
|
936
|
+
message Request {
|
|
937
|
+
string type_name = 1;
|
|
938
|
+
DynamicValue config = 2;
|
|
939
|
+
StateStoreClientCapabilities capabilities = 3;
|
|
940
|
+
}
|
|
941
|
+
message Response {
|
|
942
|
+
repeated Diagnostic diagnostics = 1;
|
|
943
|
+
StateStoreServerCapabilities capabilities = 2;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
message StateStoreClientCapabilities {
|
|
948
|
+
int64 chunk_size = 1; // suggested chunk size by Core
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
message StateStoreServerCapabilities {
|
|
952
|
+
int64 chunk_size = 1; // chosen chunk size by plugin
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
message ReadStateBytes {
|
|
956
|
+
message Request {
|
|
957
|
+
string type_name = 1;
|
|
958
|
+
string state_id = 2;
|
|
959
|
+
}
|
|
960
|
+
message Response {
|
|
961
|
+
bytes bytes = 1;
|
|
962
|
+
// total_length is the overall size of all of the state byte chunks that will be received
|
|
963
|
+
int64 total_length = 2;
|
|
964
|
+
StateRange range = 3;
|
|
965
|
+
repeated Diagnostic diagnostics = 4;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
message WriteStateBytes {
|
|
970
|
+
message RequestChunk {
|
|
971
|
+
// meta is sent with the first chunk only
|
|
972
|
+
optional RequestChunkMeta meta = 1;
|
|
973
|
+
|
|
974
|
+
bytes bytes = 2;
|
|
975
|
+
// total_length is the overall size of all of the state byte chunks that will be sent.
|
|
976
|
+
int64 total_length = 3;
|
|
977
|
+
StateRange range = 4;
|
|
978
|
+
}
|
|
979
|
+
message Response {
|
|
980
|
+
repeated Diagnostic diagnostics = 1;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
message RequestChunkMeta {
|
|
985
|
+
string type_name = 1;
|
|
986
|
+
string state_id = 2;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
message StateRange {
|
|
990
|
+
// start is the starting byte index for a chunk of state byte data.
|
|
991
|
+
// This index is in relation to the entire byte array that will be sent or received.
|
|
992
|
+
int64 start = 1;
|
|
993
|
+
// end is the ending byte index for a chunk of state byte data.
|
|
994
|
+
// This index is in relation to the entire byte array that will be sent or received.
|
|
995
|
+
int64 end = 2;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
message LockState {
|
|
999
|
+
message Request {
|
|
1000
|
+
string type_name = 1;
|
|
1001
|
+
string state_id = 2;
|
|
1002
|
+
// operation represents an ongoing operation due to which lock is held (e.g. refresh, plan, apply)
|
|
1003
|
+
string operation = 3;
|
|
1004
|
+
}
|
|
1005
|
+
message Response {
|
|
1006
|
+
string lock_id = 1;
|
|
1007
|
+
repeated Diagnostic diagnostics = 2;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
message UnlockState {
|
|
1012
|
+
message Request {
|
|
1013
|
+
string type_name = 1;
|
|
1014
|
+
string state_id = 2;
|
|
1015
|
+
string lock_id = 3;
|
|
1016
|
+
}
|
|
1017
|
+
message Response {
|
|
1018
|
+
repeated Diagnostic diagnostics = 1;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
message GetStates {
|
|
1023
|
+
message Request {
|
|
1024
|
+
string type_name = 1;
|
|
1025
|
+
}
|
|
1026
|
+
message Response {
|
|
1027
|
+
repeated string state_id = 1;
|
|
1028
|
+
repeated Diagnostic diagnostics = 2;
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
message DeleteState {
|
|
1033
|
+
message Request {
|
|
1034
|
+
string type_name = 1;
|
|
1035
|
+
string state_id = 2;
|
|
1036
|
+
}
|
|
1037
|
+
message Response {
|
|
1038
|
+
repeated Diagnostic diagnostics = 1;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
message PlanAction {
|
|
1043
|
+
message Request {
|
|
1044
|
+
string action_type = 1;
|
|
1045
|
+
// config of the action, based on the schema of the actual action
|
|
1046
|
+
DynamicValue config = 2;
|
|
1047
|
+
// metadata
|
|
1048
|
+
ClientCapabilities client_capabilities = 3;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
message Response {
|
|
1052
|
+
repeated Diagnostic diagnostics = 1;
|
|
1053
|
+
// metadata
|
|
1054
|
+
Deferred deferred = 2;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
message InvokeAction {
|
|
1059
|
+
message Request {
|
|
1060
|
+
string action_type = 1;
|
|
1061
|
+
// response from the plan
|
|
1062
|
+
DynamicValue config = 2;
|
|
1063
|
+
// metadata
|
|
1064
|
+
ClientCapabilities client_capabilities = 3;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
message Event {
|
|
1068
|
+
message Progress {
|
|
1069
|
+
// message to be printed in the console / HCPT
|
|
1070
|
+
string message = 1;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
message Completed {
|
|
1074
|
+
repeated Diagnostic diagnostics = 1;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
oneof type {
|
|
1078
|
+
Progress progress = 1;
|
|
1079
|
+
Completed completed = 2;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
message ValidateActionConfig {
|
|
1085
|
+
message Request {
|
|
1086
|
+
string type_name = 1;
|
|
1087
|
+
DynamicValue config = 2;
|
|
1088
|
+
}
|
|
1089
|
+
message Response {
|
|
1090
|
+
repeated Diagnostic diagnostics = 1;
|
|
1091
|
+
}
|
|
1092
|
+
}
|