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,1227 @@
1
+ // Copyright 2016-2026, 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/alias.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 ResourceProvider service defines a standard interface for [resource providers](providers). A resource provider
27
+ // manages a set of configuration, resources, functions and so on in a single package, and offers methods such as CRUD
28
+ // operations on resources and invocations of functions. Resource providers are primarily managed by the Pulumi engine
29
+ // as part of a deployment in order to interact with the cloud providers underpinning a Pulumi application.
30
+ service ResourceProvider {
31
+ // `Handshake` is the first call made by the engine to a provider. It is used to pass the engine's address to the
32
+ // provider so that it may establish its own connections back, and to establish protocol configuration that will be
33
+ // used to communicate between the two parties. Providers that support `Handshake` should return responses
34
+ // consistent with those returned in response to [](pulumirpc.ResourceProvider.Configure) calls where there is
35
+ // overlap due to the use of `Configure` prior to `Handshake`'s introduction.
36
+ rpc Handshake(ProviderHandshakeRequest) returns (ProviderHandshakeResponse) {}
37
+
38
+ // `Parameterize` is the primary means of supporting [parameterized providers](parameterized-providers), which allow
39
+ // a caller to change a provider's behavior ahead of its [configuration](pulumirpc.ResourceProvider.Configure) and
40
+ // subsequent use. Where a [](pulumirpc.ResourceProvider.Configure) call allows a caller to influence provider
41
+ // behaviour at a high level (e.g. by specifying the region in which an AWS provider should operate), a
42
+ // `Parameterize` call may change the set of resources and functions that a provider offers (that is, its schema).
43
+ // This is useful in any case where some "set" of providers can be captured by a single implementation that may
44
+ // power fundamentally different schemata -- dynamically bridging Terraform providers, or managing Kubernetes
45
+ // clusters with custom resource definitions, for instance, are good examples. The parameterized package that
46
+ // `Parameterize` yields is known as a *sub-package* of the original (unparameterized) package.
47
+ //
48
+ // `Parameterize` supports two types of parameterization:
49
+ //
50
+ // * *Replacement parameterization*, whereby a `Parameterize` call results in a schema that completely replaces the
51
+ // original provider schema. Bridging a Terraform provider dynamically might be an example of this -- following
52
+ // the call to `Parameterize`, the provider's schema will become that of the Terraform provider that was bridged.
53
+ // Providers that implement replacement parameterization expect a *single* call to `Parameterize`.
54
+ //
55
+ // * *Extension parameterization*, in which a `Parameterize` call results in a schema that is a superset of the
56
+ // original. This is useful in cases where a provider can be extended with additional resources or functions, such
57
+ // as a Kubernetes provider that can be extended with resources representing custom resource definitions.
58
+ // Providers that implement extension parameterization should accept multiple calls to `Parameterize`. Extension
59
+ // packages may even be called multiple times with the same package name, but with different versions. The CRUD
60
+ // operations of extension resources must include the version of which sub-package they correspond to.
61
+ //
62
+ // `Parameterize` should work the same whether it is provided with `ParametersArgs` or `ParametersValue` input. In
63
+ // each case it should return the sub-package name and version (which when a `ParametersValue` is supplied should
64
+ // match the given input).
65
+ rpc Parameterize(ParameterizeRequest) returns (ParameterizeResponse) {}
66
+
67
+ // GetSchema fetches the schema for this resource provider.
68
+ rpc GetSchema(GetSchemaRequest) returns (GetSchemaResponse) {}
69
+
70
+ // `CheckConfig` validates a set of configuration inputs that will be passed to this provider instance.
71
+ // `CheckConfig` is to provider resources what [](pulumirpc.ResourceProvider.Check) is to individual resources, and
72
+ // is the first stage in configuring (that is, eventually executing a [](pulumirpc.ResourceProvider.Configure) call)
73
+ // a provider using user-supplied values. In the case that provider inputs are coming from some source that has been
74
+ // checked previously (e.g. a Pulumi state), it is not necessary to call `CheckConfig`.
75
+ //
76
+ // A `CheckConfig` call returns either a set of checked, known-valid inputs that may subsequently be passed to
77
+ // [](pulumirpc.ResourceProvider.DiffConfig) and/or [](pulumirpc.ResourceProvider.Configure), or a set of errors
78
+ // explaining why the inputs are invalid. In the case that a set of inputs are successfully validated and returned,
79
+ // `CheckConfig` *may also populate default values* for provider configuration, returning them so that they may be
80
+ // passed to a subsequent [](pulumirpc.ResourceProvider.Configure) call and persisted in the Pulumi state. In the
81
+ // case that `CheckConfig` fails and returns a set of errors, it is expected that the caller (typically the Pulumi
82
+ // engine) will fail provider registration.
83
+ //
84
+ // As a rule, the provider inputs returned by a call to `CheckConfig` should preserve the original representation of
85
+ // the properties as present in the program inputs. Though this rule is not required for correctness, violations
86
+ // thereof can negatively impact the end-user experience, as the provider inputs are used for detecting and
87
+ // rendering diffs.
88
+ rpc CheckConfig(CheckRequest) returns (CheckResponse) {}
89
+
90
+ // `DiffConfig` compares an existing ("old") provider configuration with a new configuration and computes the
91
+ // difference (if any) between them. `DiffConfig` is to provider resources what [](pulumirpc.ResourceProvider.Diff)
92
+ // is to individual resources. `DiffConfig` should only be called with values that have at some point been validated
93
+ // by a [](pulumirpc.ResourceProvider.CheckConfig) call. The [](pulumirpc.DiffResponse) returned by a `DiffConfig`
94
+ // call is used primarily to determine whether or not the newly configured provider is capable of managing resources
95
+ // owned by the old provider. If `DiffConfig` indicates that the provider resource needs to be replaced, for
96
+ // instance, then all resources owned by that provider will *also* need to be replaced. Replacement semantics should
97
+ // thus be reserved for changes to configuration properties that are guaranteed to make old resources unmanageable.
98
+ // Changes to an AWS region, for example, will almost certainly require a provider replacement, but changes to an
99
+ // AWS access key, should almost certainly not.
100
+ //
101
+ // Implementations must satisfy the invariants documented on `DiffResponse`.
102
+ rpc DiffConfig(DiffRequest) returns (DiffResponse) {}
103
+
104
+ // `Configure` is the final stage in configuring a provider instance. Callers may supply two sets of data:
105
+ //
106
+ // * Provider-specific configuration, which is the set of inputs that have been validated by a previous
107
+ // [](pulumirpc.ResourceProvider.CheckConfig) call.
108
+ // * Provider-agnostic ("protocol") configuration, such as whether or not the caller supports secrets.
109
+ //
110
+ // The provider is expected to return its own set of protocol configuration, indicating which features it supports
111
+ // in turn so that the caller and the provider can interact appropriately.
112
+ //
113
+ // Providers may expect a *single* call to `Configure`. If a call to `Configure` is missing required configuration,
114
+ // the provider may return a set of error details containing [](pulumirpc.ConfigureErrorMissingKeys) values to
115
+ // indicate which keys are missing.
116
+ //
117
+ // :::{important}
118
+ // The use of `Configure` to configure protocol features is deprecated in favour of the
119
+ // [](pulumirpc.ResourceProvider.Handshake) method, which should be implemented by newer providers. To enable
120
+ // compatibility between older engines and providers:
121
+ //
122
+ // * Callers which call `Handshake` *must* call `Configure` with flags such as `acceptSecrets` and `acceptResources`
123
+ // set to `true`, since these features predate the introduction of `Handshake` and thus `Handshake`-aware callers
124
+ // must support them. See [](pulumirpc.ConfigureRequest) for more information.
125
+ // * Providers which implement `Handshake` *must* support flags such as `acceptSecrets` and `acceptResources`, and
126
+ // indicate as such by always returning `true` for these fields in [](pulumirpc.ConfigureResponse). See
127
+ // [](pulumirpc.ConfigureResponse) for more information.
128
+ // :::
129
+ rpc Configure(ConfigureRequest) returns (ConfigureResponse) {}
130
+
131
+ // Invoke dynamically executes a built-in function in the provider.
132
+ rpc Invoke(InvokeRequest) returns (InvokeResponse) {}
133
+
134
+ // Call dynamically executes a method in the provider associated with a component resource.
135
+ rpc Call(CallRequest) returns (CallResponse) {}
136
+
137
+ // `Check` validates a set of input properties against a given resource type. A `Check` call returns either a set of
138
+ // checked, known-valid inputs that may subsequently be passed to [](pulumirpc.ResourceProvider.Diff),
139
+ // [](pulumirpc.ResourceProvider.Create), or [](pulumirpc.ResourceProvider.Update); or a set of errors explaining
140
+ // why the inputs are invalid. In the case that a set of inputs are successfully validated and returned, `Check`
141
+ // *may also populate default values* for resource inputs, returning them so that they may be passed to a subsequent
142
+ // call and persisted in the Pulumi state. In the case that `Check` fails and returns a set of errors, it is
143
+ // expected that the caller (typically the Pulumi engine) will fail resource registration.
144
+ //
145
+ // As a rule, the provider inputs returned by a call to `Check` should preserve the original representation of the
146
+ // properties as present in the program inputs. Though this rule is not required for correctness, violations thereof
147
+ // can negatively impact the end-user experience, as the provider inputs are used for detecting and rendering
148
+ // diffs.
149
+ rpc Check(CheckRequest) returns (CheckResponse) {}
150
+
151
+ // `Diff` compares an existing ("old") set of resource properties with a new set of properties and computes the
152
+ // difference (if any) between them. `Diff` should only be called with values that have at some point been validated
153
+ // by a [](pulumirpc.ResourceProvider.Check) call.
154
+ //
155
+ // Implementations must satisfy the invariants documented on `DiffResponse`.
156
+ rpc Diff(DiffRequest) returns (DiffResponse) {}
157
+
158
+ // `Create` provisions a new instance of the specified [(custom) resource](custom-resources). It returns a
159
+ // provider-assigned ID for the resource as well as the output properties that arose from the creation properties.
160
+ // Output properties are typically the union of the resource's input properties and any additional values that were
161
+ // computed or made available during creation.
162
+ //
163
+ // If creation fails, `Create` may return an [](pulumirpc.ErrorResourceInitFailed) error detail explaining why.
164
+ // Moreover, if `Create` does return an error, it must be the case that the resource was *not* created (that is,
165
+ // `Create` can be thought of as transactional or atomic).
166
+ rpc Create(CreateRequest) returns (CreateResponse) {}
167
+
168
+ // `Read` reads the current live state associated with a resource identified by the supplied state. The given state
169
+ // must be sufficient to uniquely identify the resource. This is typically just the resource ID, but may also
170
+ // include other properties.
171
+ rpc Read(ReadRequest) returns (ReadResponse) {}
172
+
173
+ // `Update` updates an existing resource according to a new set of inputs, returning a new set of output properties.
174
+ rpc Update(UpdateRequest) returns (UpdateResponse) {}
175
+
176
+ // `Delete` deprovisions an existing resource as specified by its ID. `Delete` should be transactional/atomic -- if
177
+ // a call to `Delete` fails, it must be the case that the resource was *not* deleted and can be assumed to still
178
+ // exist.
179
+ rpc Delete(DeleteRequest) returns (google.protobuf.Empty) {}
180
+
181
+ // `Construct` provisions a new [component resource](component-resources). Providers that implement `Construct` are
182
+ // referred to as [component providers](component-providers). `Construct` is to component resources what
183
+ // [](pulumirpc.ResourceProvider.Create) is to [custom resources](custom-resources). Components do not have any
184
+ // lifecycle of their own, and instead embody the lifecycles of the resources that they are composed of. As such,
185
+ // `Construct` is effectively a subprogram whose resources will be persisted in the caller's state. It is
186
+ // consequently passed enough information to manage fully these resources. At a high level, this comprises:
187
+ //
188
+ // * A [](pulumirpc.ResourceMonitor) endpoint which the provider can use to [register](resource-registration) nested
189
+ // custom or component resources that belong to the component.
190
+ //
191
+ // * A set of input properties.
192
+ //
193
+ // * A full set of [resource options](https://www.pulumi.com/docs/iac/concepts/options/) that the component should
194
+ // propagate to resources it registers against the supplied resource monitor.
195
+ rpc Construct(ConstructRequest) returns (ConstructResponse) {}
196
+
197
+ // Cancel signals the provider to gracefully shut down and abort any ongoing resource operations.
198
+ // Operations aborted in this way will return an error (e.g., `Update` and `Create` will either return a
199
+ // creation error or an initialization error). Since Cancel is advisory and non-blocking, it is up
200
+ // to the host to decide how long to wait after Cancel is called before (e.g.)
201
+ // hard-closing any gRPC connection.
202
+ rpc Cancel(google.protobuf.Empty) returns (google.protobuf.Empty) {}
203
+
204
+ // GetPluginInfo returns generic information about this plugin, like its version.
205
+ rpc GetPluginInfo(google.protobuf.Empty) returns (PluginInfo) {}
206
+
207
+ // Attach sends the engine address to an already running plugin.
208
+ rpc Attach(PluginAttach) returns (google.protobuf.Empty) {}
209
+
210
+ // GetMapping fetches the mapping for this resource provider, if any. A provider should return an empty
211
+ // response (not an error) if it doesn't have a mapping for the given key.
212
+
213
+ // `GetMapping` returns mappings designed to aid in [converting programs and state from other
214
+ // ecosystems](converters). It accepts a "conversion key", which effectively corresponds to a source language, such
215
+ // as `terraform`, and a *source provider name*, which is the name of the provider *in the source language*. Given
216
+ // these, it returns source-specific mapping data for the provider requested. As an example, the Pulumi AWS
217
+ // provider, which is bridged from the Terraform AWS provider and thus capable of mapping names between the two,
218
+ // might respond to a call with key `terraform` and source provider name `aws` with mapping data for transforming
219
+ // (among other things) Terraform AWS names such as `aws_s3_bucket` into Pulumi AWS types such as
220
+ // `aws:s3/bucket:Bucket`. If a provider only supports a single source provider, or has some sensible default, it
221
+ // may respond also to a call in which the source provider name is empty (`""`), which will be made when the engine
222
+ // does not have sufficient knowledge to work out which provider offers a specific mapping.
223
+ //
224
+ // In general, it is expected that providers implemented by bridging an equivalent provider from another ecosystem
225
+ // (such as bridged Terraform providers built atop the `pulumi-terraform-bridge`, for instance) implement
226
+ // `GetMapping` to support conversion from that ecosystem into Pulumi using the same logic that underpins the
227
+ // bridging itself.
228
+ rpc GetMapping(GetMappingRequest) returns (GetMappingResponse) {}
229
+
230
+ // `GetMappings` is an optional method designed to aid in [converting programs and state from other
231
+ // ecosystems](converters). `GetMappings` accepts a "conversion key". This corresponds to a source language, for
232
+ // which we want to retrieve mappings for names etc. from that source language into Pulumi. An example key might
233
+ // therefore be `terraform` in the event that we wish to map e.g. Terraform resource names to Pulumi resource types.
234
+ // Given a key, `GetMappings` returns a list of *source provider names* for which calls to `GetMapping` will return
235
+ // mappings. So, continuing the Terraform example, the Pulumi AWS provider, which is bridged from the Terraform AWS
236
+ // provider and thus capable of mapping names between the two, might return the list `["aws"]` in response to a call
237
+ // with key `terraform`.
238
+ //
239
+ // If a provider does not implement `GetMappings`, the engine will fall back to calling `GetMapping` blindly without
240
+ // a source provider name (that is, with the value `""`).
241
+ rpc GetMappings(GetMappingsRequest) returns (GetMappingsResponse) {}
242
+ }
243
+
244
+ // `ProviderHandshakeRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.Handshake) call.
245
+ message ProviderHandshakeRequest {
246
+ // The gRPC address of the engine handshaking with the provider. At a minimum, this address will expose an instance
247
+ // of the [](pulumirpc.Engine) service.
248
+ string engine_address = 1;
249
+
250
+ // A *root directory* where the provider's binary, `PulumiPlugin.yaml`, or other identifying source code is located.
251
+ // In the event that the provider is *not* being booted by the engine (e.g. in the case that the engine has been
252
+ // asked to attach to an existing running provider instance via a host/port number), this field will be empty.
253
+ optional string root_directory = 2;
254
+
255
+ // A *program directory* in which the provider should execute. This is generally a subdirectory of the root
256
+ // directory, though this is not required. In the event that the provider is *not* being booted by the engine (e.g.
257
+ // in the case that the engine has been asked to attach to an existing running provider instance via a host/port
258
+ // number), this field will be empty.
259
+ optional string program_directory = 3;
260
+
261
+ // If true the engine will send URN, Name, Type, and ID to the provider as part of the configuration.
262
+ bool configure_with_urn = 4;
263
+
264
+ // If true the engine supports views and can send the address of a [](pulumirpc.ResourceStatus) service which can be
265
+ // used to e.g. create or update view resources.
266
+ bool supports_views = 5;
267
+
268
+ // If true the engine supports letting the provider mark resource states as requiring refresh before update.
269
+ bool supports_refresh_before_update = 6;
270
+
271
+ // If true the engine will send `preview` to `Invoke` methods to let them know if the current operation is a preview or up.
272
+ bool invoke_with_preview = 7;
273
+ }
274
+
275
+ // `ProviderHandshakeResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.Handshake) call.
276
+ message ProviderHandshakeResponse {
277
+ // True if and only if the provider supports secrets. If true, the caller should pass secrets as strongly typed
278
+ // values to the provider. *Must* match the value returned in response to [](pulumirpc.ResourceProvider.Configure).
279
+ bool accept_secrets = 1;
280
+
281
+ // True if and only if the provider supports strongly typed resources. If true, the caller should pass resources as
282
+ // strongly typed values to the provider. *Must* match the value returned in response to
283
+ // [](pulumirpc.ResourceProvider.Configure).
284
+ bool accept_resources = 2;
285
+
286
+ // True if and only if the provider supports output values as inputs. If true, the engine should pass output values
287
+ // to the provider where possible. *Must* match the value returned in response to
288
+ // [](pulumirpc.ResourceProvider.Configure).
289
+ bool accept_outputs = 3;
290
+
291
+ // True if the provider accepts and respects autonaming configuration that the engine provides on behalf of the
292
+ // user. *Must* match the value returned in response to [](pulumirpc.ResourceProvider.Configure).
293
+ bool supports_autonaming_configuration = 4;
294
+
295
+ // We used to have this field briefly, but are not using it anymore. Mark it as reserved to prevent any potential
296
+ // confusion.
297
+ reserved 5;
298
+ reserved "pulumi_version_range";
299
+ }
300
+
301
+ // `ParameterizeRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.Parameterize) call. A
302
+ // `ParameterizeRequest` may contain either:
303
+ //
304
+ // * a string array (`ParametersArgs`), intended to represent a set of command-line arguments so as to support
305
+ // instantiating a parameterized provider from a command-line invocation (e.g. to generate an SDK).
306
+ // * a byte array accompanied by a name and version (`ParametersValue`), intended to represent a parameter embedded in a
307
+ // previously generated SDK.
308
+ //
309
+ // Embedding parameter values in SDKs allows programs to consume parameterized providers without needing to know the
310
+ // details of the parameterization. Allowing the representation embedded into an SDK to differ from that supplied on the
311
+ // command-line permits providers to implement optimizations for the common, fast-path case (program execution), such as
312
+ // embedding a generated schema as opposed to generating it on-demand for each resource registration.
313
+ message ParameterizeRequest {
314
+ // A parameter value, represented as an array of strings, as might be provided by a command-line invocation, such as
315
+ // that used to generate an SDK.
316
+ message ParametersArgs {
317
+ repeated string args = 1;
318
+ }
319
+
320
+ // A parameter value, represented by an arbitrary array of bytes accompanied by a name and version. This is expected
321
+ // to be the format used by parameterized provider SDKs.
322
+ message ParametersValue {
323
+ // The sub-package name for this sub-schema parameterization.
324
+ string name = 1;
325
+ // The sub-package version for this sub-schema parameterization.
326
+ string version = 2;
327
+ // The embedded value from the sub-package.
328
+ bytes value = 3;
329
+ }
330
+
331
+ oneof parameters {
332
+ // Arguments from the command line.
333
+ ParametersArgs args = 1;
334
+ // Values from a generated SDK.
335
+ ParametersValue value = 2;
336
+ }
337
+ }
338
+
339
+ // `ParameterizeResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.Parameterize) call. It
340
+ // contains a name and version that can be used to identify the sub-package that now exists as a result of
341
+ // parameterization.
342
+ message ParameterizeResponse {
343
+ // The name of the sub-package parameterized.
344
+ string name = 1;
345
+ // The version of the sub-package parameterized.
346
+ string version = 2;
347
+ }
348
+
349
+ message GetSchemaRequest {
350
+ // the schema version.
351
+ int32 version = 1;
352
+ // the name of the sub-package to lookup
353
+ string subpackage_name = 2;
354
+ // the version of the sub-package to lookup
355
+ string subpackage_version = 3;
356
+ }
357
+
358
+ message GetSchemaResponse {
359
+ string schema = 1; // the JSON-encoded schema.
360
+ }
361
+
362
+ // `ConfigureRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.Configure) call. Requests
363
+ // include both provider-specific inputs (`variables` or `args`) and provider-agnostic ("protocol") configuration
364
+ // (`acceptSecrets`, `acceptResources`, and so on).
365
+ message ConfigureRequest {
366
+ // :::{warning}
367
+ // `variables` is deprecated; `args` should be used instead wherever possible.
368
+ // :::
369
+ //
370
+ // A map of input properties for the provider. Compound values, such as nested objects, should be JSON encoded so
371
+ // that they too can be passed as strings. For instance, the following configuration:
372
+ //
373
+ // ```
374
+ // {
375
+ // "a": 42,
376
+ // "b": {
377
+ // "c": "hello",
378
+ // "d": true
379
+ // }
380
+ // }
381
+ // ```
382
+ //
383
+ // should be encoded as:
384
+ //
385
+ // ```
386
+ // {
387
+ // "a": "42",
388
+ // "b": "{\"c\":\"hello\",\"d\":true}"
389
+ // }
390
+ // ```
391
+ map<string, string> variables = 1;
392
+
393
+ // A map of input properties for the provider.
394
+ //
395
+ // :::{warning}
396
+ // `args` may include secrets. Because `ConfigureRequest` is sent before [](pulumirpc.ConfigureResponse) can specify
397
+ // whether or not the provider accepts secrets in general, providers *must* handle secrets if they appear in `args`.
398
+ // :::
399
+ google.protobuf.Struct args = 2;
400
+
401
+ // True if and only if the caller supports secrets. If true, operations should return strongly typed secrets if the
402
+ // provider supports them also. *Must* be true if the caller has previously called
403
+ // [](pulumirpc.ResourceProvider.Handshake).
404
+ bool acceptSecrets = 3;
405
+
406
+ // True if and only if the caller supports strongly typed resources. If true, operations should return resources as
407
+ // strongly typed values if the provider supports them also. *Must* be true if the caller has previously called
408
+ // [](pulumirpc.ResourceProvider.Handshake).
409
+ bool acceptResources = 4;
410
+
411
+ // True if and only if the caller supports sending old inputs as part of [](pulumirpc.ResourceProvider.Diff) and
412
+ // [](pulumirpc.ResourceProvider.Update) calls. If true, the provider should expect these fields to be populated in
413
+ // these calls. *Must* be true if the caller has previously called [](pulumirpc.ResourceProvider.Handshake).
414
+ bool sends_old_inputs = 5;
415
+
416
+ // True if and only if the caller supports sending old inputs and outputs as part of
417
+ // [](pulumirpc.ResourceProvider.Delete) calls. If true, the provider should expect these fields to be populated in
418
+ // these calls. *Must* be true if the caller has previously called [](pulumirpc.ResourceProvider.Handshake).
419
+ bool sends_old_inputs_to_delete = 6;
420
+
421
+ // The ID of the provider being configured. N.B. This will be null if configure_with_urn was false in
422
+ // Handshake.
423
+ optional string id = 7;
424
+
425
+ // The URN of the provider being configured. N.B. This will be null if configure_with_urn was false in
426
+ // Handshake.
427
+ optional string urn = 8;
428
+
429
+ // The name of the provider being configured. This must match the name specified by the `urn` field, and
430
+ // is passed so that providers do not have to implement URN parsing in order to extract the name of the
431
+ // provider. N.B. This will be null if configure_with_urn was false in Handshake.
432
+ optional string name = 9;
433
+
434
+ // The type of the provider being configured. This must match the type specified by the `urn` field, and
435
+ // is passed so that providers do not have to implement URN parsing in order to extract the type of the
436
+ // provider. N.B. This will be null if configure_with_urn was false in Handshake.
437
+ optional string type = 10;
438
+ }
439
+
440
+ // `ConfigureResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.Configure) call. Its primary
441
+ // purpose is to communicate features that the provider supports back to the caller.
442
+ message ConfigureResponse {
443
+ // True if and only if the provider supports secrets. If true, the caller should pass secrets as strongly typed
444
+ // values to the provider. *Must* match the value returned in response to [](pulumirpc.ResourceProvider.Handshake)
445
+ // if the provider supports handshaking.
446
+ bool acceptSecrets = 1;
447
+
448
+ // True if and only if the provider supports the `preview` field on [](pulumirpc.ResourceProvider.Create) and
449
+ // [](pulumirpc.ResourceProvider.Update) calls. If true, the engine should invoke these calls with `preview` set to
450
+ // `true` during previews. *Must* be true if the provider implements [](pulumirpc.ResourceProvider.Handshake).
451
+ bool supportsPreview = 2;
452
+
453
+ // True if and only if the provider supports strongly typed resources. If true, the caller should pass resources as
454
+ // strongly typed values to the provider. *Must* match the value returned in response to
455
+ // [](pulumirpc.ResourceProvider.Handshake) if the provider supports handshaking.
456
+ bool acceptResources = 3;
457
+
458
+ // True if and only if the provider supports output values as inputs. If true, the engine should pass output values
459
+ // to the provider where possible. *Must* match the value returned in response to
460
+ // [](pulumirpc.ResourceProvider.Handshake) if the provider supports handshaking.
461
+ bool acceptOutputs = 4;
462
+
463
+ // True if the provider accepts and respects autonaming configuration that the engine provides on behalf of the
464
+ // user. *Must* match the value returned in response to [](pulumirpc.ResourceProvider.Handshake) if the provider
465
+ // supports handshaking.
466
+ bool supports_autonaming_configuration = 5;
467
+ }
468
+
469
+ // `ConfigureErrorMissingKeys` is the type of error details that may be sent in response to a
470
+ // [](pulumirpc.ResourceProvider.Configure) call when required configuration keys are missing.
471
+ message ConfigureErrorMissingKeys {
472
+ // The type of key-value pairs representing keys that are missing from a [](pulumirpc.ResourceProvider.Configure)
473
+ // call.
474
+ message MissingKey {
475
+ // The name of the missing configuration key.
476
+ //
477
+ // :::{note}
478
+ // This should be the *Pulumi name* of the missing key, and not any provider-internal or upstream name. Names
479
+ // that differ between Pulumi and an upstream provider should be translated prior to being returned.
480
+ // :::
481
+ string name = 1;
482
+
483
+ // A description of the missing config key, as reported by the provider.
484
+ string description = 2;
485
+ }
486
+
487
+ // A list of required configuration keys that were not supplied.
488
+ repeated MissingKey missingKeys = 1;
489
+ }
490
+
491
+ message InvokeRequest {
492
+ string tok = 1; // the function token to invoke.
493
+ google.protobuf.Struct args = 2; // the arguments for the function invocation.
494
+
495
+ // We used to send ResourceInvokeRequest for both provider invokes and monitor invokes, despite them being
496
+ // different. We've now split them but need to make sure we don't confuse any old plugins/monitors making
497
+ // sure those fields don't get reused.
498
+ reserved 3 to 6;
499
+ reserved "provider", "version", "acceptResources", "pluginDownloadURL";
500
+
501
+ // This is only set if `HandshakeRequest.invoke_with_preview` was true. If this is true then the engine is currently
502
+ // running a preview deployment.
503
+ bool preview = 7;
504
+ }
505
+
506
+ message InvokeResponse {
507
+ google.protobuf.Struct return = 1; // the returned values, if invoke was successful.
508
+ repeated CheckFailure failures = 2; // the failures if any arguments didn't pass verification.
509
+ }
510
+
511
+ message CallRequest {
512
+ // ArgumentDependencies describes the resources that a particular argument depends on.
513
+ message ArgumentDependencies {
514
+ repeated string urns = 1; // A list of URNs this argument depends on.
515
+ }
516
+
517
+ // We used to send CallRequest for both provider calls and monitor calls, despite them being different.
518
+ // We've now split them but need to make sure we don't confuse any old plugins/monitors making sure those
519
+ // fields don't get reused.
520
+ reserved 4, 5, 13, 16, 15;
521
+ reserved "provider", "version", "pluginDownloadURL", "pluginChecksums", "sourcePosition";
522
+
523
+ string tok = 1; // the function token to invoke.
524
+ google.protobuf.Struct args = 2; // the arguments for the function invocation.
525
+ map<string, ArgumentDependencies> argDependencies = 3; // a map from argument keys to the dependencies of the argument.
526
+
527
+ string project = 6; // the project name.
528
+ string stack = 7; // the name of the stack being deployed into.
529
+ map<string, string> config = 8; // the configuration variables to apply before running.
530
+ repeated string configSecretKeys = 9; // the configuration keys that have secret values.
531
+ bool dryRun = 10; // true if we're only doing a dryrun (preview).
532
+ int32 parallel = 11; // the degree of parallelism for resource operations (<=1 for serial).
533
+ string monitorEndpoint = 12; // the address for communicating back to the resource monitor.
534
+ string organization = 14; // the organization of the stack being deployed into.
535
+
536
+ bool accepts_output_values = 17; // the engine can be passed output values back, returnDependencies can be left blank if returning output values.
537
+
538
+ // The stack trace handle for the call. Supports stitching stack traces together across plugins.
539
+ string stack_trace_handle = 18;
540
+ }
541
+
542
+ message CallResponse {
543
+ // ReturnDependencies describes the resources that a particular return value depends on.
544
+ message ReturnDependencies {
545
+ repeated string urns = 1; // A list of URNs this return value depends on.
546
+ }
547
+
548
+ google.protobuf.Struct return = 1; // the returned values, if call was successful.
549
+ repeated CheckFailure failures = 3; // the failures if any arguments didn't pass verification.
550
+
551
+ // a map from return value keys to the dependencies of the return value.
552
+ //
553
+ // returnDependencies will be augmented by the set of dependencies specified in return
554
+ // via output property values.
555
+ map<string, ReturnDependencies> returnDependencies = 2;
556
+ }
557
+
558
+ // `CheckRequest` is the type of requests sent as part of [](pulumirpc.ResourceProvider.CheckConfig) and
559
+ // [](pulumirpc.ResourceProvider.Check) calls. A `CheckRequest` primarily captures the URN and inputs of the resource
560
+ // being checked. In the case of [](pulumirpc.ResourceProvider.CheckConfig), the URN will be the URN of the provider
561
+ // resource being constructed, which may or may not be a [default provider](default-providers), and the inputs will be
562
+ // the provider configuration.
563
+ message CheckRequest {
564
+ // The URN of the resource whose inputs are being checked. In the case of
565
+ // [](pulumirpc.ResourceProvider.CheckConfig), this will be the URN of the provider resource being constructed,
566
+ // which may or may not be a [default provider](default-providers).
567
+ string urn = 1;
568
+
569
+ // The old input properties or configuration for the resource, if any.
570
+ google.protobuf.Struct olds = 2;
571
+
572
+ // The new input properties or configuration for the resource, if any.
573
+ //
574
+ // :::{note}
575
+ // If this resource has been specified with the
576
+ // [`ignoreChanges`](https://www.pulumi.com/docs/concepts/options/ignorechanges/), then the values in `news` may
577
+ // differ from those written in the Pulumi program registering this resource. In such cases, the caller (e.g. the
578
+ // Pulumi engine) is expected to preprocess the `news` value by replacing every property matched by `ignoreChanges`
579
+ // with its corresponding `olds` value (effectively ignoring the change).
580
+ // :::
581
+ google.protobuf.Struct news = 3;
582
+
583
+ // `CheckRequest`s originally contained sequence numbers, but they have since been replaced by random seeds.
584
+ reserved 4;
585
+ reserved "sequenceNumber";
586
+
587
+ // A random but deterministically computed hash, intended to be used for generating globally unique names.
588
+ bytes randomSeed = 5;
589
+
590
+ // The name of the resource being checked. This must match the name specified by the `urn` field, and is passed so
591
+ // that providers do not have to implement URN parsing in order to extract the name of the resource.
592
+ string name = 6;
593
+
594
+ // The type of the resource being checked. This must match the type specified by the `urn` field, and is passed so
595
+ // that providers do not have to implement URN parsing in order to extract the type of the resource.
596
+ string type = 7;
597
+
598
+ // Configuration for automatic resource naming behavior. This structure contains fields that control how the provider
599
+ // handles resource names, including proposed names and naming modes.
600
+ message AutonamingOptions {
601
+ // The proposed name for the resource being checked. This may be used by the provider as a suggestion
602
+ // for the final resource name, depending on the specified mode.
603
+ string proposed_name = 1;
604
+
605
+ // The mode that controls how the provider handles the proposed name. If not specified, defaults to `PROPOSE`.
606
+ // - `PROPOSE`: The provider may use the proposed name as a suggestion but is free to modify it.
607
+ // - `ENFORCE`: The provider must use exactly the proposed name or return an error.
608
+ // - `DISABLE`: The provider should disable automatic naming and return an error if no explicit name
609
+ // is provided by user's program.
610
+ enum Mode {
611
+ PROPOSE = 0;
612
+ ENFORCE = 1;
613
+ DISABLE = 2;
614
+ }
615
+ Mode mode = 2;
616
+ }
617
+ AutonamingOptions autonaming = 8;
618
+ }
619
+
620
+ // `CheckResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.CheckConfig) or
621
+ // [](pulumirpc.ResourceProvider.Check) call. A `CheckResponse` may contain either:
622
+ //
623
+ // * a set of checked, known-valid `inputs`. In the case of [](pulumirpc.ResourceProvider.CheckConfig), these may
624
+ // subsequently be passed to [](pulumirpc.ResourceProvider.DiffConfig) and/or
625
+ // [](pulumirpc.ResourceProvider.Configure). In the case of [](pulumirpc.ResourceProvider.Check), these may be passed
626
+ // to any of the supported lifecycle methods that accept provider inputs.
627
+ // * a set of `failures` detailing invalid inputs.
628
+ //
629
+ // In cases where the supplied set of inputs is valid, a `CheckResponse` may contain default values that should
630
+ // persisted to Pulumi state and passed to subsequent calls.
631
+ message CheckResponse {
632
+ // A valid, checked set of inputs. May contain defaults.
633
+ google.protobuf.Struct inputs = 1;
634
+
635
+ // Any validation failures that occurred.
636
+ repeated CheckFailure failures = 2;
637
+ }
638
+
639
+ // A `CheckFailure` describes a single validation error that arose as part of a
640
+ // [](pulumirpc.ResourceProvider.CheckConfig) or [](pulumirpc.ResourceProvider.Check) call.
641
+ message CheckFailure {
642
+ // The input property that failed validation.
643
+ string property = 1;
644
+
645
+ // The reason that the named property failed validation.
646
+ string reason = 2;
647
+ }
648
+
649
+ // `DiffRequest` is the type of requests sent as part of [](pulumirpc.ResourceProvider.DiffConfig) and
650
+ // [](pulumirpc.ResourceProvider.Diff) calls. A `DiffRequest` primarily captures:
651
+ //
652
+ // * the URN of the resource whose properties are being compared;
653
+ // * the old and new input properties of the resource; and
654
+ // * the old output properties of the resource.
655
+ //
656
+ // In the case of [](pulumirpc.ResourceProvider.DiffConfig), the URN will be the URN of the provider resource being
657
+ // examined, which may or may not be a [default provider](default-providers), and the inputs and outputs will be the
658
+ // provider configuration and state. Inputs supplied to a [](pulumirpc.ResourceProvider.DiffConfig) call should have
659
+ // been previously checked by a call to [](pulumirpc.ResourceProvider.CheckConfig); inputs supplied to a
660
+ // [](pulumirpc.ResourceProvider.Diff) call should have been previously checked by a call to
661
+ // [](pulumirpc.ResourceProvider.Check).
662
+ message DiffRequest {
663
+ // The ID of the resource being diffed.
664
+ string id = 1;
665
+
666
+ // The URN of the resource being diffed.
667
+ string urn = 2;
668
+
669
+ // The old *output* properties of the resource being diffed.
670
+ google.protobuf.Struct olds = 3;
671
+
672
+ // The new *input* properties of the resource being diffed. These should have been validated by an appropriate call
673
+ // to [](pulumirpc.ResourceProvider.CheckConfig) or [](pulumirpc.ResourceProvider.Check).
674
+ google.protobuf.Struct news = 4;
675
+
676
+ // A set of [property paths](property-paths) that should be treated as unchanged.
677
+ repeated string ignoreChanges = 5;
678
+
679
+ // The old *input* properties of the resource being diffed.
680
+ google.protobuf.Struct old_inputs = 6;
681
+
682
+ // The name of the resource being diffed. This must match the name specified by the `urn` field, and is passed so
683
+ // that providers do not have to implement URN parsing in order to extract the name of the resource.
684
+ string name = 7;
685
+
686
+ // The type of the resource being diffed. This must match the type specified by the `urn` field, and is passed so
687
+ // that providers do not have to implement URN parsing in order to extract the type of the resource.
688
+ string type = 8;
689
+ }
690
+
691
+ // `PropertyDiff` describes the kind of change that occurred to a property during a diff operation. A `PropertyDiff` may
692
+ // indicate that a property was added, deleted, or updated, and may further indicate that the change requires a
693
+ // replacement.
694
+ message PropertyDiff {
695
+ // The kind of diff associated with this property.
696
+ Kind kind = 1;
697
+
698
+ // True if and only if this difference represents one between a pair of old and new inputs, as opposed to a pair of
699
+ // old and new states.
700
+ bool inputDiff = 2;
701
+
702
+ // The type of property diff kinds.
703
+ enum Kind {
704
+ // This property was added.
705
+ ADD = 0;
706
+
707
+ // This property was added, and this change requires a replace.
708
+ ADD_REPLACE = 1;
709
+
710
+ // This property was removed.
711
+ DELETE = 2;
712
+
713
+ // This property was removed, and this change requires a replace.
714
+ DELETE_REPLACE = 3;
715
+
716
+ // This property's value was changed.
717
+ UPDATE = 4;
718
+
719
+ // This property's value was changed, and this change requires a replace.
720
+ UPDATE_REPLACE = 5;
721
+ }
722
+ }
723
+
724
+ // `DiffResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.DiffConfig) or
725
+ // [](pulumirpc.ResourceProvider.Diff) call. A `DiffResponse` indicates whether a resource is unchanged, requires
726
+ // updating (that is, can be changed "in place"), or requires replacement (that is, must be destroyed and recreated
727
+ // anew). Legacy implementations may also signal that it is unknown whether there are changes or not.
728
+ //
729
+ // `DiffResponse` has evolved since its inception and there are now a number of ways that providers can signal their
730
+ // intent to callers:
731
+ //
732
+ // * *Simple diffs* utilise the `changes` field to signal which fields are responsible for a change, and the `replaces`
733
+ // field to further communicate which changes (if any) require a replacement as opposed to an update.
734
+ //
735
+ // * *Detailed diffs* are those with `hasDetailedDiff` set, and utilise the `detailedDiff` field to provide a more
736
+ // granular view of the changes that have occurred. Detailed diffs are designed to allow providers to control
737
+ // precisely which field names are displayed as responsible for a change, and to signal more accurately what kind of
738
+ // change occurred (e.g. a field was added, deleted or updated).
739
+ //
740
+ // The response must satisfy the following invariants:
741
+ //
742
+ // * For each top-level key in `diff` there is at least one matching property path, starting at that key, in `detailedDiff`.
743
+ // * For each entry in `detailedDiff`, its top-level property is in `diff`.
744
+ // * `diff` does not contain duplicates.
745
+ // * `detailedDiff` does not contain duplicate keys.
746
+ message DiffResponse {
747
+ // A set of properties which have changed and whose changes require the resource being diffed to be replaced. The
748
+ // caller should replace the resource if this set is non-empty, or if any of the properties specified in
749
+ // `detailedDiff` have a `*_REPLACE` kind.
750
+ repeated string replaces = 1;
751
+
752
+ // An optional list of properties that will not ever change (are stable).
753
+ repeated string stables = 2;
754
+
755
+ // If true, this resource must be deleted *before* its replacement is created.
756
+ bool deleteBeforeReplace = 3;
757
+
758
+ // The result of the diff. Indicates at a high level whether the resource has changed or not (or, in legacy cases,
759
+ // if the provider does not know).
760
+ DiffChanges changes = 4;
761
+
762
+ // The set of properties which have changed. This field only supports top-level properties. It *does not* support
763
+ // full [property paths](property-paths); implementations should use `detailedDiff` when this is required.
764
+ repeated string diffs = 5;
765
+
766
+ // `detailedDiff` can be used to implement more detailed diffs. A detailed diff is a map from [property
767
+ // paths](property-paths) to [](pulumirpc.PropertyDiff)s, which describe the kind of change that occurred to the
768
+ // property located at that path. If a provider does not implement this, the caller (typically the Pulumi engine)
769
+ // will compute a representation based on the simple diff fields (`changes`, `replaces`, and so on).
770
+ map<string, PropertyDiff> detailedDiff = 6;
771
+
772
+ // True if and only if this response contains a `detailedDiff`.
773
+ bool hasDetailedDiff = 7;
774
+
775
+ // The type of high-level diff results.
776
+ enum DiffChanges {
777
+ // A diff was performed but it is unknown whether there are changes or not. This exists to support legacy
778
+ // behaviour and should be generally avoided wherever possible.
779
+ DIFF_UNKNOWN = 0;
780
+
781
+ // A diff was performed and there were no changes. An update is not required.
782
+ DIFF_NONE = 1;
783
+
784
+ // A diff was performed, and changes were detected that require an update or replacement.
785
+ DIFF_SOME = 2;
786
+ }
787
+ }
788
+
789
+ // `CreateRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.Create) call.
790
+ message CreateRequest {
791
+ // The URN of the resource being created.
792
+ string urn = 1;
793
+
794
+ // The resource's input properties, to be set during creation. These should have been validated by a call to
795
+ // [](pulumirpc.ResourceProvider.Check).
796
+ google.protobuf.Struct properties = 2;
797
+
798
+ // A timeout in seconds that the caller is prepared to wait for the operation to complete.
799
+ double timeout = 3;
800
+
801
+ // True if and only if the request is being made as part of a preview/dry run, in which case the provider should not
802
+ // actually create the resource.
803
+ bool preview = 4;
804
+
805
+ // The name of the resource being created. This must match the name specified by the `urn` field, and is passed so
806
+ // that providers do not have to implement URN parsing in order to extract the name of the resource.
807
+ string name = 5;
808
+
809
+ // The type of the resource being created. This must match the type specified by the `urn` field, and is passed so
810
+ // that providers do not have to implement URN parsing in order to extract the type of the resource.
811
+ string type = 6;
812
+
813
+ // The address of a [](pulumirpc.ResourceStatus) service which can be used to e.g. create or update view resources.
814
+ string resource_status_address = 7;
815
+
816
+ // The [](pulumirpc.ResourceStatus) service context token to pass when calling methods on the service.
817
+ string resource_status_token = 8;
818
+ }
819
+
820
+ // `CreateResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.Create) call. A `CreateResponse`
821
+ // contains the ID of the created resource, as well as any output properties that arose from the creation process.
822
+ message CreateResponse {
823
+ // The ID of the created resource.
824
+ string id = 1;
825
+
826
+ // The resource's output properties. Typically this will be a union of the resource's input properties and any
827
+ // additional values that were computed or made available during creation.
828
+ google.protobuf.Struct properties = 2;
829
+
830
+ // Indicates that this resource should always be refreshed prior to updates.
831
+ bool refresh_before_update = 3;
832
+ }
833
+
834
+ // `ReadRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.Read) call.
835
+ message ReadRequest {
836
+ // The ID of the resource to read.
837
+ string id = 1;
838
+
839
+ // The URN of the resource being read.
840
+ string urn = 2;
841
+
842
+ // Any current state for the resource being read. This state should be sufficient to uniquely identify the resource.
843
+ google.protobuf.Struct properties = 3;
844
+
845
+ // Any current input properties for the resource being read. These will only be populated when the
846
+ // [](pulumirpc.ResourceProvider.Read) call is being made as part of a refresh operation.
847
+ google.protobuf.Struct inputs = 4;
848
+
849
+ // The name of the resource being read. This must match the name specified by the `urn` field, and is passed so that
850
+ // providers do not have to implement URN parsing in order to extract the name of the resource.
851
+ string name = 5;
852
+
853
+ // The type of the resource being read. This must match the type specified by the `urn` field, and is passed so that
854
+ // providers do not have to implement URN parsing in order to extract the type of the resource.
855
+ string type = 6;
856
+
857
+ // The address of a [](pulumirpc.ResourceStatus) service which can be used to e.g. create or update view resources.
858
+ string resource_status_address = 7;
859
+
860
+ // The [](pulumirpc.ResourceStatus) service context token to pass when calling methods on the service.
861
+ string resource_status_token = 8;
862
+
863
+ // The old views for the resource being read. These will only be populated when the
864
+ // [](pulumirpc.ResourceProvider.Read) call is being made as part of a refresh operation.
865
+ repeated View old_views = 9;
866
+ }
867
+
868
+ // `ReadResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.Read) call. A `ReadResponse` contains
869
+ // the ID of the resource being read, as well as any state that was successfully read from the live environment.
870
+ message ReadResponse {
871
+ // The ID of the read resource.
872
+ string id = 1;
873
+
874
+ // The output properties of the resource read from the live environment.
875
+ google.protobuf.Struct properties = 2;
876
+
877
+ // Output-derived input properties for the resource. These are returned as they would be returned from a
878
+ // [](pulumirpc.ResourceProvider.Check) call with the same values.
879
+ google.protobuf.Struct inputs = 3;
880
+
881
+ // Indicates that this resource should always be refreshed prior to updates.
882
+ bool refresh_before_update = 4;
883
+ }
884
+
885
+ // `UpdateRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.Update) call.
886
+ message UpdateRequest {
887
+ // The ID of the resource being updated.
888
+ string id = 1;
889
+
890
+ // The URN of the resource being updated.
891
+ string urn = 2;
892
+
893
+ // The old *output* properties of the resource being updated.
894
+ google.protobuf.Struct olds = 3;
895
+
896
+ // The new input properties of the resource being updated. These should have been validated by a call to
897
+ // [](pulumirpc.ResourceProvider.Check).
898
+ google.protobuf.Struct news = 4;
899
+
900
+ // A timeout in seconds that the caller is prepared to wait for the operation to complete.
901
+ double timeout = 5;
902
+
903
+ // A set of [property paths](property-paths) that should be treated as unchanged.
904
+ repeated string ignoreChanges = 6;
905
+
906
+ // True if and only if the request is being made as part of a preview/dry run, in which case the provider should not
907
+ // actually update the resource.
908
+ bool preview = 7;
909
+
910
+ // The old *input* properties of the resource being updated.
911
+ google.protobuf.Struct old_inputs = 8;
912
+
913
+ // The name of the resource being updated. This must match the name specified by the `urn` field, and is passed so
914
+ // that providers do not have to implement URN parsing in order to extract the name of the resource.
915
+ string name = 9;
916
+
917
+ // The type of the resource being updated. This must match the type specified by the `urn` field, and is passed so
918
+ // that providers do not have to implement URN parsing in order to extract the type of the resource.
919
+ string type = 10;
920
+
921
+ // The address of a [](pulumirpc.ResourceStatus) service which can be used to e.g. create or update view resources.
922
+ string resource_status_address = 11;
923
+
924
+ // The [](pulumirpc.ResourceStatus) service context token to pass when calling methods on the service.
925
+ string resource_status_token = 12;
926
+
927
+ // The old views for the resource being updated.
928
+ repeated View old_views = 13;
929
+ }
930
+
931
+ // `UpdateResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.Update) call.
932
+ message UpdateResponse {
933
+ // An updated set of resource output properties. Typically this will be a union of the resource's inputs and any
934
+ // additional values that were computed or made available during the update.
935
+ google.protobuf.Struct properties = 1;
936
+
937
+ // Indicates that this resource should always be refreshed prior to updates.
938
+ bool refresh_before_update = 2;
939
+ }
940
+
941
+ // `DeleteRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.Delete) call.
942
+ message DeleteRequest {
943
+ // The ID of the resource to delete.
944
+ string id = 1;
945
+
946
+ // The URN of the resource to delete.
947
+ string urn = 2;
948
+
949
+ // The old *output* properties of the resource being deleted.
950
+ google.protobuf.Struct properties = 3;
951
+
952
+ // A timeout in seconds that the caller is prepared to wait for the operation to complete.
953
+ double timeout = 4;
954
+
955
+ // The old *input* properties of the resource being deleted.
956
+ google.protobuf.Struct old_inputs = 5; // the old input values of the resource to delete.
957
+
958
+ // The name of the resource being deleted. This must match the name specified by the `urn` field, and is passed so
959
+ // that providers do not have to implement URN parsing in order to extract the name of the resource.
960
+ string name = 6;
961
+
962
+ // The type of the resource being deleted. This must match the type specified by the `urn` field, and is passed so
963
+ // that providers do not have to implement URN parsing in order to extract the type of the resource.
964
+ string type = 7;
965
+
966
+ // The address of a [](pulumirpc.ResourceStatus) service which can be used to e.g. create or update view resources.
967
+ string resource_status_address = 8;
968
+
969
+ // The [](pulumirpc.ResourceStatus) service context token to pass when calling methods on the service.
970
+ string resource_status_token = 9;
971
+
972
+ // The old views for the resource being read.
973
+ repeated View old_views = 10;
974
+ }
975
+
976
+ // `ConstructRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.Construct) call. A
977
+ // `ConstructRequest` captures enough data to be able to register nested components against the caller's resource
978
+ // monitor.
979
+ message ConstructRequest {
980
+ // A `PropertyDependencies` list is a set of URNs that a particular property may depend on.
981
+ message PropertyDependencies {
982
+ // A list of URNs that this property depends on.
983
+ repeated string urns = 1;
984
+ }
985
+
986
+ // A `CustomTimeouts` object encapsulates a set of timeouts for the various CRUD operations that might be performed
987
+ // on this resource's nested resources. Timeout values are specified as duration strings, such as `"5ms"` (5
988
+ // milliseconds), `"40s"` (40 seconds), or `"1m30s"` (1 minute and 30 seconds). The following units of time are
989
+ // supported:
990
+ //
991
+ // * `ns`: nanoseconds
992
+ // * `us` or `µs`: microseconds
993
+ // * `ms`: milliseconds
994
+ // * `s`: seconds
995
+ // * `m`: minutes
996
+ // * `h`: hours
997
+ message CustomTimeouts {
998
+ // How long a caller is prepared to wait for a nested resource's [](pulumirpc.ResourceProvider.Create) operation
999
+ // to complete.
1000
+ string create = 1;
1001
+
1002
+ // How long a caller is prepared to wait for a nested resource's [](pulumirpc.ResourceProvider.Update) operation
1003
+ // to complete.
1004
+ string update = 2;
1005
+
1006
+ // How long a caller is prepared to wait for a nested resource's [](pulumirpc.ResourceProvider.Delete) operation
1007
+ // to complete.
1008
+ string delete = 3;
1009
+ }
1010
+
1011
+ // The project to which this resource and its nested resources will belong.
1012
+ string project = 1;
1013
+
1014
+ // The name of the stack being deployed into.
1015
+ string stack = 2;
1016
+
1017
+ // Configuration for the specified project and stack.
1018
+ map<string, string> config = 3;
1019
+
1020
+ // True if and only if the request is being made as part of a preview/dry run, in which case the provider should not
1021
+ // actually construct the component.
1022
+ bool dryRun = 4;
1023
+
1024
+ // The degree of parallelism that may be used for resource operations. A value less than or equal to 1 indicates
1025
+ // that operations should be performed serially.
1026
+ int32 parallel = 5;
1027
+
1028
+ // The address of the [](pulumirpc.ResourceMonitor) that the provider should connect to in order to send [resource
1029
+ // registrations](resource-registration) for its nested resources.
1030
+ string monitorEndpoint = 6;
1031
+
1032
+ // The type of the component resource being constructed. This must match the type specified by the `urn` field, and
1033
+ // is passed so that providers do not have to implement URN parsing in order to extract the type of the resource.
1034
+ string type = 7;
1035
+
1036
+ // The name of the component resource being constructed. This must match the name specified by the `urn` field, and
1037
+ // is passed so that providers do not have to implement URN parsing in order to extract the name of the resource.
1038
+ string name = 8;
1039
+
1040
+ // Dependencies and resource options
1041
+ //
1042
+ // These are passed so that the component may propagate them to resources it registers against the supplied resource
1043
+ // monitor.
1044
+ //
1045
+ // Do *not* change field IDs. Add new fields at the end with appropriate field IDs as necessary.
1046
+
1047
+ // An optional parent resource that the component (and by extension, its nested resources) should be children of.
1048
+ string parent = 9;
1049
+
1050
+ // The component resource's input properties. Unlike the inputs of custom resources, these will *not* have been
1051
+ // passed to a call to [](pulumirpc.ResourceProvider.Check). By virtue of their being a composition of other
1052
+ // resources, component resources are able to (and therefore expected) to validate their own inputs. Moreover,
1053
+ // [](pulumirpc.ResourceProvider.Check) will be called on any inputs passed to nested custom resources as usual.
1054
+ google.protobuf.Struct inputs = 10;
1055
+
1056
+ // A map of property dependencies for the component resource and its nested resources.
1057
+ map<string, PropertyDependencies> inputDependencies = 11;
1058
+
1059
+ // A map of package names to provider references for the component resource and its nested resources.
1060
+ map<string, string> providers = 13;
1061
+
1062
+ // A list of URNs that this resource and its nested resources depend on.
1063
+ repeated string dependencies = 15;
1064
+
1065
+ // A set of configuration keys whose values are [secret](output-secrets).
1066
+ repeated string configSecretKeys = 16;
1067
+
1068
+ // The organization to which this resource and its nested resources will belong.
1069
+ string organization = 17;
1070
+
1071
+ // True if and only if the resource (and by extension, its nested resources) should be marked as protected.
1072
+ // Protected resources cannot be deleted without first being unprotected.
1073
+ optional bool protect = 12;
1074
+
1075
+ // We used to declare an alias field here of just strings, unlike the new aliases field which is sending
1076
+ // alias specs, and the engine stopped sending this one years ago. But to ensure we don't confuse any old
1077
+ // plugins/monitors making sure that field doesn't get reused.
1078
+ reserved 14;
1079
+
1080
+ // A list of input properties whose values should be treated as [secret](output-secrets).
1081
+ repeated string additionalSecretOutputs = 18;
1082
+
1083
+ // A set of custom timeouts that specify how long the caller is prepared to wait for the various CRUD operations of
1084
+ // this resource's nested resources.
1085
+ CustomTimeouts customTimeouts = 19;
1086
+
1087
+ // The URN of a resource that this resource (and thus its nested resources) will be implicitly deleted with. If the
1088
+ // resource referred to by this URN is deleted in the same operation that this resource would be deleted, the
1089
+ // [](pulumirpc.ResourceProvider.Delete) call for this resource will be elided (since this dependency signals that
1090
+ // it will have already been deleted).
1091
+ string deletedWith = 20;
1092
+
1093
+ // If true, this resource (and its nested resources) must be deleted *before* its replacement is created.
1094
+ optional bool deleteBeforeReplace = 21;
1095
+
1096
+ // A set of [property paths](property-paths) that should be treated as unchanged.
1097
+ repeated string ignoreChanges = 22;
1098
+
1099
+ // A set of properties that, when changed, trigger a replacement.
1100
+ repeated string replaceOnChanges = 23;
1101
+
1102
+ // True if [](pulumirpc.ResourceProvider.Delete) should *not* be called when the resource (and by extension, its
1103
+ // nested resources) are removed from a Pulumi program.
1104
+ optional bool retainOnDelete = 24;
1105
+
1106
+ // True if the caller is capable of accepting output values in response to the call. If this is set, these outputs
1107
+ // may be used to communicate dependency information and so there is no need to populate
1108
+ // [](pulumirpc.ConstructResponse)'s `stateDependencies` field.
1109
+ bool accepts_output_values = 25;
1110
+
1111
+ message ResourceHooksBinding {
1112
+ repeated string before_create = 1;
1113
+ repeated string after_create = 2;
1114
+ repeated string before_update = 3;
1115
+ repeated string after_update = 4;
1116
+ repeated string before_delete = 5;
1117
+ repeated string after_delete = 6;
1118
+ repeated string on_error = 7;
1119
+ }
1120
+ optional ResourceHooksBinding resource_hooks = 26;
1121
+
1122
+ // The stack trace handle for the construct call. Supports stitching stack traces together across plugins.
1123
+ string stack_trace_handle = 27;
1124
+
1125
+ // The URNs of resources whose replaces will trigger a replace on this resource.
1126
+ repeated string replace_with = 28;
1127
+
1128
+ // a list of additional aliases that should be considered the same.
1129
+ repeated Alias aliases = 29;
1130
+
1131
+ // If set, the engine will diff this value with the last recorded value, and trigger a replace if they are not
1132
+ // equal.
1133
+ google.protobuf.Value replacement_trigger = 30;
1134
+ }
1135
+
1136
+ // `ConstructResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.Construct) call.
1137
+ message ConstructResponse {
1138
+ // A `PropertyDependencies` list is a set of URNs that a particular property may depend on.
1139
+ message PropertyDependencies {
1140
+ // A list of URNs that this property depends on.
1141
+ repeated string urns = 1;
1142
+ }
1143
+
1144
+ // The URN of the constructed component resource.
1145
+ string urn = 1;
1146
+
1147
+ // Any output properties that the component registered as part of its construction.
1148
+ google.protobuf.Struct state = 2;
1149
+
1150
+ // A map of property dependencies for the component's outputs. This will be set if the caller indicated that it
1151
+ // could not receive dependency-communicating [output](outputs) values by setting [](pulumirpc.ConstructRequest)'s
1152
+ // `accepts_output_values` field to false.
1153
+ map<string, PropertyDependencies> stateDependencies = 3;
1154
+ }
1155
+
1156
+ // ErrorResourceInitFailed is sent as a Detail `ResourceProvider.{Create, Update}` fail because a
1157
+ // resource was created successfully, but failed to initialize.
1158
+ message ErrorResourceInitFailed {
1159
+ string id = 1; // the ID of the created resource.
1160
+ google.protobuf.Struct properties = 2; // any properties that were computed during updating.
1161
+ repeated string reasons = 3; // error messages associated with initialization failure.
1162
+ google.protobuf.Struct inputs = 4; // the current inputs to this resource (only applicable for Read)
1163
+
1164
+ // Indicates that this resource should always be refreshed prior to updates.
1165
+ bool refresh_before_update = 5;
1166
+ }
1167
+
1168
+
1169
+
1170
+ // `GetMappingRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.GetMapping) call.
1171
+ message GetMappingRequest {
1172
+ // The conversion key for the mapping being requested. This typically corresponds to the source language, such as
1173
+ // `terraform` in the case of mapping Terraform names to Pulumi names.
1174
+ string key = 1;
1175
+
1176
+ // An optional *source provider key* for the mapping being requested. If this is empty, the provider should assume
1177
+ // that this request is from an old engine prior to the introduction of [](pulumirpc.ResourceProvider.GetMappings).
1178
+ // In these cases the request should be answered with the "primary" mapping. If this field is set, the `provider`
1179
+ // field in the corresponding [](pulumirpc.GetMappingResponse) should contain the same value.
1180
+ string provider = 2;
1181
+ }
1182
+
1183
+ // `GetMappingResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.GetMapping) call. The data
1184
+ // within a `GetMappingResponse` will normally be human-readable JSON (e.g. an object mapping names from the source to
1185
+ // Pulumi), but the engine doesn't mandate any specific format.
1186
+ message GetMappingResponse {
1187
+ // The *source provider key* that this mapping contains data for.
1188
+ string provider = 1;
1189
+
1190
+ // Mapping data in a format specific to the conversion plugin/source language.
1191
+ bytes data = 2;
1192
+ }
1193
+
1194
+ // `GetMappingsRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.GetMappings) call.
1195
+ message GetMappingsRequest {
1196
+ // The conversion key for the mapping being requested. This typically corresponds to the source language, such as
1197
+ // `terraform` in the case of mapping Terraform names to Pulumi names.
1198
+ string key = 1;
1199
+ }
1200
+
1201
+ // `GetMappingsResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.GetMappings) call.
1202
+ message GetMappingsResponse {
1203
+ // The set of *source provider keys* this provider can supply mappings for. For example the Pulumi provider
1204
+ // `terraform-template` would return `["template"]` for this.
1205
+ repeated string providers = 1;
1206
+ }
1207
+
1208
+ // `View` represents the state of a view resource.
1209
+ message View {
1210
+ // The type of the view resource.
1211
+ string type = 1;
1212
+
1213
+ // The name of the view resource.
1214
+ string name = 2;
1215
+
1216
+ // An optional type of the parent view resource.
1217
+ string parent_type = 3;
1218
+
1219
+ // An optional name of the parent view resource.
1220
+ string parent_name = 4;
1221
+
1222
+ // The view resource's inputs.
1223
+ google.protobuf.Struct inputs = 5;
1224
+
1225
+ // The view resource's outputs.
1226
+ google.protobuf.Struct outputs = 6;
1227
+ }