pulumi-language-ruby 0.0.1

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.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +39 -0
  4. data/Rakefile +8 -0
  5. data/exe/pulumi-language-ruby +39 -0
  6. data/lib/ruby_pulumi/generated/pulumi/alias_pb.rb +16 -0
  7. data/lib/ruby_pulumi/generated/pulumi/analyzer_pb.rb +43 -0
  8. data/lib/ruby_pulumi/generated/pulumi/analyzer_services_pb.rb +69 -0
  9. data/lib/ruby_pulumi/generated/pulumi/callback_pb.rb +17 -0
  10. data/lib/ruby_pulumi/generated/pulumi/callback_services_pb.rb +39 -0
  11. data/lib/ruby_pulumi/generated/pulumi/codegen/hcl_pb.rb +20 -0
  12. data/lib/ruby_pulumi/generated/pulumi/codegen/loader_pb.rb +17 -0
  13. data/lib/ruby_pulumi/generated/pulumi/codegen/loader_services_pb.rb +40 -0
  14. data/lib/ruby_pulumi/generated/pulumi/codegen/mapper_pb.rb +17 -0
  15. data/lib/ruby_pulumi/generated/pulumi/codegen/mapper_services_pb.rb +50 -0
  16. data/lib/ruby_pulumi/generated/pulumi/converter_pb.rb +21 -0
  17. data/lib/ruby_pulumi/generated/pulumi/converter_services_pb.rb +42 -0
  18. data/lib/ruby_pulumi/generated/pulumi/engine_pb.rb +26 -0
  19. data/lib/ruby_pulumi/generated/pulumi/engine_services_pb.rb +51 -0
  20. data/lib/ruby_pulumi/generated/pulumi/errors_pb.rb +17 -0
  21. data/lib/ruby_pulumi/generated/pulumi/events_pb.rb +17 -0
  22. data/lib/ruby_pulumi/generated/pulumi/events_services_pb.rb +45 -0
  23. data/lib/ruby_pulumi/generated/pulumi/language_pb.rb +55 -0
  24. data/lib/ruby_pulumi/generated/pulumi/language_services_pb.rb +121 -0
  25. data/lib/ruby_pulumi/generated/pulumi/plugin_pb.rb +19 -0
  26. data/lib/ruby_pulumi/generated/pulumi/provider_pb.rb +66 -0
  27. data/lib/ruby_pulumi/generated/pulumi/provider_services_pb.rb +232 -0
  28. data/lib/ruby_pulumi/generated/pulumi/resource_pb.rb +51 -0
  29. data/lib/ruby_pulumi/generated/pulumi/resource_services_pb.rb +64 -0
  30. data/lib/ruby_pulumi/generated/pulumi/resource_status_pb.rb +23 -0
  31. data/lib/ruby_pulumi/generated/pulumi/resource_status_services_pb.rb +44 -0
  32. data/lib/ruby_pulumi/generated/pulumi/source_pb.rb +17 -0
  33. data/lib/ruby_pulumi/generated/pulumi/testing/language_pb.rb +24 -0
  34. data/lib/ruby_pulumi/generated/pulumi/testing/language_services_pb.rb +47 -0
  35. data/lib/ruby_pulumi/language_host.rb +46 -0
  36. data/lib/ruby_pulumi/pulumi.rb +2 -0
  37. data/lib/ruby_pulumi/resource.rb +24 -0
  38. data/lib/ruby_pulumi/runtime.rb +7 -0
  39. data/pulumi/alias.proto +38 -0
  40. data/pulumi/analyzer.proto +293 -0
  41. data/pulumi/callback.proto +44 -0
  42. data/pulumi/codegen/hcl.proto +89 -0
  43. data/pulumi/codegen/loader.proto +51 -0
  44. data/pulumi/codegen/mapper.proto +74 -0
  45. data/pulumi/converter.proto +94 -0
  46. data/pulumi/engine.proto +113 -0
  47. data/pulumi/errors.proto +38 -0
  48. data/pulumi/events.proto +39 -0
  49. data/pulumi/language.proto +653 -0
  50. data/pulumi/plugin.proto +66 -0
  51. data/pulumi/provider.proto +1227 -0
  52. data/pulumi/resource.proto +394 -0
  53. data/pulumi/resource_status.proto +172 -0
  54. data/pulumi/source.proto +36 -0
  55. data/pulumi/testing/language.proto +106 -0
  56. data/sig/pulumi/language/ruby.rbs +8 -0
  57. metadata +125 -0
@@ -0,0 +1,653 @@
1
+ // Copyright 2016-2023, Pulumi Corporation.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ import "pulumi/codegen/hcl.proto";
18
+ import "pulumi/plugin.proto";
19
+ import "google/protobuf/empty.proto";
20
+ import "google/protobuf/struct.proto";
21
+
22
+ package pulumirpc;
23
+
24
+ option go_package = "github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpc";
25
+
26
+ // The LanguageRuntime service defines a standard interface for [language hosts/runtimes](languages). At a high level, a
27
+ // language runtime provides the ability to execute programs, install and query dependencies, and generate code for a
28
+ // specific language.
29
+ service LanguageRuntime {
30
+ // `Handshake` is the first call made by the engine to a language host. It is used to pass the engine's address to
31
+ // the language host so that it may establish its own connections back, and to establish protocol configuration that
32
+ // will be used to communicate between the two parties.
33
+ rpc Handshake(LanguageHandshakeRequest) returns (LanguageHandshakeResponse) {}
34
+
35
+ // `GetRequiredPlugins` computes the complete set of anticipated [plugins](plugins) required by a Pulumi program.
36
+ // Among other things, it is intended to be used to pre-install plugins before running a program with
37
+ // [](pulumirpc.LanguageRuntime.Run), to avoid the need to install them on-demand in response to [resource
38
+ // registrations](resource-registration) sent back from the running program to the engine.
39
+ //
40
+ // :::{important}
41
+ // The use of `GetRequiredPlugins` is deprecated in favour of [](pulumirpc.LanguageRuntime.GetRequiredPackages),
42
+ // which returns more granular information about which plugins are required by which packages.
43
+ // :::
44
+ rpc GetRequiredPlugins(GetRequiredPluginsRequest) returns (GetRequiredPluginsResponse) {
45
+ option deprecated = true;
46
+ }
47
+
48
+ // `GetRequiredPackages` computes the complete set of anticipated [packages](pulumirpc.PackageDependency) required
49
+ // by a program. It is used to pre-install packages before running a program with [](pulumirpc.LanguageRuntime.Run),
50
+ // to avoid the need to install them on-demand in response to [resource registrations](resource-registration) sent
51
+ // back from the running program to the engine. Moreover, when importing resources into a stack, it is used to
52
+ // determine which plugins are required to service the import of a given resource, since given the presence of
53
+ // [parameterized providers](parameterized-providers), it is not in general true that a package name corresponds 1:1
54
+ // with a plugin name. It replaces [](pulumirpc.LanguageRuntime.GetRequiredPlugins) in the face of [parameterized
55
+ // providers](parameterized-providers), which as mentioned above can enable multiple instances of the same plugin to
56
+ // provide multiple packages.
57
+ rpc GetRequiredPackages(GetRequiredPackagesRequest) returns (GetRequiredPackagesResponse) {}
58
+
59
+ // `Run` executes a Pulumi program, returning information about whether or not the program produced an error.
60
+ rpc Run(RunRequest) returns (RunResponse) {}
61
+
62
+ // `GetPluginInfo` returns information about the [plugin](plugins) implementing this language runtime.
63
+ rpc GetPluginInfo(google.protobuf.Empty) returns (PluginInfo) {}
64
+
65
+ // `InstallDependencies` accepts a request specifying a Pulumi project and program that can be executed with
66
+ // [](pulumirpc.LanguageRuntime.Run) and installs the dependencies for that program (e.g. by running `npm install`
67
+ // for NodeJS, or `pip install` for Python). Since dependency installation could take a while, and callers may wish
68
+ // to report on its progress, this method returns a stream of [](pulumirpc.InstallDependenciesResponse) messages
69
+ // containing information about standard error and output.
70
+ rpc InstallDependencies(InstallDependenciesRequest) returns (stream InstallDependenciesResponse) {}
71
+
72
+ // `RuntimeOptionsPrompts` accepts a request specifying a Pulumi project and returns a list of additional prompts to
73
+ // ask during `pulumi new`.
74
+ rpc RuntimeOptionsPrompts(RuntimeOptionsRequest) returns (RuntimeOptionsResponse) {}
75
+
76
+ // `Template` allows the language runtime to perform additional templating on a newly instantiated project template.
77
+ // For example the Python runtime might want to convert a requirements.txt into a pyproject.toml suitable for use
78
+ // with uv or poetry.
79
+ rpc Template(TemplateRequest) returns (TemplateResponse) {}
80
+
81
+ // `About` returns information about the language runtime being used.
82
+ rpc About(AboutRequest) returns (AboutResponse) {}
83
+
84
+ // `GetProgramDependencies` computes the set of language-level dependencies (e.g. NPM packages for NodeJS, or Maven
85
+ // libraries for Java) required by a program.
86
+ rpc GetProgramDependencies(GetProgramDependenciesRequest) returns (GetProgramDependenciesResponse) {}
87
+
88
+ // `RunPlugin` is used to execute a program written in this host's language that implements a Pulumi
89
+ // [plugin](plugins). It is to plugins what [](pulumirpc.LanguageRuntime.Run) is to programs. Since a plugin is not
90
+ // expected to terminate until instructed/for a long time, this method returns a stream of
91
+ // [](pulumirpc.RunPluginResponse) messages containing information about standard error and output, as well as the
92
+ // exit code of the plugin when it does terminate.
93
+ rpc RunPlugin(RunPluginRequest) returns (stream RunPluginResponse) {}
94
+
95
+ // `GenerateProgram` generates code in this host's language that implements the given [PCL](pcl) program. Unlike
96
+ // [](pulumirpc.LanguageRuntime.GenerateProject), this method *only* generates program code, and does not e.g.
97
+ // generate a `package.json` for a NodeJS project that details how to run that code.
98
+ // [](pulumirpc.LanguageRuntime.GenerateProject), this method underpins ["programgen"](programgen) and the main
99
+ // functionality powering `pulumi convert`.
100
+ rpc GenerateProgram(GenerateProgramRequest) returns (GenerateProgramResponse) {}
101
+
102
+ // `GenerateProject` generates code in this host's language that implements the given [PCL](pcl) program and wraps
103
+ // it in some language-specific notion of a "project", where a project is a buildable or runnable artifact. In this
104
+ // sense, `GenerateProject`'s output is a superset of that of [](pulumirpc.LanguageRuntime.GenerateProgram). For
105
+ // instance, when generating a NodeJS project, this method might generate a corresponding `package.json` file, as
106
+ // well as the relevant NodeJS program code. Along with [](pulumirpc.LanguageRuntime.GenerateProgram), this method
107
+ // underpins ["programgen"](programgen) and the main functionality powering `pulumi convert`.
108
+ rpc GenerateProject(GenerateProjectRequest) returns (GenerateProjectResponse) {}
109
+
110
+ // `GeneratePackage` generates code in this host's language that implements an [SDK](sdkgen) ("sdkgen") for the
111
+ // given Pulumi package, as specified by a [schema](schema).
112
+ rpc GeneratePackage(GeneratePackageRequest) returns (GeneratePackageResponse) {}
113
+
114
+ // `Pack` accepts a request specifying a generated SDK package and packs it into a language-specific artifact. For
115
+ // instance, in the case of Java, it might produce a JAR file from a list of `.java` sources; in the case of NodeJS,
116
+ // a `.tgz` file might be produced from a list of `.js` sources; and so on. Presently, `Pack` is primarily used in
117
+ // [language conformance tests](language-conformance-tests), though it is intended to be used more widely in future
118
+ // to standardise e.g. provider publishing workflows.
119
+ rpc Pack(PackRequest) returns (PackResponse) {}
120
+
121
+ // `Link` links local dependencies into a project (program or plugin). The dependencies can be binary artifacts such
122
+ // as wheel or tar.gz files, or source directories. `Link` will update the language specific project files, such as
123
+ // `package.json`, `pyproject.toml`, `go.mod`, etc, to include the dependency. `Link` returns instructions for the
124
+ // user on how to use the linked package in the project.
125
+ rpc Link(LinkRequest) returns (LinkResponse) {}
126
+
127
+ // `Cancel` signals the language runtime to gracefully shut down and abort any ongoing operations.
128
+ // Operations aborted in this way will return an error.
129
+ rpc Cancel(google.protobuf.Empty) returns (google.protobuf.Empty) {}
130
+ }
131
+
132
+ // A `ProgramInfo` struct specifies a Pulumi program, and is built typically based on the location of a `Pulumi.yaml`
133
+ // file and the `runtime`, `main` and other properties within that file.
134
+ message ProgramInfo {
135
+ // The root of the project containing the program, where the `Pulumi.yaml` file is located. This should be an
136
+ // absolute path on the filesystem that is accessible to the language host.
137
+ string root_directory = 1;
138
+
139
+ // The directory containing the program to execute (e.g. the location of the `index.ts` for a TypeScript NodeJS
140
+ // program). This should be an absolute path on the filesystem that is accessible to the language host. If
141
+ // `ProgramInfo` is being built from a `Pulumi.yaml`, this will typically be the directory portion of the `main`
142
+ // property in that file.
143
+ string program_directory = 2;
144
+
145
+ // The entry point of the program to execute. This should be a relative path from the `program_directory`, and is
146
+ // often just `.` to indicate the program directory itself, but it can also be a filename inside the directory.. If
147
+ // `ProgramInfo` is being built from a `Pulumi.yaml`, this will typically be the filename specified `main` property
148
+ // in that file if it is present, or the aforementioned `.` if not.
149
+ string entry_point = 3;
150
+
151
+ // A struct capturing any language-specific options. If `ProgramInfo` is being built from a `Pulumi.yaml`, this will
152
+ // contain the `runtime.options` property from that file.
153
+ google.protobuf.Struct options = 4;
154
+ }
155
+
156
+ // `AboutRequest` is the type of requests sent as part of an [](pulumirpc.LanguageRuntime.About) call.
157
+ message AboutRequest {
158
+ // The program to use.
159
+ ProgramInfo info = 1;
160
+ }
161
+
162
+ // `AboutResponse` is the type of responses sent by an [](pulumirpc.LanguageRuntime.About) call. It contains information
163
+ // about the language runtime being used.
164
+ message AboutResponse {
165
+ // The primary executable for the runtime of this language. This should be an absolute path. E.g. for NodeJS on a
166
+ // POSIX system, this might be something like `/usr/bin/node`.
167
+ string executable = 1;
168
+
169
+ // The version of the runtime underpinning the language host. E.g. for a NodeJS host, this might be the version of
170
+ // `node` being used.
171
+ string version = 2;
172
+
173
+ // Other host-specific metadata about the runtime underpinning the language host.
174
+ map<string, string> metadata = 3;
175
+ }
176
+
177
+ // `GetProgramDependenciesRequest` is the type of requests sent as part of a
178
+ // [](pulumirpc.LanguageRuntime.GetProgramDependencies) call.
179
+ message GetProgramDependenciesRequest {
180
+ // The project name.
181
+ //
182
+ // :::{important}
183
+ // This is deprecated in favour of passing a [program info](pulumirpc.ProgramInfo) struct as the `info` field. Newer
184
+ // versions of the engine will always set this field to the string `"deprecated"`.
185
+ // :::
186
+ string project = 1 [deprecated = true];
187
+
188
+ // The program's working directory.
189
+ //
190
+ // :::{important}
191
+ // This is deprecated in favour of passing a [program info](pulumirpc.ProgramInfo) struct as the `info` field, with
192
+ // the `program_directory` field set to this value.
193
+ // :::
194
+ string pwd = 2 [deprecated = true];
195
+
196
+ // The path to the program.
197
+ //
198
+ // :::{important}
199
+ // This is deprecated in favour of passing a [program info](pulumirpc.ProgramInfo) struct as the `info` field, with
200
+ // the `entry_point` field set to this value.
201
+ // :::
202
+ string program = 3 [deprecated = true];
203
+
204
+ // True if transitive dependencies should be included in the response.
205
+ bool transitiveDependencies = 4;
206
+
207
+ // The program to use.
208
+ ProgramInfo info = 5;
209
+ }
210
+
211
+ // `DependencyInfo` is a struct that captures information about a language-specific dependency required by a program
212
+ // (e.g. an NPM package for NodeJS, or a Maven library for Java). It is returned as part of a
213
+ // [](pulumirpc.LanguageRuntime.GetProgramDependenciesResponse).
214
+ message DependencyInfo {
215
+ // The name of the dependency.
216
+ string name = 1;
217
+
218
+ // The version of the dependency.
219
+ string version = 2;
220
+ }
221
+
222
+ // `GetProgramDependenciesResponse` is the type of responses sent by a
223
+ // [](pulumirpc.LanguageRuntime.GetProgramDependencies) call. It contains information about the dependencies of a
224
+ // program.
225
+ message GetProgramDependenciesResponse {
226
+ // The dependencies of the program specified by the request.
227
+ repeated DependencyInfo dependencies = 1;
228
+ }
229
+
230
+ // `GetRequiredPluginsRequest` is the type of requests sent as part of a
231
+ // [](pulumirpc.LanguageRuntime.GetRequiredPlugins) call.
232
+ message GetRequiredPluginsRequest {
233
+ // The project name.
234
+ //
235
+ // :::{important}
236
+ // This is deprecated in favour of passing a [program info](pulumirpc.ProgramInfo) struct as the `info` field. Newer
237
+ // versions of the engine will always set this field to the string `"deprecated"`.
238
+ // :::
239
+ string project = 1 [deprecated = true];
240
+
241
+ // The program's working directory.
242
+ //
243
+ // :::{important}
244
+ // This is deprecated in favour of passing a [program info](pulumirpc.ProgramInfo) struct as the `info` field, with
245
+ // the `program_directory` field set to this value.
246
+ // :::
247
+ string pwd = 2 [deprecated = true];
248
+
249
+ // The path to the program.
250
+ //
251
+ // :::{important}
252
+ // This is deprecated in favour of passing a [program info](pulumirpc.ProgramInfo) struct as the `info` field, with
253
+ // the `entry_point` field set to this value.
254
+ // :::
255
+ string program = 3 [deprecated = true];
256
+
257
+ // The program to use.
258
+ ProgramInfo info = 4;
259
+ }
260
+
261
+ // `GetRequiredPluginsResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.GetRequiredPlugins)
262
+ // call. It contains information about the plugins required by a program.
263
+ message GetRequiredPluginsResponse {
264
+ // The plugins required by the program specified by the request.
265
+ repeated PluginDependency plugins = 1;
266
+ }
267
+
268
+ // `GetRequiredPackagesRequest` is the type of requests sent as part of a
269
+ // [](pulumirpc.LanguageRuntime.GetRequiredPackages) call.
270
+ message GetRequiredPackagesRequest {
271
+ // The program to use.
272
+ ProgramInfo info = 1;
273
+ }
274
+
275
+ // `GetRequiredPackagesResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.GetRequiredPackages)
276
+ // call. It contains information about the packages required by a program.
277
+ message GetRequiredPackagesResponse {
278
+ // The packages required by the program specified by the request.
279
+ repeated PackageDependency packages = 1;
280
+ }
281
+
282
+ // `RunRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.Run) call.
283
+ message RunRequest {
284
+ // The project name.
285
+ string project = 1;
286
+
287
+ // The name of the stack being deployed into.
288
+ string stack = 2;
289
+
290
+ // The program's working directory.
291
+ string pwd = 3;
292
+
293
+ // The path to the program.
294
+ //
295
+ // :::{important}
296
+ // This is deprecated in favour of passing a [program info](pulumirpc.ProgramInfo) struct as the `info` field, with
297
+ // the `entry_point` field set to this value.
298
+ // :::
299
+ string program = 4 [deprecated = true];
300
+
301
+ // Any arguments to pass to the program.
302
+ repeated string args = 5;
303
+
304
+ // Configuration variables to apply before running the program.
305
+ map<string, string> config = 6;
306
+
307
+ // True if we are only doing a dry run (preview).
308
+ bool dryRun = 7;
309
+
310
+ // The degree of parallelism that should be used for resource operations. A value less than or equal to 1 indicates
311
+ // serial execution.
312
+ int32 parallel = 8;
313
+
314
+ // The address of the [](pulumirpc.ResourceMonitor) that the program should connect to send [resource
315
+ // registrations](resource-registration) and other calls to.
316
+ string monitor_address = 9;
317
+
318
+ // This is deprecated, query mode is no longer a supported feature.
319
+ bool queryMode = 10 [deprecated = true];
320
+
321
+ // A list of configuration keys whose values should be treated as secrets.
322
+ repeated string configSecretKeys = 11;
323
+
324
+ // The organization of the stack being deployed into.
325
+ string organization = 12;
326
+
327
+ // This is deprecated, runtimes should look at the string based config as that maintains the full textual data from
328
+ // the users config file.
329
+ google.protobuf.Struct configPropertyMap = 13 [deprecated = true];
330
+
331
+ // The program to use.
332
+ ProgramInfo info = 14;
333
+
334
+ // The target of a codegen.LoaderServer to use for loading schemas.
335
+ string loader_target = 15;
336
+
337
+ // True if and only if the host should start the program under a debugger.
338
+ bool attach_debugger = 16;
339
+ }
340
+
341
+ // `RunResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.Run) call.
342
+ message RunResponse {
343
+ // Information about any unhandled error that occurred during the run.
344
+ string error = 1;
345
+
346
+ // True if an error happened, but it was reported to the user. Work should halt immediately, reporting nothing
347
+ // further to the user (since this reporting has already happened). This corresponds to a `result.Bail()` value
348
+ // being raised in the Go application layer.
349
+ bool bail = 2;
350
+ }
351
+
352
+ // `InstallDependenciesRequest` is the type of requests sent as part of an
353
+ // [](pulumirpc.LanguageRuntime.InstallDependencies) call.
354
+ message InstallDependenciesRequest {
355
+ // The program's working directory.
356
+ //
357
+ // :::{important}
358
+ // This is deprecated in favour of passing a [program info](pulumirpc.ProgramInfo) struct as the `info` field, with
359
+ // the `program_directory` field set to this value.
360
+ // :::
361
+ string directory = 1 [deprecated = true];
362
+
363
+ // True if we are running in a terminal and may use [ANSI escape
364
+ // codes](https://en.wikipedia.org/wiki/ANSI_escape_code) in our output.
365
+ bool is_terminal = 2;
366
+
367
+ // The program to use.
368
+ ProgramInfo info = 3;
369
+
370
+ // True if the host should use language-specific version managers, such as `pyenv` or `nvm`, to set up the version
371
+ // of the language toolchain used.
372
+ bool use_language_version_tools = 4;
373
+
374
+ // True if this install is for a plugin, as opposed to a top level Pulumi program.
375
+ bool is_plugin = 5;
376
+ }
377
+
378
+ // `InstallDependenciesResponse` is the type of responses streamed by an
379
+ // [](pulumirpc.LanguageRuntime.InstallDependencies) call.
380
+ message InstallDependenciesResponse {
381
+ // A line of standard output.
382
+ bytes stdout = 1;
383
+
384
+ // A line of standard error.
385
+ bytes stderr = 2;
386
+ }
387
+
388
+ // `RuntimeOptionsRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.RuntimeOptionsPrompts)
389
+ // call.
390
+ message RuntimeOptionsRequest {
391
+ // The program to use.
392
+ ProgramInfo info = 1;
393
+ }
394
+
395
+ // `RuntimeOptionPrompt` is a struct that captures information about a runtime option that should be prompted for during
396
+ // `pulumi new`.
397
+ message RuntimeOptionPrompt {
398
+ // `RuntimeOptionType` is an enum that captures the type of a runtime option.
399
+ enum RuntimeOptionType {
400
+ // A string value.
401
+ STRING = 0;
402
+
403
+ // A 32-bit integer value.
404
+ INT32 = 1;
405
+ }
406
+
407
+ // `RuntimeOptionValue` is a struct that captures the value of a runtime option.
408
+ message RuntimeOptionValue {
409
+ // The type of the runtime option.
410
+ RuntimeOptionType promptType = 1;
411
+
412
+ // The string value of the runtime option, if and only if the type is `STRING`.
413
+ string stringValue = 2;
414
+
415
+ // The 32-bit integer value of the runtime option, if and only if the type is `INT32`.
416
+ int32 int32Value = 3;
417
+
418
+ // The display name of the runtime option, to be used in prompts.
419
+ string displayName = 4;
420
+ }
421
+
422
+ // A unique key that identifies the runtime option.
423
+ string key = 1;
424
+
425
+ // A human-readable description of the runtime option.
426
+ string description = 2;
427
+
428
+ // The type of the runtime option.
429
+ RuntimeOptionType promptType = 3;
430
+
431
+ // A set of choices for the runtime option that may be displayed as part of the prompting process.
432
+ repeated RuntimeOptionValue choices = 4;
433
+
434
+ // The default value of the runtime option.
435
+ RuntimeOptionValue default = 5;
436
+ }
437
+
438
+ // `RuntimeOptionsResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.RuntimeOptionsPrompts) call.
439
+ // It contains information about additional prompts to ask during `pulumi new`.
440
+ message RuntimeOptionsResponse {
441
+ // Prompts to ask the user.
442
+ repeated RuntimeOptionPrompt prompts = 1;
443
+ }
444
+
445
+ // `TemplateRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.Template) call.
446
+ message TemplateRequest {
447
+ // The [plugin program](pulumirpc.ProgramInfo) to use.
448
+ ProgramInfo info = 1;
449
+
450
+ // The name of the project we are templating.
451
+ string project_name = 2;
452
+ }
453
+
454
+ // `TemplateResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.Template) call.
455
+ message TemplateResponse {}
456
+
457
+ // `RunPluginRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.RunPlugin) call.
458
+ message RunPluginRequest{
459
+ // The plugin program's working directory.
460
+ string pwd = 1;
461
+
462
+ // The path to the plugin program.
463
+ //
464
+ // :::{important}
465
+ // This is deprecated in favour of passing a [program info](pulumirpc.ProgramInfo) struct as the `info` field, with
466
+ // the `entry_point` field set to this value.
467
+ // :::
468
+ string program = 2 [deprecated = true];
469
+
470
+ // Any arguments to pass to the plugin program.
471
+ repeated string args = 3;
472
+
473
+ // Any environment variables to set prior to executing the plugin program.
474
+ repeated string env = 4;
475
+
476
+ // The [plugin program](pulumirpc.ProgramInfo) to use.
477
+ ProgramInfo info = 5;
478
+
479
+ // The kind of plugin to run (resource/analyzer/etc).
480
+ string kind = 6;
481
+
482
+ // The name of the plugin (for display purposes)
483
+ string name = 7;
484
+
485
+ // True if a plugin should be started under a debugger.
486
+ bool attach_debugger = 8;
487
+ }
488
+
489
+ // `RunPluginResponse` is the type of responses streamed by a [](pulumirpc.LanguageRuntime.RunPlugin) call.
490
+ message RunPluginResponse {
491
+ oneof output {
492
+ // A line of standard output.
493
+ bytes stdout = 1;
494
+
495
+ // A line of standard error.
496
+ bytes stderr = 2;
497
+
498
+ // An exit code that the plugin program has terminated with. This should be the last message sent by the host.
499
+ int32 exitcode = 3;
500
+ }
501
+ }
502
+
503
+ // `GenerateProgramRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.GenerateProgram)
504
+ // call.
505
+ message GenerateProgramRequest {
506
+ // The source of the project, represented as a map of file names to [PCL](pcl) source code.
507
+ map<string, string> source = 1;
508
+
509
+ // The target of a codegen.LoaderServer to use for loading schemas.
510
+ string loader_target = 2;
511
+
512
+ // True if [PCL binding](pcl-binding) should be strict.
513
+ bool strict = 3;
514
+ }
515
+
516
+ // `GenerateProgramResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.GenerateProgram) call.
517
+ message GenerateProgramResponse {
518
+ // Any diagnostics raised by code generation.
519
+ repeated pulumirpc.codegen.Diagnostic diagnostics = 1;
520
+
521
+ // The generated program source code, represented as a map of file names to byte contents.
522
+ map<string, bytes> source = 2;
523
+ }
524
+
525
+ // `GenerateProjectRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.GenerateProject) call.
526
+ message GenerateProjectRequest {
527
+ // The directory containing [PCL](pcl) source code, from which the project should be generated.
528
+ string source_directory = 1;
529
+
530
+ // The directory in which generated project files should be written. This should be an absolute path on the
531
+ // filesystem that is accessible to the language host.
532
+ string target_directory = 2;
533
+
534
+ // A string containing JSON to be used as the Pulumi project file (that is, as the contents of `Pulumi.yaml`).
535
+ string project = 3;
536
+
537
+ // True if [PCL binding](pcl-binding) should be strict.
538
+ bool strict = 4;
539
+
540
+ // The target of a codegen.LoaderServer to use for loading schemas.
541
+ string loader_target = 5;
542
+
543
+ // Local dependencies that the generated project should reference explicitly, instead of e.g. using the language's
544
+ // package system. This is a map of package names to local paths of language-specific artifacts that should be used.
545
+ // For instance, in the case of a NodeJS project, this might be a map of NPM package names to local paths to be
546
+ // used, such as `{ "@pulumi/aws": "/some/path/to/aws.tgz" }` if a local tarball is to be used instead of the
547
+ // published `@pulumi/aws` package.
548
+ map<string, string> local_dependencies = 6;
549
+ }
550
+
551
+ // `GenerateProjectResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.GenerateProject) call.
552
+ message GenerateProjectResponse {
553
+ // Any diagnostics raised by code generation.
554
+ repeated pulumirpc.codegen.Diagnostic diagnostics = 1;
555
+ }
556
+
557
+ // `GeneratePackageRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.GeneratePackage) call.
558
+ message GeneratePackageRequest {
559
+ // The directory to generate the package in. This should be an absolute path on the filesystem that is accessible to
560
+ // the language host.
561
+ string directory = 1;
562
+
563
+ // A JSON-encoded string containing the schema from which the SDK package should be generated.
564
+ string schema = 2;
565
+
566
+ // Extra files that should be copied as-is to the generated output.
567
+ map<string, bytes> extra_files = 3;
568
+
569
+ // The target of a codegen.LoaderServer to use for loading schemas.
570
+ string loader_target = 4;
571
+
572
+ // Local dependencies that the generated package should reference explicitly, instead of e.g. using the language's
573
+ // package system. This is a map of package names to local paths of language-specific artifacts that should be used.
574
+ // For instance, in the case of a NodeJS package, this might be a map of NPM package names to local paths to be
575
+ // used, such as `{ "@pulumi/aws": "/some/path/to/aws.tgz" }` if a local tarball is to be used instead of the
576
+ // published `@pulumi/aws` package.
577
+ map<string, string> local_dependencies = 5;
578
+
579
+ // If true, generates an SDK appropriate for local usage. This may differ from a standard publishable SDK depending
580
+ // on the language (e.g. for a NodeJS package that is intended to be imported locally, the language host may choose
581
+ // not to generate a `package.json`).
582
+ bool local = 6;
583
+ }
584
+
585
+ // `GeneratePackageResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.GeneratePackage) call.
586
+ message GeneratePackageResponse {
587
+ // Any diagnostics raised by code generation.
588
+ repeated pulumirpc.codegen.Diagnostic diagnostics = 1;
589
+ }
590
+
591
+ // `PackRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.Pack) call.
592
+ message PackRequest {
593
+ // The directory containing the package to pack. This should be an absolute path on the filesystem that is accessible
594
+ // to the language host.
595
+ string package_directory = 1;
596
+
597
+ // The directory to write the packed artifact to. This should be an absolute path on the filesystem that is
598
+ // accessible to the language host.
599
+ string destination_directory = 2;
600
+ }
601
+
602
+ // `PackResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.Pack) call.
603
+ message PackResponse {
604
+ // The path to the packed artifact. This should be an absolute path on the filesystem that is accessible to the
605
+ // language host.
606
+ string artifact_path = 1;
607
+ }
608
+
609
+ // `LanguageHandshakeRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.Handshake) call.
610
+ message LanguageHandshakeRequest {
611
+ // The gRPC address of the engine calling the language host.
612
+ string engine_address = 1;
613
+
614
+ // The optional root directory, where the `PulumiPlugin.yaml` file or language binary is located. This can't be sent
615
+ // when the engine is attaching to a language via a port number.
616
+ optional string root_directory = 2;
617
+
618
+ // The optional absolute path to the directory of the language program to execute. Generally, but not required to
619
+ // be, underneath the root directory. This can't be sent when the engine is attaching to a language via a port
620
+ // number.
621
+ optional string program_directory = 3;
622
+ }
623
+
624
+ // `LanguageHandshakeResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.Handshake) call.
625
+ message LanguageHandshakeResponse {
626
+ }
627
+
628
+ // `LinkRequest` is the type of requests sent as part of a [](pulumirpc.LanguageRuntime.Link) call.
629
+ message LinkRequest {
630
+ // The program to use.
631
+ ProgramInfo info = 1;
632
+
633
+ // The target of a codegen.LoaderServer to use for loading schemas.
634
+ string loader_target = 2;
635
+
636
+ message LinkDependency {
637
+ PackageDependency package = 1;
638
+ string path = 2;
639
+ }
640
+
641
+ // Local dependencies that should be linked into the program or plugin's language specific project files.
642
+ // Each dependency has a path to a language specific artifact. This can be a binary artifact like a
643
+ // Python wheel or a tar.gz for Node.js, or a source directory.
644
+ repeated LinkDependency packages = 3;
645
+ }
646
+
647
+ // `LinkResponse` is the type of responses sent by a [](pulumirpc.LanguageRuntime.Link) call.
648
+ message LinkResponse {
649
+ // The instructions on how to use a linked package in a program or plugin. These instructions are meant
650
+ // to be displayed to the user. For example when linking a local Python dependency, this might return
651
+ // `import my_namespace_mypkg as mypkg`.
652
+ string import_instructions = 1;
653
+ }