From 634e97cd55d8ad0347924b535f3f0daf6517a6c1 Mon Sep 17 00:00:00 2001 From: Evan Boyle Date: Thu, 24 Jun 2021 15:38:01 -0700 Subject: [PATCH] Include config secret info in Construct calls (#7358) --- pkg/resource/deploy/source_eval.go | 18 +- sdk/go/common/resource/plugin/provider.go | 13 +- .../common/resource/plugin/provider_plugin.go | 5 + .../common/resource/plugin/provider_server.go | 23 +- sdk/go/pulumi/provider.go | 15 +- sdk/nodejs/proto/provider_pb.js | 53 ++++- sdk/nodejs/provider/server.ts | 2 +- sdk/proto/go/provider.pb.go | 221 +++++++++--------- sdk/proto/provider.proto | 1 + sdk/python/lib/pulumi/provider/server.py | 2 +- .../lib/pulumi/runtime/proto/provider_pb2.py | 47 ++-- .../lib/pulumi/runtime/proto/provider_pb2.pyi | 1 + .../construct_component/dotnet/Component.cs | 3 + .../construct_component/go/main.go | 1 + .../construct_component/nodejs/component.ts | 1 + .../construct_component/python/component.py | 1 + .../testcomponent-go/main.go | 22 +- .../testcomponent-python/testcomponent.py | 21 +- .../testcomponent/index.ts | 24 +- tests/integration/integration_dotnet_test.go | 11 +- tests/integration/integration_go_test.go | 7 + tests/integration/integration_nodejs_test.go | 11 +- tests/integration/integration_python_test.go | 7 + 23 files changed, 341 insertions(+), 169 deletions(-) diff --git a/pkg/resource/deploy/source_eval.go b/pkg/resource/deploy/source_eval.go index 633cbc260..6ffede16e 100644 --- a/pkg/resource/deploy/source_eval.go +++ b/pkg/resource/deploy/source_eval.go @@ -106,7 +106,8 @@ func (src *evalSource) Iterate( regChan := make(chan *registerResourceEvent) regOutChan := make(chan *registerResourceOutputsEvent) regReadChan := make(chan *readResourceEvent) - mon, err := newResourceMonitor(src, providers, regChan, regOutChan, regReadChan, opts, config, tracingSpan) + mon, err := newResourceMonitor( + src, providers, regChan, regOutChan, regReadChan, opts, config, configSecretKeys, tracingSpan) if err != nil { return nil, result.FromError(errors.Wrap(err, "failed to start resource monitor")) } @@ -411,7 +412,7 @@ var _ SourceResourceMonitor = (*resmon)(nil) // newResourceMonitor creates a new resource monitor RPC server. func newResourceMonitor(src *evalSource, provs ProviderSource, regChan chan *registerResourceEvent, regOutChan chan *registerResourceOutputsEvent, regReadChan chan *readResourceEvent, opts Options, - config map[config.Key]string, tracingSpan opentracing.Span) (*resmon, error) { + config map[config.Key]string, configSecretKeys []config.Key, tracingSpan opentracing.Span) (*resmon, error) { // Create our cancellation channel. cancel := make(chan bool) @@ -449,12 +450,13 @@ func newResourceMonitor(src *evalSource, provs ProviderSource, regChan chan *reg } resmon.constructInfo = plugin.ConstructInfo{ - Project: string(src.runinfo.Proj.Name), - Stack: string(src.runinfo.Target.Name), - Config: config, - DryRun: src.dryRun, - Parallel: opts.Parallel, - MonitorAddress: fmt.Sprintf("127.0.0.1:%d", port), + Project: string(src.runinfo.Proj.Name), + Stack: string(src.runinfo.Target.Name), + Config: config, + ConfigSecretKeys: configSecretKeys, + DryRun: src.dryRun, + Parallel: opts.Parallel, + MonitorAddress: fmt.Sprintf("127.0.0.1:%d", port), } resmon.done = done diff --git a/sdk/go/common/resource/plugin/provider.go b/sdk/go/common/resource/plugin/provider.go index 40564eec5..5287fdd2d 100644 --- a/sdk/go/common/resource/plugin/provider.go +++ b/sdk/go/common/resource/plugin/provider.go @@ -222,12 +222,13 @@ type ReadResult struct { // ConstructInfo contains all of the information required to register resources as part of a call to Construct. type ConstructInfo struct { - Project string // the project name housing the program being run. - Stack string // the stack name being evaluated. - Config map[config.Key]string // the configuration variables to apply before running. - DryRun bool // true if we are performing a dry-run (preview). - Parallel int // the degree of parallelism for resource operations (<=1 for serial). - MonitorAddress string // the RPC address to the host resource monitor. + Project string // the project name housing the program being run. + Stack string // the stack name being evaluated. + Config map[config.Key]string // the configuration variables to apply before running. + ConfigSecretKeys []config.Key // the configuration keys that have secret values. + DryRun bool // true if we are performing a dry-run (preview). + Parallel int // the degree of parallelism for resource operations (<=1 for serial). + MonitorAddress string // the RPC address to the host resource monitor. } // ConstructOptions captures options for a call to Construct. diff --git a/sdk/go/common/resource/plugin/provider_plugin.go b/sdk/go/common/resource/plugin/provider_plugin.go index bb4518093..534669d8b 100644 --- a/sdk/go/common/resource/plugin/provider_plugin.go +++ b/sdk/go/common/resource/plugin/provider_plugin.go @@ -1102,11 +1102,16 @@ func (p *provider) Construct(info ConstructInfo, typ tokens.Type, name tokens.QN for k, v := range info.Config { config[k.String()] = v } + configSecretKeys := []string{} + for _, k := range info.ConfigSecretKeys { + configSecretKeys = append(configSecretKeys, k.String()) + } resp, err := client.Construct(p.requestContext(), &pulumirpc.ConstructRequest{ Project: info.Project, Stack: info.Stack, Config: config, + ConfigSecretKeys: configSecretKeys, DryRun: info.DryRun, Parallel: int32(info.Parallel), MonitorEndpoint: info.MonitorAddress, diff --git a/sdk/go/common/resource/plugin/provider_server.go b/sdk/go/common/resource/plugin/provider_server.go index 43b6ce0ba..67e0f655c 100644 --- a/sdk/go/common/resource/plugin/provider_server.go +++ b/sdk/go/common/resource/plugin/provider_server.go @@ -409,13 +409,24 @@ func (p *providerServer) Construct(ctx context.Context, } cfg[configKey] = v } + + cfgSecretKeys := []config.Key{} + for _, k := range req.GetConfigSecretKeys() { + key, err := config.ParseKey(k) + if err != nil { + return nil, err + } + cfgSecretKeys = append(cfgSecretKeys, key) + } + info := ConstructInfo{ - Project: req.GetProject(), - Stack: req.GetStack(), - Config: cfg, - DryRun: req.GetDryRun(), - Parallel: int(req.GetParallel()), - MonitorAddress: req.GetMonitorEndpoint(), + Project: req.GetProject(), + Stack: req.GetStack(), + Config: cfg, + ConfigSecretKeys: cfgSecretKeys, + DryRun: req.GetDryRun(), + Parallel: int(req.GetParallel()), + MonitorAddress: req.GetMonitorEndpoint(), } aliases := make([]resource.URN, len(req.GetAliases())) diff --git a/sdk/go/pulumi/provider.go b/sdk/go/pulumi/provider.go index 6d64ffb43..09cf01c73 100644 --- a/sdk/go/pulumi/provider.go +++ b/sdk/go/pulumi/provider.go @@ -37,13 +37,14 @@ func construct(ctx context.Context, req *pulumirpc.ConstructRequest, engineConn // Configure the RunInfo. runInfo := RunInfo{ - Project: req.GetProject(), - Stack: req.GetStack(), - Config: req.GetConfig(), - Parallel: int(req.GetParallel()), - DryRun: req.GetDryRun(), - MonitorAddr: req.GetMonitorEndpoint(), - engineConn: engineConn, + Project: req.GetProject(), + Stack: req.GetStack(), + Config: req.GetConfig(), + ConfigSecretKeys: req.GetConfigSecretKeys(), + Parallel: int(req.GetParallel()), + DryRun: req.GetDryRun(), + MonitorAddr: req.GetMonitorEndpoint(), + engineConn: engineConn, } pulumiCtx, err := NewContext(ctx, runInfo) if err != nil { diff --git a/sdk/nodejs/proto/provider_pb.js b/sdk/nodejs/proto/provider_pb.js index c5fdd6132..a3399be62 100644 --- a/sdk/nodejs/proto/provider_pb.js +++ b/sdk/nodejs/proto/provider_pb.js @@ -5259,7 +5259,7 @@ proto.pulumirpc.DeleteRequest.prototype.setTimeout = function(value) { * @private {!Array} * @const */ -proto.pulumirpc.ConstructRequest.repeatedFields_ = [14,15]; +proto.pulumirpc.ConstructRequest.repeatedFields_ = [14,15,16]; @@ -5306,7 +5306,8 @@ proto.pulumirpc.ConstructRequest.toObject = function(includeInstance, msg) { protect: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), providersMap: (f = msg.getProvidersMap()) ? f.toObject(includeInstance, undefined) : [], aliasesList: (f = jspb.Message.getRepeatedField(msg, 14)) == null ? undefined : f, - dependenciesList: (f = jspb.Message.getRepeatedField(msg, 15)) == null ? undefined : f + dependenciesList: (f = jspb.Message.getRepeatedField(msg, 15)) == null ? undefined : f, + configsecretkeysList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? undefined : f }; if (includeInstance) { @@ -5410,6 +5411,10 @@ proto.pulumirpc.ConstructRequest.deserializeBinaryFromReader = function(msg, rea var value = /** @type {string} */ (reader.readString()); msg.addDependencies(value); break; + case 16: + var value = /** @type {string} */ (reader.readString()); + msg.addConfigsecretkeys(value); + break; default: reader.skipField(); break; @@ -5536,6 +5541,13 @@ proto.pulumirpc.ConstructRequest.serializeBinaryToWriter = function(message, wri f ); } + f = message.getConfigsecretkeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 16, + f + ); + } }; @@ -6034,6 +6046,43 @@ proto.pulumirpc.ConstructRequest.prototype.clearDependenciesList = function() { }; +/** + * repeated string configSecretKeys = 16; + * @return {!Array} + */ +proto.pulumirpc.ConstructRequest.prototype.getConfigsecretkeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 16)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pulumirpc.ConstructRequest} returns this + */ +proto.pulumirpc.ConstructRequest.prototype.setConfigsecretkeysList = function(value) { + return jspb.Message.setField(this, 16, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.pulumirpc.ConstructRequest} returns this + */ +proto.pulumirpc.ConstructRequest.prototype.addConfigsecretkeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 16, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pulumirpc.ConstructRequest} returns this + */ +proto.pulumirpc.ConstructRequest.prototype.clearConfigsecretkeysList = function() { + return this.setConfigsecretkeysList([]); +}; + + diff --git a/sdk/nodejs/provider/server.ts b/sdk/nodejs/provider/server.ts index 0151ff70f..0ec84aca9 100644 --- a/sdk/nodejs/provider/server.ts +++ b/sdk/nodejs/provider/server.ts @@ -291,7 +291,7 @@ class Server implements grpc.UntypedServiceImplementation { pulumiConfig[k] = v; } } - runtime.setAllConfig(pulumiConfig); + runtime.setAllConfig(pulumiConfig, req.getConfigsecretkeysList()); // Deserialize the inputs and apply appropriate dependencies. const inputs: Inputs = {}; diff --git a/sdk/proto/go/provider.pb.go b/sdk/proto/go/provider.pb.go index 738dc109e..017396f1c 100644 --- a/sdk/proto/go/provider.pb.go +++ b/sdk/proto/go/provider.pb.go @@ -1309,6 +1309,7 @@ type ConstructRequest struct { Providers map[string]string `protobuf:"bytes,13,rep,name=providers,proto3" json:"providers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Aliases []string `protobuf:"bytes,14,rep,name=aliases,proto3" json:"aliases,omitempty"` Dependencies []string `protobuf:"bytes,15,rep,name=dependencies,proto3" json:"dependencies,omitempty"` + ConfigSecretKeys []string `protobuf:"bytes,16,rep,name=configSecretKeys,proto3" json:"configSecretKeys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1444,6 +1445,13 @@ func (m *ConstructRequest) GetDependencies() []string { return nil } +func (m *ConstructRequest) GetConfigSecretKeys() []string { + if m != nil { + return m.ConfigSecretKeys + } + return nil +} + // PropertyDependencies describes the resources that a particular property depends on. type ConstructRequest_PropertyDependencies struct { Urns []string `protobuf:"bytes,1,rep,name=urns,proto3" json:"urns,omitempty"` @@ -1686,112 +1694,113 @@ func init() { func init() { proto.RegisterFile("provider.proto", fileDescriptor_c6a9f3c02af3d1c8) } var fileDescriptor_c6a9f3c02af3d1c8 = []byte{ - // 1670 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x72, 0x1b, 0x45, - 0x10, 0xf6, 0x4a, 0xb2, 0x6c, 0xb5, 0x7e, 0x22, 0x0f, 0xc1, 0x51, 0x14, 0x1f, 0x5c, 0x0b, 0x55, - 0x98, 0x84, 0xc8, 0xc6, 0x39, 0x40, 0x52, 0x4e, 0x05, 0xdb, 0x92, 0x8d, 0x2b, 0x89, 0x63, 0xd6, - 0x09, 0x3f, 0xa7, 0x64, 0xb3, 0x1a, 0xc9, 0x8b, 0xa5, 0xdd, 0x65, 0x76, 0x56, 0x29, 0x73, 0xe6, - 0xc0, 0x05, 0xae, 0x14, 0x0f, 0x01, 0x54, 0xf1, 0x04, 0x3c, 0x08, 0x1c, 0x79, 0x00, 0x8a, 0x17, - 0xa0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0x04, 0x98, 0x0f, 0xa0, 0x28, 0x3a, 0x5e, 0xc3, 0x76, 0xa3, 0x29, 0x37, 0x6c, 0x37, - 0xdb, 0x63, 0x71, 0x36, 0x6b, 0x1d, 0x8d, 0xb3, 0xb5, 0x3e, 0xd7, 0x38, 0x5b, 0xef, 0x31, 0xc5, - 0xd9, 0xa2, 0x07, 0x32, 0xce, 0x36, 0xba, 0x3f, 0xe3, 0x6c, 0xb3, 0x61, 0xb2, 0xa7, 0xd0, 0x1a, - 0x14, 0x45, 0xe3, 0x63, 0x28, 0x30, 0x7a, 0xa1, 0xe6, 0xfc, 0xc4, 0x93, 0xe9, 0x0c, 0x23, 0x7a, - 0x94, 0xc6, 0x91, 0x48, 0x08, 0xe3, 0x71, 0x64, 0xa4, 0xf0, 0xf1, 0x38, 0x32, 0x73, 0x88, 0x3d, - 0x85, 0xee, 0x41, 0x71, 0xd3, 0x0d, 0x3c, 0x3c, 0x40, 0x27, 0x9c, 0x76, 0x8a, 0x15, 0x1f, 0x41, - 0x75, 0x1b, 0xd3, 0x3d, 0xfe, 0x03, 0x77, 0x27, 0xe8, 0x85, 0x27, 0xaa, 0x78, 0x53, 0x9f, 0xc7, - 0x52, 0x71, 0x7b, 0xea, 0x65, 0x91, 0x0b, 0xde, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0xac, 0xa3, - 0xd1, 0x1f, 0x21, 0x16, 0x00, 0x00, + // 1689 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x72, 0xdb, 0x46, + 0x12, 0x16, 0x48, 0x8a, 0x14, 0x9b, 0x3f, 0xa6, 0x66, 0xbd, 0x32, 0x4d, 0xeb, 0xa0, 0xc2, 0x6e, + 0xd5, 0x6a, 0xed, 0x35, 0xa5, 0x95, 0x0f, 0x89, 0x5d, 0x72, 0x39, 0x92, 0x48, 0x29, 0x2a, 0xdb, + 0xb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56, 0xb2, 0x2e, 0x6d, 0x72, + 0x6b, 0xfb, 0xe4, 0xdb, 0xd1, 0x75, 0xb4, 0x36, 0x01, 0x4e, 0x58, 0x08, 0x41, 0x21, 0x70, 0x47, + 0x58, 0x62, 0xc7, 0xbf, 0xd1, 0x12, 0x54, 0x7a, 0x38, 0xf6, 0x88, 0x1f, 0x51, 0x16, 0x87, 0x02, + 0x42, 0x7d, 0xc9, 0xfe, 0xc1, 0x82, 0xda, 0x6e, 0x30, 0x0e, 0x8f, 0xd2, 0xd8, 0x6a, 0x40, 0x9e, + 0x86, 0x47, 0xea, 0x0a, 0x68, 0x78, 0x74, 0xb9, 0x18, 0x69, 0xc1, 0x9c, 0x7a, 0x70, 0x1c, 0xa8, + 0xb2, 0x93, 0xd2, 0xfa, 0x93, 0x28, 0x70, 0x96, 0x22, 0xb3, 0x50, 0x9e, 0xcd, 0x46, 0x79, 0x0c, + 0x75, 0x65, 0xaf, 0xbc, 0xf1, 0x15, 0x28, 0x12, 0x4c, 0x13, 0x22, 0xde, 0xd9, 0x19, 0x06, 0x4a, + 0x31, 0x74, 0x0f, 0xe6, 0xfa, 0xae, 0x3f, 0x4c, 0x08, 0x66, 0x3e, 0xe5, 0xf9, 0x16, 0xed, 0x1e, + 0x0e, 0xb1, 0x77, 0xb4, 0x2d, 0xf8, 0x4e, 0x2a, 0x68, 0x7f, 0x0e, 0x55, 0xce, 0xd1, 0x60, 0x52, + 0x47, 0x96, 0x1d, 0xf6, 0xc9, 0x60, 0x0a, 0x87, 0xbd, 0xf3, 0x61, 0x62, 0x42, 0x4c, 0x38, 0xc0, + 0x6f, 0x44, 0x2c, 0x9d, 0x25, 0xcc, 0x84, 0xec, 0x04, 0x6a, 0xf2, 0xec, 0x13, 0x97, 0xfd, 0x20, + 0x4a, 0x64, 0x74, 0x9f, 0xe5, 0xb2, 0x10, 0xbb, 0x9a, 0xcb, 0x9b, 0xd2, 0x65, 0xc9, 0x91, 0x57, + 0x1b, 0x61, 0x42, 0x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x4d, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/sdk/proto/provider.proto b/sdk/proto/provider.proto index f38fa1de4..74042d6c9 100644 --- a/sdk/proto/provider.proto +++ b/sdk/proto/provider.proto @@ -269,6 +269,7 @@ message ConstructRequest { map providers = 13; // the map of providers to use for this resource's children. repeated string aliases = 14; // a list of additional URNs that shoud be considered the same. repeated string dependencies = 15; // a list of URNs that this resource depends on, as observed by the language host. + repeated string configSecretKeys = 16; // the configuration keys that have secret values. } message ConstructResponse { diff --git a/sdk/python/lib/pulumi/provider/server.py b/sdk/python/lib/pulumi/provider/server.py index f7e302f34..237f2ca69 100644 --- a/sdk/python/lib/pulumi/provider/server.py +++ b/sdk/python/lib/pulumi/provider/server.py @@ -70,7 +70,7 @@ class ProviderServicer(ResourceProviderServicer): monitor_address=_empty_as_none(request.monitorEndpoint), preview=request.dryRun) - pulumi.runtime.config.set_all_config(dict(request.config)) + pulumi.runtime.config.set_all_config(dict(request.config), request.configSecretKeys) inputs = self._construct_inputs(request) diff --git a/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py b/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py index 60b3441d6..8ef89348e 100644 --- a/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py @@ -21,7 +21,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='pulumirpc', syntax='proto3', serialized_options=None, - serialized_pb=b'\n\x0eprovider.proto\x12\tpulumirpc\x1a\x0cplugin.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"#\n\x10GetSchemaRequest\x12\x0f\n\x07version\x18\x01 \x01(\x05\"#\n\x11GetSchemaResponse\x12\x0e\n\x06schema\x18\x01 \x01(\t\"\xda\x01\n\x10\x43onfigureRequest\x12=\n\tvariables\x18\x01 \x03(\x0b\x32*.pulumirpc.ConfigureRequest.VariablesEntry\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\racceptSecrets\x18\x03 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x04 \x01(\x08\x1a\x30\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\\\n\x11\x43onfigureResponse\x12\x15\n\racceptSecrets\x18\x01 \x01(\x08\x12\x17\n\x0fsupportsPreview\x18\x02 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x03 \x01(\x08\"\x92\x01\n\x19\x43onfigureErrorMissingKeys\x12\x44\n\x0bmissingKeys\x18\x01 \x03(\x0b\x32/.pulumirpc.ConfigureErrorMissingKeys.MissingKey\x1a/\n\nMissingKey\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"\x7f\n\rInvokeRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08provider\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x05 \x01(\x08\"d\n\x0eInvokeResponse\x12\'\n\x06return\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x17.pulumirpc.CheckFailure\"i\n\x0c\x43heckRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12%\n\x04olds\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"c\n\rCheckResponse\x12\'\n\x06inputs\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x17.pulumirpc.CheckFailure\"0\n\x0c\x43heckFailure\x12\x10\n\x08property\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t\"\x8b\x01\n\x0b\x44iffRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12%\n\x04olds\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\rignoreChanges\x18\x05 \x03(\t\"\xaf\x01\n\x0cPropertyDiff\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x1c.pulumirpc.PropertyDiff.Kind\x12\x11\n\tinputDiff\x18\x02 \x01(\x08\"`\n\x04Kind\x12\x07\n\x03\x41\x44\x44\x10\x00\x12\x0f\n\x0b\x41\x44\x44_REPLACE\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\x12\n\x0e\x44\x45LETE_REPLACE\x10\x03\x12\n\n\x06UPDATE\x10\x04\x12\x12\n\x0eUPDATE_REPLACE\x10\x05\"\xfa\x02\n\x0c\x44iffResponse\x12\x10\n\x08replaces\x18\x01 \x03(\t\x12\x0f\n\x07stables\x18\x02 \x03(\t\x12\x1b\n\x13\x64\x65leteBeforeReplace\x18\x03 \x01(\x08\x12\x34\n\x07\x63hanges\x18\x04 \x01(\x0e\x32#.pulumirpc.DiffResponse.DiffChanges\x12\r\n\x05\x64iffs\x18\x05 \x03(\t\x12?\n\x0c\x64\x65tailedDiff\x18\x06 \x03(\x0b\x32).pulumirpc.DiffResponse.DetailedDiffEntry\x12\x17\n\x0fhasDetailedDiff\x18\x07 \x01(\x08\x1aL\n\x11\x44\x65tailedDiffEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.pulumirpc.PropertyDiff:\x02\x38\x01\"=\n\x0b\x44iffChanges\x12\x10\n\x0c\x44IFF_UNKNOWN\x10\x00\x12\r\n\tDIFF_NONE\x10\x01\x12\r\n\tDIFF_SOME\x10\x02\"k\n\rCreateRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x03 \x01(\x01\x12\x0f\n\x07preview\x18\x04 \x01(\x08\"I\n\x0e\x43reateResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"|\n\x0bReadRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\'\n\x06inputs\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"p\n\x0cReadResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\'\n\x06inputs\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xaf\x01\n\rUpdateRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12%\n\x04olds\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x05 \x01(\x01\x12\x15\n\rignoreChanges\x18\x06 \x03(\t\x12\x0f\n\x07preview\x18\x07 \x01(\x08\"=\n\x0eUpdateResponse\x12+\n\nproperties\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\"f\n\rDeleteRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x04 \x01(\x01\"\xb4\x05\n\x10\x43onstructRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\r\n\x05stack\x18\x02 \x01(\t\x12\x37\n\x06\x63onfig\x18\x03 \x03(\x0b\x32\'.pulumirpc.ConstructRequest.ConfigEntry\x12\x0e\n\x06\x64ryRun\x18\x04 \x01(\x08\x12\x10\n\x08parallel\x18\x05 \x01(\x05\x12\x17\n\x0fmonitorEndpoint\x18\x06 \x01(\t\x12\x0c\n\x04type\x18\x07 \x01(\t\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x0e\n\x06parent\x18\t \x01(\t\x12\'\n\x06inputs\x18\n \x01(\x0b\x32\x17.google.protobuf.Struct\x12M\n\x11inputDependencies\x18\x0b \x03(\x0b\x32\x32.pulumirpc.ConstructRequest.InputDependenciesEntry\x12\x0f\n\x07protect\x18\x0c \x01(\x08\x12=\n\tproviders\x18\r \x03(\x0b\x32*.pulumirpc.ConstructRequest.ProvidersEntry\x12\x0f\n\x07\x61liases\x18\x0e \x03(\t\x12\x14\n\x0c\x64\x65pendencies\x18\x0f \x03(\t\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aj\n\x16InputDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.pulumirpc.ConstructRequest.PropertyDependencies:\x02\x38\x01\x1a\x30\n\x0eProvidersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xab\x02\n\x11\x43onstructResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12&\n\x05state\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12N\n\x11stateDependencies\x18\x03 \x03(\x0b\x32\x33.pulumirpc.ConstructResponse.StateDependenciesEntry\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1ak\n\x16StateDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.pulumirpc.ConstructResponse.PropertyDependencies:\x02\x38\x01\"\x8c\x01\n\x17\x45rrorResourceInitFailed\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07reasons\x18\x03 \x03(\t\x12\'\n\x06inputs\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct2\xf1\x07\n\x10ResourceProvider\x12H\n\tGetSchema\x12\x1b.pulumirpc.GetSchemaRequest\x1a\x1c.pulumirpc.GetSchemaResponse\"\x00\x12\x42\n\x0b\x43heckConfig\x12\x17.pulumirpc.CheckRequest\x1a\x18.pulumirpc.CheckResponse\"\x00\x12?\n\nDiffConfig\x12\x16.pulumirpc.DiffRequest\x1a\x17.pulumirpc.DiffResponse\"\x00\x12H\n\tConfigure\x12\x1b.pulumirpc.ConfigureRequest\x1a\x1c.pulumirpc.ConfigureResponse\"\x00\x12?\n\x06Invoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x12G\n\x0cStreamInvoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x30\x01\x12<\n\x05\x43heck\x12\x17.pulumirpc.CheckRequest\x1a\x18.pulumirpc.CheckResponse\"\x00\x12\x39\n\x04\x44iff\x12\x16.pulumirpc.DiffRequest\x1a\x17.pulumirpc.DiffResponse\"\x00\x12?\n\x06\x43reate\x12\x18.pulumirpc.CreateRequest\x1a\x19.pulumirpc.CreateResponse\"\x00\x12\x39\n\x04Read\x12\x16.pulumirpc.ReadRequest\x1a\x17.pulumirpc.ReadResponse\"\x00\x12?\n\x06Update\x12\x18.pulumirpc.UpdateRequest\x1a\x19.pulumirpc.UpdateResponse\"\x00\x12<\n\x06\x44\x65lete\x12\x18.pulumirpc.DeleteRequest\x1a\x16.google.protobuf.Empty\"\x00\x12H\n\tConstruct\x12\x1b.pulumirpc.ConstructRequest\x1a\x1c.pulumirpc.ConstructResponse\"\x00\x12:\n\x06\x43\x61ncel\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12@\n\rGetPluginInfo\x12\x16.google.protobuf.Empty\x1a\x15.pulumirpc.PluginInfo\"\x00\x62\x06proto3' + serialized_pb=b'\n\x0eprovider.proto\x12\tpulumirpc\x1a\x0cplugin.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"#\n\x10GetSchemaRequest\x12\x0f\n\x07version\x18\x01 \x01(\x05\"#\n\x11GetSchemaResponse\x12\x0e\n\x06schema\x18\x01 \x01(\t\"\xda\x01\n\x10\x43onfigureRequest\x12=\n\tvariables\x18\x01 \x03(\x0b\x32*.pulumirpc.ConfigureRequest.VariablesEntry\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\racceptSecrets\x18\x03 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x04 \x01(\x08\x1a\x30\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\\\n\x11\x43onfigureResponse\x12\x15\n\racceptSecrets\x18\x01 \x01(\x08\x12\x17\n\x0fsupportsPreview\x18\x02 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x03 \x01(\x08\"\x92\x01\n\x19\x43onfigureErrorMissingKeys\x12\x44\n\x0bmissingKeys\x18\x01 \x03(\x0b\x32/.pulumirpc.ConfigureErrorMissingKeys.MissingKey\x1a/\n\nMissingKey\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"\x7f\n\rInvokeRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08provider\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x05 \x01(\x08\"d\n\x0eInvokeResponse\x12\'\n\x06return\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x17.pulumirpc.CheckFailure\"i\n\x0c\x43heckRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12%\n\x04olds\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"c\n\rCheckResponse\x12\'\n\x06inputs\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x17.pulumirpc.CheckFailure\"0\n\x0c\x43heckFailure\x12\x10\n\x08property\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t\"\x8b\x01\n\x0b\x44iffRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12%\n\x04olds\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\rignoreChanges\x18\x05 \x03(\t\"\xaf\x01\n\x0cPropertyDiff\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x1c.pulumirpc.PropertyDiff.Kind\x12\x11\n\tinputDiff\x18\x02 \x01(\x08\"`\n\x04Kind\x12\x07\n\x03\x41\x44\x44\x10\x00\x12\x0f\n\x0b\x41\x44\x44_REPLACE\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\x12\n\x0e\x44\x45LETE_REPLACE\x10\x03\x12\n\n\x06UPDATE\x10\x04\x12\x12\n\x0eUPDATE_REPLACE\x10\x05\"\xfa\x02\n\x0c\x44iffResponse\x12\x10\n\x08replaces\x18\x01 \x03(\t\x12\x0f\n\x07stables\x18\x02 \x03(\t\x12\x1b\n\x13\x64\x65leteBeforeReplace\x18\x03 \x01(\x08\x12\x34\n\x07\x63hanges\x18\x04 \x01(\x0e\x32#.pulumirpc.DiffResponse.DiffChanges\x12\r\n\x05\x64iffs\x18\x05 \x03(\t\x12?\n\x0c\x64\x65tailedDiff\x18\x06 \x03(\x0b\x32).pulumirpc.DiffResponse.DetailedDiffEntry\x12\x17\n\x0fhasDetailedDiff\x18\x07 \x01(\x08\x1aL\n\x11\x44\x65tailedDiffEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.pulumirpc.PropertyDiff:\x02\x38\x01\"=\n\x0b\x44iffChanges\x12\x10\n\x0c\x44IFF_UNKNOWN\x10\x00\x12\r\n\tDIFF_NONE\x10\x01\x12\r\n\tDIFF_SOME\x10\x02\"k\n\rCreateRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x03 \x01(\x01\x12\x0f\n\x07preview\x18\x04 \x01(\x08\"I\n\x0e\x43reateResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"|\n\x0bReadRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\'\n\x06inputs\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"p\n\x0cReadResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\'\n\x06inputs\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xaf\x01\n\rUpdateRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12%\n\x04olds\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x05 \x01(\x01\x12\x15\n\rignoreChanges\x18\x06 \x03(\t\x12\x0f\n\x07preview\x18\x07 \x01(\x08\"=\n\x0eUpdateResponse\x12+\n\nproperties\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\"f\n\rDeleteRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x04 \x01(\x01\"\xce\x05\n\x10\x43onstructRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\r\n\x05stack\x18\x02 \x01(\t\x12\x37\n\x06\x63onfig\x18\x03 \x03(\x0b\x32\'.pulumirpc.ConstructRequest.ConfigEntry\x12\x0e\n\x06\x64ryRun\x18\x04 \x01(\x08\x12\x10\n\x08parallel\x18\x05 \x01(\x05\x12\x17\n\x0fmonitorEndpoint\x18\x06 \x01(\t\x12\x0c\n\x04type\x18\x07 \x01(\t\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x0e\n\x06parent\x18\t \x01(\t\x12\'\n\x06inputs\x18\n \x01(\x0b\x32\x17.google.protobuf.Struct\x12M\n\x11inputDependencies\x18\x0b \x03(\x0b\x32\x32.pulumirpc.ConstructRequest.InputDependenciesEntry\x12\x0f\n\x07protect\x18\x0c \x01(\x08\x12=\n\tproviders\x18\r \x03(\x0b\x32*.pulumirpc.ConstructRequest.ProvidersEntry\x12\x0f\n\x07\x61liases\x18\x0e \x03(\t\x12\x14\n\x0c\x64\x65pendencies\x18\x0f \x03(\t\x12\x18\n\x10\x63onfigSecretKeys\x18\x10 \x03(\t\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aj\n\x16InputDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.pulumirpc.ConstructRequest.PropertyDependencies:\x02\x38\x01\x1a\x30\n\x0eProvidersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xab\x02\n\x11\x43onstructResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12&\n\x05state\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12N\n\x11stateDependencies\x18\x03 \x03(\x0b\x32\x33.pulumirpc.ConstructResponse.StateDependenciesEntry\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1ak\n\x16StateDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.pulumirpc.ConstructResponse.PropertyDependencies:\x02\x38\x01\"\x8c\x01\n\x17\x45rrorResourceInitFailed\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07reasons\x18\x03 \x03(\t\x12\'\n\x06inputs\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct2\xf1\x07\n\x10ResourceProvider\x12H\n\tGetSchema\x12\x1b.pulumirpc.GetSchemaRequest\x1a\x1c.pulumirpc.GetSchemaResponse\"\x00\x12\x42\n\x0b\x43heckConfig\x12\x17.pulumirpc.CheckRequest\x1a\x18.pulumirpc.CheckResponse\"\x00\x12?\n\nDiffConfig\x12\x16.pulumirpc.DiffRequest\x1a\x17.pulumirpc.DiffResponse\"\x00\x12H\n\tConfigure\x12\x1b.pulumirpc.ConfigureRequest\x1a\x1c.pulumirpc.ConfigureResponse\"\x00\x12?\n\x06Invoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x12G\n\x0cStreamInvoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x30\x01\x12<\n\x05\x43heck\x12\x17.pulumirpc.CheckRequest\x1a\x18.pulumirpc.CheckResponse\"\x00\x12\x39\n\x04\x44iff\x12\x16.pulumirpc.DiffRequest\x1a\x17.pulumirpc.DiffResponse\"\x00\x12?\n\x06\x43reate\x12\x18.pulumirpc.CreateRequest\x1a\x19.pulumirpc.CreateResponse\"\x00\x12\x39\n\x04Read\x12\x16.pulumirpc.ReadRequest\x1a\x17.pulumirpc.ReadResponse\"\x00\x12?\n\x06Update\x12\x18.pulumirpc.UpdateRequest\x1a\x19.pulumirpc.UpdateResponse\"\x00\x12<\n\x06\x44\x65lete\x12\x18.pulumirpc.DeleteRequest\x1a\x16.google.protobuf.Empty\"\x00\x12H\n\tConstruct\x12\x1b.pulumirpc.ConstructRequest\x1a\x1c.pulumirpc.ConstructResponse\"\x00\x12:\n\x06\x43\x61ncel\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12@\n\rGetPluginInfo\x12\x16.google.protobuf.Empty\x1a\x15.pulumirpc.PluginInfo\"\x00\x62\x06proto3' , dependencies=[plugin__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) @@ -1152,8 +1152,8 @@ _CONSTRUCTREQUEST_PROPERTYDEPENDENCIES = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3051, - serialized_end=3087, + serialized_start=3077, + serialized_end=3113, ) _CONSTRUCTREQUEST_CONFIGENTRY = _descriptor.Descriptor( @@ -1189,8 +1189,8 @@ _CONSTRUCTREQUEST_CONFIGENTRY = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3089, - serialized_end=3134, + serialized_start=3115, + serialized_end=3160, ) _CONSTRUCTREQUEST_INPUTDEPENDENCIESENTRY = _descriptor.Descriptor( @@ -1226,8 +1226,8 @@ _CONSTRUCTREQUEST_INPUTDEPENDENCIESENTRY = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3136, - serialized_end=3242, + serialized_start=3162, + serialized_end=3268, ) _CONSTRUCTREQUEST_PROVIDERSENTRY = _descriptor.Descriptor( @@ -1263,8 +1263,8 @@ _CONSTRUCTREQUEST_PROVIDERSENTRY = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3244, - serialized_end=3292, + serialized_start=3270, + serialized_end=3318, ) _CONSTRUCTREQUEST = _descriptor.Descriptor( @@ -1379,6 +1379,13 @@ _CONSTRUCTREQUEST = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='configSecretKeys', full_name='pulumirpc.ConstructRequest.configSecretKeys', index=15, + number=16, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1392,7 +1399,7 @@ _CONSTRUCTREQUEST = _descriptor.Descriptor( oneofs=[ ], serialized_start=2600, - serialized_end=3292, + serialized_end=3318, ) @@ -1422,8 +1429,8 @@ _CONSTRUCTRESPONSE_PROPERTYDEPENDENCIES = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3051, - serialized_end=3087, + serialized_start=3077, + serialized_end=3113, ) _CONSTRUCTRESPONSE_STATEDEPENDENCIESENTRY = _descriptor.Descriptor( @@ -1459,8 +1466,8 @@ _CONSTRUCTRESPONSE_STATEDEPENDENCIESENTRY = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3487, - serialized_end=3594, + serialized_start=3513, + serialized_end=3620, ) _CONSTRUCTRESPONSE = _descriptor.Descriptor( @@ -1503,8 +1510,8 @@ _CONSTRUCTRESPONSE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3295, - serialized_end=3594, + serialized_start=3321, + serialized_end=3620, ) @@ -1555,8 +1562,8 @@ _ERRORRESOURCEINITFAILED = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3597, - serialized_end=3737, + serialized_start=3623, + serialized_end=3763, ) _CONFIGUREREQUEST_VARIABLESENTRY.containing_type = _CONFIGUREREQUEST @@ -1878,8 +1885,8 @@ _RESOURCEPROVIDER = _descriptor.ServiceDescriptor( file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=3740, - serialized_end=4749, + serialized_start=3766, + serialized_end=4775, methods=[ _descriptor.MethodDescriptor( name='GetSchema', diff --git a/sdk/python/lib/pulumi/runtime/proto/provider_pb2.pyi b/sdk/python/lib/pulumi/runtime/proto/provider_pb2.pyi index 25694d791..40adfa6d2 100644 --- a/sdk/python/lib/pulumi/runtime/proto/provider_pb2.pyi +++ b/sdk/python/lib/pulumi/runtime/proto/provider_pb2.pyi @@ -41,6 +41,7 @@ class ConstructRequest: providers: Dict[str, str] aliases: List[str] dependencies: List[str] + configSecretKeys: List[str] class ConstructResponse: diff --git a/tests/integration/construct_component/dotnet/Component.cs b/tests/integration/construct_component/dotnet/Component.cs index 0d17afffc..4ca21c19b 100644 --- a/tests/integration/construct_component/dotnet/Component.cs +++ b/tests/integration/construct_component/dotnet/Component.cs @@ -16,6 +16,9 @@ class Component : Pulumi.ComponentResource [Output("childId")] public Output ChildId { get; private set; } = null!; + [Output("secret")] + public Output Secret { get; private set; } = null!; + public Component(string name, ComponentArgs args, ComponentResourceOptions opts = null) : base("testcomponent:index:Component", name, args, opts, remote: true) { diff --git a/tests/integration/construct_component/go/main.go b/tests/integration/construct_component/go/main.go index 051eaaa0d..d1bbe1645 100644 --- a/tests/integration/construct_component/go/main.go +++ b/tests/integration/construct_component/go/main.go @@ -25,6 +25,7 @@ type Component struct { Echo pulumi.AnyOutput `pulumi:"echo"` ChildID pulumi.StringOutput `pulumi:"childId"` + Secret pulumi.StringOutput `pulumi:"secret"` } func NewComponent( diff --git a/tests/integration/construct_component/nodejs/component.ts b/tests/integration/construct_component/nodejs/component.ts index a98c770d8..3e6f448c0 100644 --- a/tests/integration/construct_component/nodejs/component.ts +++ b/tests/integration/construct_component/nodejs/component.ts @@ -14,6 +14,7 @@ export class Component extends pulumi.ComponentResource { const inputs: any = {}; inputs["echo"] = args.echo; inputs["childId"] = undefined /*out*/; + inputs["secret"] = undefined /*out*/; super("testcomponent:index:Component", name, inputs, opts, true); } diff --git a/tests/integration/construct_component/python/component.py b/tests/integration/construct_component/python/component.py index d48f59455..8ca6c5346 100644 --- a/tests/integration/construct_component/python/component.py +++ b/tests/integration/construct_component/python/component.py @@ -12,4 +12,5 @@ class Component(pulumi.ComponentResource): props = dict() props["echo"] = echo props["childId"] = None + props["secret"] = None super().__init__("testcomponent:index:Component", name, props, opts, True) diff --git a/tests/integration/construct_component/testcomponent-go/main.go b/tests/integration/construct_component/testcomponent-go/main.go index e8ce32ed8..42a0a66a2 100644 --- a/tests/integration/construct_component/testcomponent-go/main.go +++ b/tests/integration/construct_component/testcomponent-go/main.go @@ -13,6 +13,7 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/common/resource" "github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" pulumiprovider "github.com/pulumi/pulumi/sdk/v3/go/pulumi/provider" pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go" @@ -49,8 +50,9 @@ func NewResource(ctx *pulumi.Context, name string, echo pulumi.Input, type Component struct { pulumi.ResourceState - Echo pulumi.Input `pulumi:"echo"` - ChildID pulumi.IDOutput `pulumi:"childId"` + Echo pulumi.Input `pulumi:"echo"` + ChildID pulumi.IDOutput `pulumi:"childId"` + Secret pulumi.StringOutput `pulumi:"secret"` } type ComponentArgs struct { @@ -63,6 +65,15 @@ func NewComponent(ctx *pulumi.Context, name string, args *ComponentArgs, return nil, errors.New("args is required") } + secretKey := "secret" + fullSecretKey := fmt.Sprintf("%s:%s", ctx.Project(), secretKey) + if !ctx.IsConfigSecret(fullSecretKey) { + return nil, errors.Errorf("expected configuration key to be secret: %s", fullSecretKey) + } + + conf := config.New(ctx, "") + secret := conf.RequireSecret(secretKey) + component := &Component{} err := ctx.RegisterComponentResource("testcomponent:index:Component", name, component, opts...) if err != nil { @@ -76,8 +87,13 @@ func NewComponent(ctx *pulumi.Context, name string, args *ComponentArgs, component.Echo = args.Echo component.ChildID = res.ID() + component.Secret = secret - if err := ctx.RegisterResourceOutputs(component, pulumi.Map{}); err != nil { + if err := ctx.RegisterResourceOutputs(component, pulumi.Map{ + "secret": component.Secret, + "echo": component.Echo, + "childId": component.ChildID, + }); err != nil { return nil, err } diff --git a/tests/integration/construct_component/testcomponent-python/testcomponent.py b/tests/integration/construct_component/testcomponent-python/testcomponent.py index 0d1685a24..4bce232ea 100644 --- a/tests/integration/construct_component/testcomponent-python/testcomponent.py +++ b/tests/integration/construct_component/testcomponent-python/testcomponent.py @@ -18,6 +18,7 @@ import sys from pulumi import Input, Inputs, ComponentResource, ResourceOptions import pulumi import pulumi.dynamic as dynamic +import pulumi.runtime.config as config import pulumi.provider as provider @@ -38,11 +39,17 @@ class Resource(dynamic.Resource): class Component(ComponentResource): - def __init__(self, name: str, echo: Input[any], opts: Optional[ResourceOptions]=None): + def __init__(self, name: str, echo: Input[any], secret: Input[str], opts: Optional[ResourceOptions]=None): super().__init__('testcomponent:index:Component', name, {}, opts) self.echo = pulumi.Output.from_input(echo) resource = Resource('child-{}'.format(name), echo, ResourceOptions(parent=self)) self.child_id = resource.id + self.secret = secret + self.register_outputs({ + 'childId': self.child_id, + 'echo': self.echo, + 'secret': self.secret + }) class Provider(provider.Provider): @@ -56,14 +63,22 @@ class Provider(provider.Provider): if resource_type != 'testcomponent:index:Component': raise Exception('unknown resource type {}'.format(resource_type)) + - component = Component(name, inputs['echo'], options) + secret_key = "secret" + cfg = pulumi.Config() + full_secret_key = cfg.full_key(secret_key) + if not config.is_config_secret(full_secret_key): + raise Exception('expected config for key to be secret: {}'.format(full_secret_key)) + secret = cfg.require_secret('secret') + component = Component(name, inputs['echo'], secret, options) return provider.ConstructResult( urn=component.urn, state={ 'echo': component.echo, - 'childId': component.child_id + 'childId': component.child_id, + 'secret': component.secret }) diff --git a/tests/integration/construct_component/testcomponent/index.ts b/tests/integration/construct_component/testcomponent/index.ts index 34856a95c..6eaf723b1 100644 --- a/tests/integration/construct_component/testcomponent/index.ts +++ b/tests/integration/construct_component/testcomponent/index.ts @@ -20,12 +20,20 @@ class Resource extends dynamic.Resource { class Component extends pulumi.ComponentResource { public readonly echo: pulumi.Output; public readonly childId: pulumi.Output; + public readonly secret: pulumi.Output; - constructor(name: string, echo: pulumi.Input, opts?: pulumi.ComponentResourceOptions) { + constructor(name: string, echo: pulumi.Input, secret: pulumi.Output, opts?: pulumi.ComponentResourceOptions) { super("testcomponent:index:Component", name, {}, opts); this.echo = pulumi.output(echo); this.childId = (new Resource(`child-${name}`, echo, {parent: this})).id; + this.secret = secret; + + this.registerOutputs({ + echo: this.echo, + childId: this.childId, + secret: this.secret, + }) } } @@ -38,12 +46,24 @@ class Provider implements provider.Provider { throw new Error(`unknown resource type ${type}`); } - const component = new Component(name, inputs["echo"], options); + const config = new pulumi.Config(); + const secretKey = "secret"; + const fullSecretKey = `${config.name}:${secretKey}`; + // use internal pulumi prop to check secretness + const isSecret = (pulumi.runtime as any).isConfigSecret(fullSecretKey); + if (!isSecret) { + throw new Error(`expected config with key "${secretKey}" to be secret.`) + } + const secret = config.requireSecret(secretKey); + + + const component = new Component(name, inputs["echo"], secret, options); return Promise.resolve({ urn: component.urn, state: { echo: component.echo, childId: component.childId, + secret: secret, }, }); } diff --git a/tests/integration/integration_dotnet_test.go b/tests/integration/integration_dotnet_test.go index 18f19f5fb..5c8deba54 100644 --- a/tests/integration/integration_dotnet_test.go +++ b/tests/integration/integration_dotnet_test.go @@ -359,8 +359,11 @@ func optsForConstructDotnet(t *testing.T, expectedResourceCount int, env ...stri Env: env, Dir: filepath.Join("construct_component", "dotnet"), Dependencies: []string{"Pulumi"}, - Quick: true, - NoParallel: true, // avoid contention for Dir + Secrets: map[string]string{ + "secret": "this super secret is encrypted", + }, + Quick: true, + NoParallel: true, // avoid contention for Dir ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { assert.NotNil(t, stackInfo.Deployment) if assert.Equal(t, expectedResourceCount, len(stackInfo.Deployment.Resources)) { @@ -383,6 +386,10 @@ func optsForConstructDotnet(t *testing.T, expectedResourceCount int, env ...stri } case "child-c": assert.Equal(t, []resource.URN{urns["child-a"]}, res.PropertyDependencies["echo"]) + case "a", "b", "c": + secretPropValue, ok := res.Outputs["secret"].(map[string]interface{}) + assert.Truef(t, ok, "secret output was not serialized as a secret") + assert.Equal(t, resource.SecretSig, secretPropValue[resource.SigKey].(string)) } } } diff --git a/tests/integration/integration_go_test.go b/tests/integration/integration_go_test.go index bd65456f3..213247f3a 100644 --- a/tests/integration/integration_go_test.go +++ b/tests/integration/integration_go_test.go @@ -448,6 +448,9 @@ func optsForConstructGo(t *testing.T, expectedResourceCount int, env ...string) Dependencies: []string{ "github.com/pulumi/pulumi/sdk/v3", }, + Secrets: map[string]string{ + "secret": "this super secret is encrypted", + }, Quick: true, NoParallel: true, // avoid contention for Dir ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { @@ -475,6 +478,10 @@ func optsForConstructGo(t *testing.T, expectedResourceCount int, env ...string) case "child-c": assert.ElementsMatch(t, []resource.URN{urns["child-a"], urns["a"]}, res.PropertyDependencies["echo"]) + case "a", "b", "c": + secretPropValue, ok := res.Outputs["secret"].(map[string]interface{}) + assert.Truef(t, ok, "secret output was not serialized as a secret") + assert.Equal(t, resource.SecretSig, secretPropValue[resource.SigKey].(string)) } } } diff --git a/tests/integration/integration_nodejs_test.go b/tests/integration/integration_nodejs_test.go index 5b7c6d026..0bbb0ce43 100644 --- a/tests/integration/integration_nodejs_test.go +++ b/tests/integration/integration_nodejs_test.go @@ -887,8 +887,11 @@ func optsForConstructNode(t *testing.T, expectedResourceCount int, env ...string Env: env, Dir: filepath.Join("construct_component", "nodejs"), Dependencies: []string{"@pulumi/pulumi"}, - Quick: true, - NoParallel: true, + Secrets: map[string]string{ + "secret": "this super secret is encrypted", + }, + Quick: true, + NoParallel: true, ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { assert.NotNil(t, stackInfo.Deployment) if assert.Equal(t, expectedResourceCount, len(stackInfo.Deployment.Resources)) { @@ -911,6 +914,10 @@ func optsForConstructNode(t *testing.T, expectedResourceCount int, env ...string } case "child-c": assert.Equal(t, []resource.URN{urns["child-a"]}, res.PropertyDependencies["echo"]) + case "a", "b", "c": + secretPropValue, ok := res.Outputs["secret"].(map[string]interface{}) + assert.Truef(t, ok, "secret output was not serialized as a secret") + assert.Equal(t, resource.SecretSig, secretPropValue[resource.SigKey].(string)) } } } diff --git a/tests/integration/integration_python_test.go b/tests/integration/integration_python_test.go index a7d6860b0..f6c86dae2 100644 --- a/tests/integration/integration_python_test.go +++ b/tests/integration/integration_python_test.go @@ -561,6 +561,9 @@ func optsForConstructPython(t *testing.T, expectedResourceCount int, env ...stri Dependencies: []string{ filepath.Join("..", "..", "sdk", "python", "env", "src"), }, + Secrets: map[string]string{ + "secret": "this super secret is encrypted", + }, Quick: true, NoParallel: true, // avoid contention for Dir ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { @@ -588,6 +591,10 @@ func optsForConstructPython(t *testing.T, expectedResourceCount int, env ...stri case "child-c": assert.ElementsMatch(t, []resource.URN{urns["child-a"], urns["a"]}, res.PropertyDependencies["echo"]) + case "a", "b", "c": + secretPropValue, ok := res.Outputs["secret"].(map[string]interface{}) + assert.Truef(t, ok, "secret output was not serialized as a secret") + assert.Equal(t, resource.SecretSig, secretPropValue[resource.SigKey].(string)) } } }