@@ -35,9 +35,12 @@ service ResourceMonitor {
35
35
rpc RegisterResource (RegisterResourceRequest ) returns (RegisterResourceResponse ) {}
36
36
rpc RegisterResourceOutputs (RegisterResourceOutputsRequest ) returns (google .protobuf .Empty ) {}
37
37
38
+ // Register a resource transform for the stack
38
39
rpc RegisterStackTransform (Callback ) returns (google .protobuf .Empty ) {}
40
+ // Register an invoke transform for the stack
41
+ rpc RegisterStackInvokeTransform (Callback ) returns (google .protobuf .Empty ) {}
39
42
40
- rpc RegisterProvider ( RegisterProviderRequest ) returns (RegisterProviderResponse ) {}
43
+ rpc RegisterPackage ( RegisterPackageRequest ) returns (RegisterPackageResponse ) {}
41
44
}
42
45
43
46
// SupportsFeatureRequest allows a client to test if the resource monitor supports a certain feature, which it may use
@@ -79,6 +82,8 @@ message ReadResourceRequest {
79
82
map <string , bytes > pluginChecksums = 15 ; // a map of checksums of the provider to use when servicing this request.
80
83
81
84
SourcePosition sourcePosition = 14 ; // the optional source position of the user code that initiated the read.
85
+
86
+ string packageRef = 16 ; // a reference from RegisterProviderRequest.
82
87
}
83
88
84
89
// ReadResourceResponse contains the result of reading a resource's state.
@@ -142,6 +147,8 @@ message RegisterResourceRequest {
142
147
143
148
repeated Callback transforms = 31 ; // a list of transforms to apply to the resource before registering it.
144
149
bool supportsResultReporting = 32 ; // true if the request is from an SDK that supports the result field in the response.
150
+
151
+ string packageRef = 33 ; // a reference from RegisterProviderRequest.
145
152
}
146
153
147
154
enum Result {
@@ -183,6 +190,8 @@ message ResourceInvokeRequest {
183
190
map <string , bytes > pluginChecksums = 8 ; // a map of checksums expected for the provider plugin.
184
191
185
192
SourcePosition sourcePosition = 7 ; // the optional source position of the user code that initiated the invoke.
193
+
194
+ string packageRef = 9 ; // a reference from RegisterProviderRequest.
186
195
}
187
196
188
197
message ResourceCallRequest {
@@ -206,6 +215,7 @@ message ResourceCallRequest {
206
215
reserved "project", "stack", "config", "configSecretKeys", "dryRun", "parallel", "monitorEndpoint", "organization" ;
207
216
208
217
SourcePosition sourcePosition = 15 ; // the optional source position of the user code that initiated the call.
218
+ string packageRef = 17 ; // a reference from RegisterProviderRequest.
209
219
}
210
220
211
221
// TransformResourceOptions is a subset of all resource options that are relevant to transforms.
@@ -241,21 +251,42 @@ message TransformResponse {
241
251
TransformResourceOptions options = 2 ; // the options for the resource.
242
252
}
243
253
244
- message RegisterProviderRequest {
245
- string name = 1 ;
246
- string version = 2 ;
247
- string plugin_download_url = 3 ;
254
+ // TransformInvokeRequest is the request object for the TransformInvoke RPC.
255
+ message TransformInvokeRequest {
256
+ string token = 1 ; // the token for the invoke request.
257
+ google.protobuf.Struct args = 2 ; // the input args of the resource.
258
+ TransformInvokeOptions options = 3 ; // the options for the resource.
259
+ }
260
+
261
+ // TransformInvokeResponse is the response object for the TransformInvoke RPC.
262
+ message TransformInvokeResponse {
263
+ google.protobuf.Struct args = 1 ; // the transformed input args.
264
+ TransformInvokeOptions options = 2 ; // the options for the resource.
265
+ }
266
+
267
+ // TransformInvokeOptions is a subset of all invoke options that are relevant to transforms.
268
+ message TransformInvokeOptions {
269
+ string provider = 1 ;
270
+ string plugin_download_url = 2 ;
271
+ string version = 3 ;
248
272
map <string , bytes > plugin_checksums = 4 ;
249
- ProviderParameter parameter = 5 ;
250
273
}
251
274
252
- message RegisterProviderResponse {
253
- // The UUID package reference for this registered provider package.
254
- string ref = 1 ;
275
+ message RegisterPackageRequest {
276
+ string name = 1 ; // the plugin name.
277
+ string version = 2 ; // the plugin version.
278
+ string download_url = 3 ; // the optional plugin download url.
279
+ map <string , bytes > checksums = 4 ; // the optional plugin checksums.
280
+ Parameterization parameterization = 5 ; // the optional parameterization for this package.
255
281
}
256
282
257
- message ProviderParameter {
258
- string name = 1 ;
259
- string version = 2 ;
260
- google.protobuf.Value value = 3 ;
261
- }
283
+ message RegisterPackageResponse {
284
+ // The UUID package reference for this registered package.
285
+ string ref = 1 ;
286
+ }
287
+
288
+ message Parameterization {
289
+ string name = 1 ; // the parameterized package name.
290
+ string version = 2 ; // the parameterized package version.
291
+ bytes value = 3 ; // the parameter value for the parameterized package.
292
+ }
0 commit comments