diff --git a/pkg/backend/display/json.go b/pkg/backend/display/json.go index f4403ee45066..95624526f0b5 100644 --- a/pkg/backend/display/json.go +++ b/pkg/backend/display/json.go @@ -85,7 +85,7 @@ func stateForJSONOutput(s *resource.State, opts Options) *resource.State { return resource.NewState(s.Type, s.URN, s.Custom, s.Delete, s.ID, inputs, outputs, s.Parent, s.Protect, s.External, s.Dependencies, s.InitErrors, s.Provider, s.PropertyDependencies, s.PendingReplacement, s.AdditionalSecretOutputs, s.Aliases, &s.CustomTimeouts, - s.ImportID, s.RetainOnDelete) + s.ImportID, s.RetainOnDelete, s.DeletedWith) } // ShowJSONEvents renders incremental engine events to stdout. diff --git a/pkg/backend/snapshot.go b/pkg/backend/snapshot.go index b1a2d5ef132d..4458b7be4862 100644 --- a/pkg/backend/snapshot.go +++ b/pkg/backend/snapshot.go @@ -231,6 +231,12 @@ func (ssm *sameSnapshotMutation) mustWrite(step *deploy.SameStep) bool { return true } + // If the DeletedWith attribute of this resource has changed, we must write the checkpoint. + if old.DeletedWith != new.DeletedWith { + logging.V(9).Infof("SnapshotManager: mustWrite() true because of DeletedWith") + return true + } + // If the protection attribute of this resource has changed, we must write the checkpoint. if old.Protect != new.Protect { logging.V(9).Infof("SnapshotManager: mustWrite() true because of Protect") diff --git a/pkg/backend/snapshot_test.go b/pkg/backend/snapshot_test.go index 0ee84587b349..93727192036b 100644 --- a/pkg/backend/snapshot_test.go +++ b/pkg/backend/snapshot_test.go @@ -603,7 +603,7 @@ func TestDeletion(t *testing.T) { }) manager, sp := MockSetup(t, snap) - step := deploy.NewDeleteStep(nil, resourceA) + step := deploy.NewDeleteStep(nil, map[resource.URN]bool{}, resourceA) mutation, err := manager.BeginMutation(step) if !assert.NoError(t, err) { t.FailNow() @@ -629,7 +629,7 @@ func TestFailedDelete(t *testing.T) { }) manager, sp := MockSetup(t, snap) - step := deploy.NewDeleteStep(nil, resourceA) + step := deploy.NewDeleteStep(nil, map[resource.URN]bool{}, resourceA) mutation, err := manager.BeginMutation(step) if !assert.NoError(t, err) { t.FailNow() @@ -802,7 +802,7 @@ func TestRecordingDeleteSuccess(t *testing.T) { resourceA, }) manager, sp := MockSetup(t, snap) - step := deploy.NewDeleteStep(nil, resourceA) + step := deploy.NewDeleteStep(nil, map[resource.URN]bool{}, resourceA) mutation, err := manager.BeginMutation(step) if !assert.NoError(t, err) { t.FailNow() @@ -834,7 +834,7 @@ func TestRecordingDeleteFailure(t *testing.T) { resourceA, }) manager, sp := MockSetup(t, snap) - step := deploy.NewDeleteStep(nil, resourceA) + step := deploy.NewDeleteStep(nil, map[resource.URN]bool{}, resourceA) mutation, err := manager.BeginMutation(step) if !assert.NoError(t, err) { t.FailNow() diff --git a/pkg/engine/lifecycletest/pulumi_test.go b/pkg/engine/lifecycletest/pulumi_test.go index d5b57ee64ab6..e6a07cd9f760 100644 --- a/pkg/engine/lifecycletest/pulumi_test.go +++ b/pkg/engine/lifecycletest/pulumi_test.go @@ -3702,6 +3702,214 @@ func TestRetainOnDelete(t *testing.T) { assert.Len(t, snap.Resources, 0) } +func TestDeletedWith(t *testing.T) { + t.Parallel() + + idCounter := 0 + + topURN := resource.URN("") + + loaders := []*deploytest.ProviderLoader{ + deploytest.NewProviderLoader("pkgA", semver.MustParse("1.0.0"), func() (plugin.Provider, error) { + return &deploytest.Provider{ + DiffF: func( + urn resource.URN, + id resource.ID, + olds, news resource.PropertyMap, + ignoreChanges []string) (plugin.DiffResult, error) { + if !olds["foo"].DeepEquals(news["foo"]) { + // If foo changes do a replace, we use this to check we don't delete on replace + return plugin.DiffResult{ + Changes: plugin.DiffSome, + ReplaceKeys: []resource.PropertyKey{"foo"}, + }, nil + } + return plugin.DiffResult{}, nil + }, + CreateF: func(urn resource.URN, news resource.PropertyMap, timeout float64, + preview bool) (resource.ID, resource.PropertyMap, resource.Status, error) { + resourceID := resource.ID(fmt.Sprintf("created-id-%d", idCounter)) + idCounter = idCounter + 1 + return resourceID, news, resource.StatusOK, nil + }, + DeleteF: func(urn resource.URN, id resource.ID, olds resource.PropertyMap, + timeout float64) (resource.Status, error) { + if urn != topURN { + // Only top parent should be actually deleted + assert.Fail(t, "Delete was called") + } + return resource.StatusOK, nil + }, + }, nil + }, deploytest.WithoutGrpc), + } + + ins := resource.NewPropertyMapFromMap(map[string]interface{}{ + "foo": "bar", + }) + + createResource := true + + program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error { + + if createResource { + aURN, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, deploytest.ResourceOptions{ + Inputs: ins, + }) + assert.NoError(t, err) + topURN = aURN + + bURN, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resB", true, deploytest.ResourceOptions{ + Inputs: ins, + DeletedWith: aURN, + }) + assert.NoError(t, err) + + _, _, _, err = monitor.RegisterResource("pkgA:m:typA", "resC", true, deploytest.ResourceOptions{ + Inputs: ins, + DeletedWith: bURN, + }) + assert.NoError(t, err) + } + + return nil + }) + host := deploytest.NewPluginHost(nil, nil, program, loaders...) + + p := &TestPlan{ + Options: UpdateOptions{Host: host}, + } + + project := p.GetProject() + + // Run an update to create the resource + snap, res := TestOp(Update).Run(project, p.GetTarget(t, nil), p.Options, false, p.BackendClient, nil) + assert.Nil(t, res) + assert.NotNil(t, snap) + assert.Len(t, snap.Resources, 4) + assert.Equal(t, "created-id-0", snap.Resources[1].ID.String()) + assert.Equal(t, "created-id-1", snap.Resources[2].ID.String()) + assert.Equal(t, "created-id-2", snap.Resources[3].ID.String()) + + // Run a new update which will cause a replace, we shouldn't see a provider delete but should get a new id + ins = resource.NewPropertyMapFromMap(map[string]interface{}{ + "foo": "baz", + }) + snap, res = TestOp(Update).Run(project, p.GetTarget(t, snap), p.Options, false, p.BackendClient, nil) + assert.Nil(t, res) + assert.NotNil(t, snap) + assert.Len(t, snap.Resources, 4) + assert.Equal(t, "created-id-3", snap.Resources[1].ID.String()) + assert.Equal(t, "created-id-4", snap.Resources[2].ID.String()) + assert.Equal(t, "created-id-5", snap.Resources[3].ID.String()) + + // Run a new update which will cause a delete, we still shouldn't see a provider delete + createResource = false + snap, res = TestOp(Update).Run(project, p.GetTarget(t, snap), p.Options, false, p.BackendClient, nil) + assert.Nil(t, res) + assert.NotNil(t, snap) + assert.Len(t, snap.Resources, 0) +} + +func TestDeletedWithCircularDependency(t *testing.T) { + // This test should be removed if DeletedWith circular dependency is taken care of. + // At the mean time, if there is a circular dependency - none shall be deleted. + t.Parallel() + + idCounter := 0 + + loaders := []*deploytest.ProviderLoader{ + deploytest.NewProviderLoader("pkgA", semver.MustParse("1.0.0"), func() (plugin.Provider, error) { + return &deploytest.Provider{ + DiffF: func( + urn resource.URN, + id resource.ID, + olds, news resource.PropertyMap, + ignoreChanges []string) (plugin.DiffResult, error) { + return plugin.DiffResult{}, nil + }, + CreateF: func(urn resource.URN, news resource.PropertyMap, timeout float64, + preview bool) (resource.ID, resource.PropertyMap, resource.Status, error) { + resourceID := resource.ID(fmt.Sprintf("created-id-%d", idCounter)) + idCounter = idCounter + 1 + return resourceID, news, resource.StatusOK, nil + }, + DeleteF: func(urn resource.URN, id resource.ID, olds resource.PropertyMap, + timeout float64) (resource.Status, error) { + + assert.Fail(t, "Delete was called") + + return resource.StatusOK, nil + }, + }, nil + }, deploytest.WithoutGrpc), + } + + ins := resource.NewPropertyMapFromMap(map[string]interface{}{ + "foo": "bar", + }) + + createResource := true + cURN := resource.URN("") + + program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error { + + if createResource { + aURN, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, deploytest.ResourceOptions{ + Inputs: ins, + DeletedWith: cURN, + }) + assert.NoError(t, err) + + bURN, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resB", true, deploytest.ResourceOptions{ + Inputs: ins, + DeletedWith: aURN, + }) + assert.NoError(t, err) + + cURN, _, _, err = monitor.RegisterResource("pkgA:m:typA", "resC", true, deploytest.ResourceOptions{ + Inputs: ins, + DeletedWith: bURN, + }) + assert.NoError(t, err) + } + + return nil + }) + host := deploytest.NewPluginHost(nil, nil, program, loaders...) + + p := &TestPlan{ + Options: UpdateOptions{Host: host}, + } + + project := p.GetProject() + + // Run an update to create the resource + snap, res := TestOp(Update).Run(project, p.GetTarget(t, nil), p.Options, false, p.BackendClient, nil) + assert.Nil(t, res) + assert.NotNil(t, snap) + assert.Len(t, snap.Resources, 4) + assert.Equal(t, "created-id-0", snap.Resources[1].ID.String()) + assert.Equal(t, "created-id-1", snap.Resources[2].ID.String()) + assert.Equal(t, "created-id-2", snap.Resources[3].ID.String()) + + // Run again to update DeleteWith for resA + snap, res = TestOp(Update).Run(project, p.GetTarget(t, snap), p.Options, false, p.BackendClient, nil) + assert.Nil(t, res) + assert.NotNil(t, snap) + assert.Len(t, snap.Resources, 4) + assert.Equal(t, "created-id-0", snap.Resources[1].ID.String()) + assert.Equal(t, "created-id-1", snap.Resources[2].ID.String()) + assert.Equal(t, "created-id-2", snap.Resources[3].ID.String()) + + // Run a new update which will cause a delete, we still shouldn't see a provider delete + createResource = false + snap, res = TestOp(Update).Run(project, p.GetTarget(t, snap), p.Options, false, p.BackendClient, nil) + assert.Nil(t, res) + assert.NotNil(t, snap) + assert.Len(t, snap.Resources, 0) +} + func TestInvalidGetIDReportsUserError(t *testing.T) { t.Parallel() diff --git a/pkg/resource/deploy/deploytest/resourcemonitor.go b/pkg/resource/deploy/deploytest/resourcemonitor.go index a7b3162d86e9..4434083e2933 100644 --- a/pkg/resource/deploy/deploytest/resourcemonitor.go +++ b/pkg/resource/deploy/deploytest/resourcemonitor.go @@ -101,6 +101,7 @@ type ResourceOptions struct { ImportID resource.ID CustomTimeouts *resource.CustomTimeouts RetainOnDelete bool + DeletedWith resource.URN SupportsPartialValues *bool Remote bool Providers map[string]string @@ -222,6 +223,7 @@ func (rm *ResourceMonitor) RegisterResource(t tokens.Type, name string, custom b RetainOnDelete: opts.RetainOnDelete, AdditionalSecretOutputs: additionalSecretOutputs, Aliases: aliasObjects, + DeletedWith: string(opts.DeletedWith), } // submit request diff --git a/pkg/resource/deploy/import.go b/pkg/resource/deploy/import.go index bb4a7413a7b8..3724363c2ace 100644 --- a/pkg/resource/deploy/import.go +++ b/pkg/resource/deploy/import.go @@ -169,7 +169,7 @@ func (i *importer) getOrCreateStackResource(ctx context.Context) (resource.URN, typ, name := resource.RootStackType, fmt.Sprintf("%s-%s", projectName, stackName) urn := resource.NewURN(stackName.Q(), projectName, "", typ, tokens.QName(name)) state := resource.NewState(typ, urn, false, false, "", resource.PropertyMap{}, nil, "", false, false, nil, nil, "", - nil, false, nil, nil, nil, "", false) + nil, false, nil, nil, nil, "", false, "") // TODO(seqnum) should stacks be created with 1? When do they ever get recreated/replaced? if !i.executeSerial(ctx, NewCreateStep(i.deployment, noopEvent(0), state)) { return "", false, false @@ -255,7 +255,7 @@ func (i *importer) registerProviders(ctx context.Context) (map[resource.URN]stri } state := resource.NewState(typ, urn, true, false, "", inputs, nil, "", false, false, nil, nil, "", nil, false, - nil, nil, nil, "", false) + nil, nil, nil, "", false, "") // TODO(seqnum) should default providers be created with 1? When do they ever get recreated/replaced? if issueCheckErrors(i.deployment, state, urn, failures) { return nil, nil, false @@ -355,7 +355,7 @@ func (i *importer) importResources(ctx context.Context) result.Result { // Create the new desired state. Note that the resource is protected. new := resource.NewState(urn.Type(), urn, true, false, imp.ID, resource.PropertyMap{}, nil, parent, imp.Protect, - false, nil, nil, provider, nil, false, nil, nil, nil, "", false) + false, nil, nil, provider, nil, false, nil, nil, nil, "", false, "") steps = append(steps, newImportDeploymentStep(i.deployment, new, randomSeed)) } diff --git a/pkg/resource/deploy/source_eval.go b/pkg/resource/deploy/source_eval.go index fcf806422809..6af2ad6c8d6d 100644 --- a/pkg/resource/deploy/source_eval.go +++ b/pkg/resource/deploy/source_eval.go @@ -330,7 +330,7 @@ func (d *defaultProviders) newRegisterDefaultProviderEvent( goal: resource.NewGoal( providers.MakeProviderType(req.Package()), req.Name(), true, inputs, "", false, nil, "", nil, nil, nil, - nil, nil, nil, "", nil, nil, false), + nil, nil, nil, "", nil, nil, false, ""), done: done, } return event, done, nil @@ -954,6 +954,7 @@ func (rm *resmon) RegisterResource(ctx context.Context, id := resource.ID(req.GetImportId()) customTimeouts := req.GetCustomTimeouts() retainOnDelete := req.GetRetainOnDelete() + deletedWith := resource.URN(req.GetDeletedWith()) // Custom resources must have a three-part type so that we can 1) identify if they are providers and 2) retrieve the // provider responsible for managing a particular resource (based on the type's Package). @@ -1139,9 +1140,9 @@ func (rm *resmon) RegisterResource(ctx context.Context, logging.V(5).Infof( "ResourceMonitor.RegisterResource received: t=%v, name=%v, custom=%v, #props=%v, parent=%v, protect=%v, "+ "provider=%v, deps=%v, deleteBeforeReplace=%v, ignoreChanges=%v, aliases=%v, customTimeouts=%v, "+ - "providers=%v, replaceOnChanges=%v, retainOnDelete=%v", + "providers=%v, replaceOnChanges=%v, retainOnDelete=%v, deletedWith=%v", t, name, custom, len(props), parent, protect, providerRef, dependencies, deleteBeforeReplace, ignoreChanges, - aliases, timeouts, providerRefs, replaceOnChanges, retainOnDelete) + aliases, timeouts, providerRefs, replaceOnChanges, retainOnDelete, deletedWith) // If this is a remote component, fetch its provider and issue the construct call. Otherwise, register the resource. var result *RegisterResult @@ -1187,7 +1188,7 @@ func (rm *resmon) RegisterResource(ctx context.Context, step := ®isterResourceEvent{ goal: resource.NewGoal(t, name, custom, props, parent, protect, dependencies, providerRef.String(), nil, propertyDependencies, deleteBeforeReplace, ignoreChanges, - additionalSecretOutputs, aliases, id, &timeouts, replaceOnChanges, retainOnDelete), + additionalSecretOutputs, aliases, id, &timeouts, replaceOnChanges, retainOnDelete, deletedWith), done: make(chan *RegisterResult), } @@ -1249,6 +1250,7 @@ func (rm *resmon) RegisterResource(ctx context.Context, // • additionalSecretOutputs // • replaceOnChanges // • retainOnDelete + // • deletedWith // Revisit these semantics in Pulumi v4.0 // See this issue for more: https://github.com/pulumi/pulumi/issues/9704 if !custom { @@ -1273,6 +1275,9 @@ func (rm *resmon) RegisterResource(ctx context.Context, rm.checkComponentOption(result.State.URN, "retainOnDelete", func() bool { return retainOnDelete }) + rm.checkComponentOption(result.State.URN, "deletedWith", func() bool { + return deletedWith != "" + }) } logging.V(5).Infof( diff --git a/pkg/resource/deploy/source_eval_test.go b/pkg/resource/deploy/source_eval_test.go index cdc42e8663a1..fb7d8803903f 100644 --- a/pkg/resource/deploy/source_eval_test.go +++ b/pkg/resource/deploy/source_eval_test.go @@ -71,7 +71,7 @@ func fixedProgram(steps []RegisterResourceEvent) deploytest.ProgramFunc { s.Done(&RegisterResult{ State: resource.NewState(g.Type, urn, g.Custom, false, id, g.Properties, outs, g.Parent, g.Protect, false, g.Dependencies, nil, g.Provider, g.PropertyDependencies, false, nil, nil, nil, - "", false), + "", false, ""), }) } return nil @@ -181,16 +181,16 @@ func TestRegisterNoDefaultProviders(t *testing.T) { // Register a component resource. &testRegEvent{ goal: resource.NewGoal(componentURN.Type(), componentURN.Name(), false, resource.PropertyMap{}, "", false, - nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, // Register a couple resources using provider A. &testRegEvent{ goal: resource.NewGoal("pkgA:index:typA", "res1", true, resource.PropertyMap{}, componentURN, false, nil, - providerARef.String(), []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + providerARef.String(), []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, &testRegEvent{ goal: resource.NewGoal("pkgA:index:typA", "res2", true, resource.PropertyMap{}, componentURN, false, nil, - providerARef.String(), []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + providerARef.String(), []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, // Register two more providers. newProviderEvent("pkgA", "providerB", nil, ""), @@ -198,11 +198,11 @@ func TestRegisterNoDefaultProviders(t *testing.T) { // Register a few resources that use the new providers. &testRegEvent{ goal: resource.NewGoal("pkgB:index:typB", "res3", true, resource.PropertyMap{}, "", false, nil, - providerBRef.String(), []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + providerBRef.String(), []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, &testRegEvent{ goal: resource.NewGoal("pkgB:index:typC", "res4", true, resource.PropertyMap{}, "", false, nil, - providerCRef.String(), []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + providerCRef.String(), []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, } @@ -236,7 +236,7 @@ func TestRegisterNoDefaultProviders(t *testing.T) { reg.Done(&RegisterResult{ State: resource.NewState(goal.Type, urn, goal.Custom, false, id, goal.Properties, resource.PropertyMap{}, goal.Parent, goal.Protect, false, goal.Dependencies, nil, goal.Provider, goal.PropertyDependencies, - false, nil, nil, nil, "", false), + false, nil, nil, nil, "", false, ""), }) processed++ @@ -267,25 +267,25 @@ func TestRegisterDefaultProviders(t *testing.T) { // Register a component resource. &testRegEvent{ goal: resource.NewGoal(componentURN.Type(), componentURN.Name(), false, resource.PropertyMap{}, "", false, - nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, // Register a couple resources from package A. &testRegEvent{ goal: resource.NewGoal("pkgA:m:typA", "res1", true, resource.PropertyMap{}, - componentURN, false, nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + componentURN, false, nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, &testRegEvent{ goal: resource.NewGoal("pkgA:m:typA", "res2", true, resource.PropertyMap{}, - componentURN, false, nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + componentURN, false, nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, // Register a few resources from other packages. &testRegEvent{ goal: resource.NewGoal("pkgB:m:typB", "res3", true, resource.PropertyMap{}, "", false, - nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, &testRegEvent{ goal: resource.NewGoal("pkgB:m:typC", "res4", true, resource.PropertyMap{}, "", false, - nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false), + nil, "", []string{}, nil, nil, nil, nil, nil, "", nil, nil, false, ""), }, } @@ -330,7 +330,7 @@ func TestRegisterDefaultProviders(t *testing.T) { reg.Done(&RegisterResult{ State: resource.NewState(goal.Type, urn, goal.Custom, false, id, goal.Properties, resource.PropertyMap{}, goal.Parent, goal.Protect, false, goal.Dependencies, nil, goal.Provider, goal.PropertyDependencies, - false, nil, nil, nil, "", false), + false, nil, nil, nil, "", false, ""), }) processed++ @@ -422,7 +422,7 @@ func TestReadInvokeNoDefaultProviders(t *testing.T) { read.Done(&ReadResult{ State: resource.NewState(read.Type(), urn, true, false, read.ID(), read.Properties(), resource.PropertyMap{}, read.Parent(), false, false, read.Dependencies(), nil, read.Provider(), nil, - false, nil, nil, nil, "", false), + false, nil, nil, nil, "", false, ""), }) reads++ } @@ -509,7 +509,7 @@ func TestReadInvokeDefaultProviders(t *testing.T) { e.Done(&RegisterResult{ State: resource.NewState(goal.Type, urn, goal.Custom, false, id, goal.Properties, resource.PropertyMap{}, goal.Parent, goal.Protect, false, goal.Dependencies, nil, goal.Provider, goal.PropertyDependencies, - false, nil, nil, nil, "", false), + false, nil, nil, nil, "", false, ""), }) registers++ @@ -518,7 +518,7 @@ func TestReadInvokeDefaultProviders(t *testing.T) { e.Done(&ReadResult{ State: resource.NewState(e.Type(), urn, true, false, e.ID(), e.Properties(), resource.PropertyMap{}, e.Parent(), false, false, e.Dependencies(), nil, e.Provider(), nil, false, - nil, nil, nil, "", false), + nil, nil, nil, "", false, ""), }) reads++ } @@ -673,7 +673,7 @@ func TestDisableDefaultProviders(t *testing.T) { event.Done(&ReadResult{ State: resource.NewState(event.Type(), urn, true, false, event.ID(), event.Properties(), resource.PropertyMap{}, event.Parent(), false, false, event.Dependencies(), nil, event.Provider(), nil, - false, nil, nil, nil, "", false), + false, nil, nil, nil, "", false, ""), }) reads++ case RegisterResourceEvent: @@ -681,7 +681,7 @@ func TestDisableDefaultProviders(t *testing.T) { event.Done(&RegisterResult{ State: resource.NewState(event.Goal().Type, urn, true, false, event.Goal().ID, event.Goal().Properties, resource.PropertyMap{}, event.Goal().Parent, false, false, event.Goal().Dependencies, nil, - event.Goal().Provider, nil, false, nil, nil, nil, "", false), + event.Goal().Provider, nil, false, nil, nil, nil, "", false, ""), }) registers++ default: diff --git a/pkg/resource/deploy/step.go b/pkg/resource/deploy/step.go index 68b39310b82d..8b597d10d3ea 100644 --- a/pkg/resource/deploy/step.go +++ b/pkg/resource/deploy/step.go @@ -268,29 +268,38 @@ func (s *CreateStep) Apply(preview bool) (resource.Status, StepCompleteFunc, err // DeleteStep is a mutating step that deletes an existing resource. If `old` is marked "External", // DeleteStep is a no-op. type DeleteStep struct { - deployment *Deployment // the current deployment. - old *resource.State // the state of the existing resource. - replacing bool // true if part of a replacement. + deployment *Deployment // the current deployment. + old *resource.State // the state of the existing resource. + replacing bool // true if part of a replacement. + otherDeletions map[resource.URN]bool // other resources that the planner decided to delete } var _ Step = (*DeleteStep)(nil) -func NewDeleteStep(deployment *Deployment, old *resource.State) Step { +func NewDeleteStep(deployment *Deployment, otherDeletions map[resource.URN]bool, old *resource.State) Step { contract.Assert(old != nil) contract.Assert(old.URN != "") contract.Assert(old.ID != "" || !old.Custom) contract.Assert(!old.Custom || old.Provider != "" || providers.IsProviderType(old.Type)) + contract.Assert(otherDeletions != nil) return &DeleteStep{ - deployment: deployment, - old: old, + deployment: deployment, + old: old, + otherDeletions: otherDeletions, } } -func NewDeleteReplacementStep(deployment *Deployment, old *resource.State, pendingReplace bool) Step { +func NewDeleteReplacementStep( + deployment *Deployment, + otherDeletions map[resource.URN]bool, + old *resource.State, + pendingReplace bool, +) Step { contract.Assert(old != nil) contract.Assert(old.URN != "") contract.Assert(old.ID != "" || !old.Custom) contract.Assert(!old.Custom || old.Provider != "" || providers.IsProviderType(old.Type)) + contract.Assert(otherDeletions != nil) // There are two cases in which we create a delete-replacment step: // @@ -307,9 +316,10 @@ func NewDeleteReplacementStep(deployment *Deployment, old *resource.State, pendi contract.Assert(pendingReplace != old.Delete) old.PendingReplacement = pendingReplace return &DeleteStep{ - deployment: deployment, - old: old, - replacing: true, + deployment: deployment, + otherDeletions: otherDeletions, + old: old, + replacing: true, } } @@ -335,6 +345,17 @@ func (s *DeleteStep) New() *resource.State { return nil } func (s *DeleteStep) Res() *resource.State { return s.old } func (s *DeleteStep) Logical() bool { return !s.replacing } +func isDeletedWith(with resource.URN, otherDeletions map[resource.URN]bool) bool { + if with == "" { + return false + } + r, ok := otherDeletions[with] + if !ok { + return false + } + return r +} + func (s *DeleteStep) Apply(preview bool) (resource.Status, StepCompleteFunc, error) { // Refuse to delete protected resources (unless we're replacing them in // which case we will of checked protect elsewhere) @@ -352,6 +373,8 @@ func (s *DeleteStep) Apply(preview bool) (resource.Status, StepCompleteFunc, err // Deleting an External resource is a no-op, since Pulumi does not own the lifecycle. } else if s.old.RetainOnDelete { // Deleting a "drop on delete" is a no-op as the user has explicitly asked us to not delete the resource. + } else if isDeletedWith(s.old.DeletedWith, s.otherDeletions) { + // No need to delete this resource since this resource will be deleted along with its parent } else if s.old.Custom { // Not preview and not external and not Drop and is custom, do the actual delete @@ -784,7 +807,7 @@ func (s *RefreshStep) Apply(preview bool) (resource.Status, StepCompleteFunc, er s.new = resource.NewState(s.old.Type, s.old.URN, s.old.Custom, s.old.Delete, resourceID, inputs, outputs, s.old.Parent, s.old.Protect, s.old.External, s.old.Dependencies, initErrors, s.old.Provider, s.old.PropertyDependencies, s.old.PendingReplacement, s.old.AdditionalSecretOutputs, s.old.Aliases, - &s.old.CustomTimeouts, s.old.ImportID, s.old.RetainOnDelete) + &s.old.CustomTimeouts, s.old.ImportID, s.old.RetainOnDelete, s.old.DeletedWith) } else { s.new = nil } @@ -933,7 +956,8 @@ func (s *ImportStep) Apply(preview bool) (resource.Status, StepCompleteFunc, err // differences between the old and new states are between the inputs and outputs. s.old = resource.NewState(s.new.Type, s.new.URN, s.new.Custom, false, s.new.ID, read.Inputs, read.Outputs, s.new.Parent, s.new.Protect, false, s.new.Dependencies, s.new.InitErrors, s.new.Provider, - s.new.PropertyDependencies, false, nil, nil, &s.new.CustomTimeouts, s.new.ImportID, s.new.RetainOnDelete) + s.new.PropertyDependencies, false, nil, nil, &s.new.CustomTimeouts, s.new.ImportID, s.new.RetainOnDelete, + s.new.DeletedWith) // If this step came from an import deployment, we need to fetch any required inputs from the state. if s.planned { diff --git a/pkg/resource/deploy/step_generator.go b/pkg/resource/deploy/step_generator.go index 2b84add8ae3f..58000a42604d 100644 --- a/pkg/resource/deploy/step_generator.go +++ b/pkg/resource/deploy/step_generator.go @@ -200,6 +200,7 @@ func (sg *stepGenerator) GenerateReadSteps(event ReadResourceEvent) ([]Step, res nil, /* customTimeouts */ "", /* importID */ false, /* retainOnDelete */ + "", /* deletedWith */ ) old, hasOld := sg.deployment.Olds()[urn] @@ -495,7 +496,7 @@ func (sg *stepGenerator) generateSteps(event RegisterResourceEvent) ([]Step, res // get serialized into the checkpoint file. new := resource.NewState(goal.Type, urn, goal.Custom, false, "", inputs, nil, goal.Parent, goal.Protect, false, goal.Dependencies, goal.InitErrors, goal.Provider, goal.PropertyDependencies, false, - goal.AdditionalSecretOutputs, aliasUrns, &goal.CustomTimeouts, "", goal.RetainOnDelete) + goal.AdditionalSecretOutputs, aliasUrns, &goal.CustomTimeouts, "", goal.RetainOnDelete, goal.DeletedWith) // Mark the URN/resource as having been seen. So we can run analyzers on all resources seen, as well as // lookup providers for calculating replacement of resources that use the provider. @@ -952,7 +953,7 @@ func (sg *stepGenerator) generateStepsFromDiff( logging.V(7).Infof("Planner decided to delete '%v' due to dependence on condemned resource '%v'", dependentResource.URN, urn) - steps = append(steps, NewDeleteReplacementStep(sg.deployment, dependentResource, true)) + steps = append(steps, NewDeleteReplacementStep(sg.deployment, sg.deletes, dependentResource, true)) // Mark the condemned resource as deleted. We won't know until later in the deployment whether // or not we're going to be replacing this resource. sg.deletes[dependentResource.URN] = true @@ -960,7 +961,7 @@ func (sg *stepGenerator) generateStepsFromDiff( } return append(steps, - NewDeleteReplacementStep(sg.deployment, old, true), + NewDeleteReplacementStep(sg.deployment, sg.deletes, old, true), NewReplaceStep(sg.deployment, old, new, diff.ReplaceKeys, diff.ChangedKeys, diff.DetailedDiff, false), NewCreateReplacementStep( sg.deployment, event, old, new, diff.ReplaceKeys, diff.ChangedKeys, diff.DetailedDiff, false), @@ -1036,7 +1037,7 @@ func (sg *stepGenerator) GenerateDeletes(targetsOpt UrnTargets) ([]Step, result. logging.V(7).Infof("Planner decided to delete '%v' due to replacement", res.URN) sg.deletes[res.URN] = true - dels = append(dels, NewDeleteReplacementStep(sg.deployment, res, false)) + dels = append(dels, NewDeleteReplacementStep(sg.deployment, sg.deletes, res, false)) } else if _, aliased := sg.aliased[res.URN]; !sg.sames[res.URN] && !sg.updates[res.URN] && !sg.replaces[res.URN] && !sg.reads[res.URN] && !aliased { // NOTE: we deliberately do not check sg.deletes here, as it is possible for us to issue multiple @@ -1044,7 +1045,7 @@ func (sg *stepGenerator) GenerateDeletes(targetsOpt UrnTargets) ([]Step, result. logging.V(7).Infof("Planner decided to delete '%v'", res.URN) sg.deletes[res.URN] = true if !res.PendingReplacement { - dels = append(dels, NewDeleteStep(sg.deployment, res)) + dels = append(dels, NewDeleteStep(sg.deployment, sg.deletes, res)) } else { dels = append(dels, NewRemovePendingReplaceStep(sg.deployment, res)) } @@ -1242,7 +1243,10 @@ func (sg *stepGenerator) GeneratePendingDeletes() []Step { logging.V(7).Infof( "stepGenerator.GeneratePendingDeletes(): resource (%v, %v) is pending deletion", res.URN, res.ID) sg.pendingDeletes[res] = true - dels = append(dels, NewDeleteStep(sg.deployment, res)) + // TODO: Should we support DeletedWith with PendingDeletes + // Special case might be when child is marked as pending deletion but we now want to delete the + // containing resource, so ultimately there is no need to delete the child anymore + dels = append(dels, NewDeleteStep(sg.deployment, map[resource.URN]bool{}, res)) } } } diff --git a/pkg/resource/stack/deployment.go b/pkg/resource/stack/deployment.go index 64f9d0e742ec..cc581530c6b9 100644 --- a/pkg/resource/stack/deployment.go +++ b/pkg/resource/stack/deployment.go @@ -329,6 +329,7 @@ func SerializeResource(res *resource.State, enc config.Encrypter, showSecrets bo Aliases: res.Aliases, ImportID: res.ImportID, RetainOnDelete: res.RetainOnDelete, + DeletedWith: res.DeletedWith, } if res.CustomTimeouts.IsNotEmpty() { @@ -512,7 +513,7 @@ func DeserializeResource(res apitype.ResourceV3, dec config.Decrypter, enc confi res.Type, res.URN, res.Custom, res.Delete, res.ID, inputs, outputs, res.Parent, res.Protect, res.External, res.Dependencies, res.InitErrors, res.Provider, res.PropertyDependencies, res.PendingReplacement, res.AdditionalSecretOutputs, res.Aliases, res.CustomTimeouts, - res.ImportID, res.RetainOnDelete), nil + res.ImportID, res.RetainOnDelete, res.DeletedWith), nil } func DeserializeOperation(op apitype.OperationV2, dec config.Decrypter, diff --git a/pkg/resource/stack/deployment_test.go b/pkg/resource/stack/deployment_test.go index af1893c5f775..c0e7ca72a409 100644 --- a/pkg/resource/stack/deployment_test.go +++ b/pkg/resource/stack/deployment_test.go @@ -99,6 +99,7 @@ func TestDeploymentSerialization(t *testing.T) { nil, "", false, + "", ) dep, err := SerializeResource(res, config.NopEncrypter, false /* showSecrets */) diff --git a/proto/.checksum.txt b/proto/.checksum.txt index 46b4346b741b..29dad80b2fce 100644 --- a/proto/.checksum.txt +++ b/proto/.checksum.txt @@ -12,4 +12,4 @@ 3300935796 5024 proto/pulumi/language.proto 2700626499 1743 proto/pulumi/plugin.proto 1451439690 19667 proto/pulumi/provider.proto -3808155704 10824 proto/pulumi/resource.proto +1325776472 11014 proto/pulumi/resource.proto diff --git a/proto/pulumi/resource.proto b/proto/pulumi/resource.proto index 56712490b12c..17b9a17d2ab4 100644 --- a/proto/pulumi/resource.proto +++ b/proto/pulumi/resource.proto @@ -117,6 +117,7 @@ message RegisterResourceRequest { string pluginDownloadURL = 24; // the server URL of the provider to use when servicing this request. bool retainOnDelete = 25; // if true the engine will not call the resource providers delete method for this resource. repeated Alias aliases = 26; // a list of additional aliases that should be considered the same. + string deletedWith = 27; // if set the engine will not call the resource providers delete method for this resource when specified resource is deleted. } // RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the diff --git a/sdk/dotnet/Pulumi/Deployment/Deployment_RegisterResource.cs b/sdk/dotnet/Pulumi/Deployment/Deployment_RegisterResource.cs index 8b98fbe450f8..1f2d631e1f0c 100644 --- a/sdk/dotnet/Pulumi/Deployment/Deployment_RegisterResource.cs +++ b/sdk/dotnet/Pulumi/Deployment/Deployment_RegisterResource.cs @@ -91,6 +91,7 @@ private static void PopulateRequest(RegisterResourceRequest request, PrepareResu }, Remote = remote, RetainOnDelete = options.RetainOnDelete ?? false, + DeletedWith = options.DeletedWith ?? false, }; if (customOpts != null) diff --git a/sdk/dotnet/Pulumi/PublicAPI.Shipped.txt b/sdk/dotnet/Pulumi/PublicAPI.Shipped.txt index bdc89965e566..fa8c52b5998c 100644 --- a/sdk/dotnet/Pulumi/PublicAPI.Shipped.txt +++ b/sdk/dotnet/Pulumi/PublicAPI.Shipped.txt @@ -200,6 +200,8 @@ Pulumi.ResourceOptions.PluginDownloadURL.get -> string Pulumi.ResourceOptions.PluginDownloadURL.set -> void Pulumi.ResourceOptions.RetainOnDelete.get -> bool? Pulumi.ResourceOptions.RetainOnDelete.set -> void +Pulumi.ResourceOptions.DeletedWith.get -> Pulumi.Resource +Pulumi.ResourceOptions.DeletedWith.set -> void Pulumi.ResourceTransformation Pulumi.ResourceTransformationArgs Pulumi.ResourceTransformationArgs.Args.get -> Pulumi.ResourceArgs diff --git a/sdk/dotnet/Pulumi/Resources/ResourceOptions.cs b/sdk/dotnet/Pulumi/Resources/ResourceOptions.cs index 4cbc4a52ae74..916a7cd88784 100644 --- a/sdk/dotnet/Pulumi/Resources/ResourceOptions.cs +++ b/sdk/dotnet/Pulumi/Resources/ResourceOptions.cs @@ -123,5 +123,11 @@ public List ReplaceOnChanges /// If set to True, the providers Delete method will not be called for this resource. /// public bool? RetainOnDelete { get; set; } + + /// + /// If set, the providers Delete method will not be called for this resource + /// if specified resource is being deleted as well. + /// + public Resource? DeletedWith { get; set; } } } diff --git a/sdk/dotnet/Pulumi/Resources/ResourceOptions_Copy.cs b/sdk/dotnet/Pulumi/Resources/ResourceOptions_Copy.cs index 844c4eead87a..d3388be70e9c 100644 --- a/sdk/dotnet/Pulumi/Resources/ResourceOptions_Copy.cs +++ b/sdk/dotnet/Pulumi/Resources/ResourceOptions_Copy.cs @@ -23,7 +23,8 @@ internal static TResourceOptions CreateCopy(ResourceOptions op Urn = options.Urn, Version = options.Version, PluginDownloadURL = options.PluginDownloadURL, - RetainOnDelete = options.RetainOnDelete + RetainOnDelete = options.RetainOnDelete, + DeletedWith = options.DeletedWith }; internal static CustomResourceOptions CreateCustomResourceOptionsCopy(ResourceOptions? options) diff --git a/sdk/dotnet/Pulumi/Resources/ResourceOptions_Merge.cs b/sdk/dotnet/Pulumi/Resources/ResourceOptions_Merge.cs index 5ec6ee11b0c4..f8b91ca743a8 100644 --- a/sdk/dotnet/Pulumi/Resources/ResourceOptions_Merge.cs +++ b/sdk/dotnet/Pulumi/Resources/ResourceOptions_Merge.cs @@ -15,6 +15,7 @@ internal static void MergeNormalOptions(ResourceOptions options1, ResourceOption options1.Provider = options2.Provider ?? options1.Provider; options1.CustomTimeouts = options2.CustomTimeouts ?? options1.CustomTimeouts; options1.RetainOnDelete = options2.RetainOnDelete ?? options1.RetainOnDelete; + options1.DeletedWith = options2.DeletedWith ?? options1.DeletedWith; options1.IgnoreChanges.AddRange(options2.IgnoreChanges); options1.ResourceTransformations.AddRange(options2.ResourceTransformations); diff --git a/sdk/go/common/apitype/core.go b/sdk/go/common/apitype/core.go index 5ea009917010..1e35bb907e3c 100644 --- a/sdk/go/common/apitype/core.go +++ b/sdk/go/common/apitype/core.go @@ -326,6 +326,9 @@ type ResourceV3 struct { ImportID resource.ID `json:"importID,omitempty" yaml:"importID,omitempty"` // If set to True, the providers Delete method will not be called for this resource. Pulumi simply stops tracking the deleted resource. RetainOnDelete bool `json:"retainOnDelete,omitempty" yaml:"retainOnDelete,omitempty"` + // If set, the providers Delete method will not be called for this resource + // if specified resource is being deleted as well. + DeletedWith resource.URN `json:"deletedWith,omitempty" yaml:"deletedWith,omitempty"` } // ManifestV1 captures meta-information about this checkpoint file, such as versions of binaries, etc. diff --git a/sdk/go/common/resource/resource_goal.go b/sdk/go/common/resource/resource_goal.go index 3f23889e65dc..84f29d4aefd0 100644 --- a/sdk/go/common/resource/resource_goal.go +++ b/sdk/go/common/resource/resource_goal.go @@ -40,6 +40,9 @@ type Goal struct { ReplaceOnChanges []string // a list of property paths that if changed should force a replacement. // if set to True, the providers Delete method will not be called for this resource. RetainOnDelete bool + // if set, the providers Delete method will not be called for this resource + // if specified resource is being deleted as well. + DeletedWith URN } // NewGoal allocates a new resource goal state. @@ -47,7 +50,7 @@ func NewGoal(t tokens.Type, name tokens.QName, custom bool, props PropertyMap, parent URN, protect bool, dependencies []URN, provider string, initErrors []string, propertyDependencies map[PropertyKey][]URN, deleteBeforeReplace *bool, ignoreChanges []string, additionalSecretOutputs []PropertyKey, aliases []Alias, id ID, customTimeouts *CustomTimeouts, - replaceOnChanges []string, retainOnDelete bool) *Goal { + replaceOnChanges []string, retainOnDelete bool, deletedWith URN) *Goal { g := &Goal{ Type: t, @@ -67,6 +70,7 @@ func NewGoal(t tokens.Type, name tokens.QName, custom bool, props PropertyMap, ID: id, ReplaceOnChanges: replaceOnChanges, RetainOnDelete: retainOnDelete, + DeletedWith: deletedWith, } if customTimeouts != nil { diff --git a/sdk/go/common/resource/resource_state.go b/sdk/go/common/resource/resource_state.go index 612d579e915c..7d174d4f19a9 100644 --- a/sdk/go/common/resource/resource_state.go +++ b/sdk/go/common/resource/resource_state.go @@ -44,6 +44,7 @@ type State struct { CustomTimeouts CustomTimeouts // A config block that will be used to configure timeouts for CRUD operations. ImportID ID // the resource's import id, if this was an imported resource. RetainOnDelete bool // if set to True, the providers Delete method will not be called for this resource. + DeletedWith URN // If set, the providers Delete method will not be called for this resource if specified resource is being deleted as well. } func (s *State) GetAliasURNs() []URN { @@ -64,7 +65,7 @@ func NewState(t tokens.Type, urn URN, custom bool, del bool, id ID, external bool, dependencies []URN, initErrors []string, provider string, propertyDependencies map[PropertyKey][]URN, pendingReplacement bool, additionalSecretOutputs []PropertyKey, aliases []URN, timeouts *CustomTimeouts, - importID ID, retainOnDelete bool) *State { + importID ID, retainOnDelete bool, deletedWith URN) *State { contract.Assertf(t != "", "type was empty") contract.Assertf(custom || id == "", "is custom or had empty ID") @@ -90,6 +91,7 @@ func NewState(t tokens.Type, urn URN, custom bool, del bool, id ID, Aliases: aliases, ImportID: importID, RetainOnDelete: retainOnDelete, + DeletedWith: deletedWith, } if timeouts != nil { diff --git a/sdk/go/pulumi/context.go b/sdk/go/pulumi/context.go index 0ec0534d9ab8..919bef8d625d 100644 --- a/sdk/go/pulumi/context.go +++ b/sdk/go/pulumi/context.go @@ -856,6 +856,7 @@ func (ctx *Context) registerResource( Remote: remote, ReplaceOnChanges: inputs.replaceOnChanges, RetainOnDelete: inputs.retainOnDelete, + DeletedWith: inputs.deletedWith, }) if err != nil { logging.V(9).Infof("RegisterResource(%s, %s): error: %v", t, name, err) @@ -1249,6 +1250,7 @@ type resourceInputs struct { pluginDownloadURL string replaceOnChanges []string retainOnDelete bool + deletedWith string } // prepareResourceInputs prepares the inputs for a resource operation, shared between read and register. @@ -1336,6 +1338,7 @@ func (ctx *Context) prepareResourceInputs(res Resource, props Input, t string, o pluginDownloadURL: state.pluginDownloadURL, replaceOnChanges: resOpts.replaceOnChanges, retainOnDelete: opts.RetainOnDelete, + deletedWith: string(opts.DeletedWith), }, nil } diff --git a/sdk/go/pulumi/resource.go b/sdk/go/pulumi/resource.go index bc69910b25e3..7404c2a15713 100644 --- a/sdk/go/pulumi/resource.go +++ b/sdk/go/pulumi/resource.go @@ -311,6 +311,9 @@ type resourceOptions struct { PluginDownloadURL string // If set to True, the providers Delete method will not be called for this resource. RetainOnDelete bool + // If set, the providers Delete method will not be called for this resource + // if specified resource is being deleted as well. + DeletedWith URN } type invokeOptions struct { @@ -590,3 +593,11 @@ func RetainOnDelete(b bool) ResourceOption { ro.RetainOnDelete = b }) } + +// If set to True and parent is set, the providers Delete method will not be called for this resource +// if parent is being deleted as well. +func DeletedWith(dw URN) ResourceOption { + return resourceOption(func(ro *resourceOptions) { + ro.DeletedWith = dw + }) +} diff --git a/sdk/nodejs/proto/resource_pb.js b/sdk/nodejs/proto/resource_pb.js index e43605f6d2d8..e4b7e962f53c 100644 --- a/sdk/nodejs/proto/resource_pb.js +++ b/sdk/nodejs/proto/resource_pb.js @@ -1297,7 +1297,8 @@ proto.pulumirpc.RegisterResourceRequest.toObject = function(includeInstance, msg plugindownloadurl: jspb.Message.getFieldWithDefault(msg, 24, ""), retainondelete: jspb.Message.getBooleanFieldWithDefault(msg, 25, false), aliasesList: jspb.Message.toObjectList(msg.getAliasesList(), - pulumi_alias_pb.Alias.toObject, includeInstance) + pulumi_alias_pb.Alias.toObject, includeInstance), + deletedwith: jspb.Message.getFieldWithDefault(msg, 27, "") }; if (includeInstance) { @@ -1445,6 +1446,10 @@ proto.pulumirpc.RegisterResourceRequest.deserializeBinaryFromReader = function(m reader.readMessage(value,pulumi_alias_pb.Alias.deserializeBinaryFromReader); msg.addAliases(value); break; + case 27: + var value = /** @type {string} */ (reader.readString()); + msg.setDeletedwith(value); + break; default: reader.skipField(); break; @@ -1653,6 +1658,13 @@ proto.pulumirpc.RegisterResourceRequest.serializeBinaryToWriter = function(messa pulumi_alias_pb.Alias.serializeBinaryToWriter ); } + f = message.getDeletedwith(); + if (f.length > 0) { + writer.writeString( + 27, + f + ); + } }; @@ -2631,6 +2643,24 @@ proto.pulumirpc.RegisterResourceRequest.prototype.clearAliasesList = function() }; +/** + * optional string deletedWith = 27; + * @return {string} + */ +proto.pulumirpc.RegisterResourceRequest.prototype.getDeletedwith = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pulumirpc.RegisterResourceRequest} returns this + */ +proto.pulumirpc.RegisterResourceRequest.prototype.setDeletedwith = function(value) { + return jspb.Message.setProto3StringField(this, 27, value); +}; + + /** * List of repeated fields within this message type. diff --git a/sdk/nodejs/resource.ts b/sdk/nodejs/resource.ts index 2534f2318e8e..26a3447e7839 100644 --- a/sdk/nodejs/resource.ts +++ b/sdk/nodejs/resource.ts @@ -599,6 +599,11 @@ export interface ResourceOptions { * If set to True, the providers Delete method will not be called for this resource. */ retainOnDelete?: boolean; + /** + * If set, the providers Delete method will not be called for this resource + * if specified is being deleted as well. + */ + deletedWith?: Resource; // !!! IMPORTANT !!! If you add a new field to this type, make sure to add test that verifies // that mergeOptions works properly for it. diff --git a/sdk/nodejs/runtime/resource.ts b/sdk/nodejs/runtime/resource.ts index b94d2700bb91..6560063b1829 100644 --- a/sdk/nodejs/runtime/resource.ts +++ b/sdk/nodejs/runtime/resource.ts @@ -317,6 +317,7 @@ export function registerResource(res: Resource, parent: Resource | undefined, t: req.setReplaceonchangesList(opts.replaceOnChanges || []); req.setPlugindownloadurl(opts.pluginDownloadURL || ""); req.setRetainondelete(opts.retainOnDelete || false); + req.setDeletedwith(opts.deletedWith); const customTimeouts = new resproto.RegisterResourceRequest.CustomTimeouts(); if (opts.customTimeouts != null) { diff --git a/sdk/proto/go/resource.pb.go b/sdk/proto/go/resource.pb.go index 537c36f59460..e43a7f02a655 100644 --- a/sdk/proto/go/resource.pb.go +++ b/sdk/proto/go/resource.pb.go @@ -360,6 +360,7 @@ type RegisterResourceRequest struct { PluginDownloadURL string `protobuf:"bytes,24,opt,name=pluginDownloadURL,proto3" json:"pluginDownloadURL,omitempty"` // the server URL of the provider to use when servicing this request. RetainOnDelete bool `protobuf:"varint,25,opt,name=retainOnDelete,proto3" json:"retainOnDelete,omitempty"` // if true the engine will not call the resource providers delete method for this resource. Aliases []*Alias `protobuf:"bytes,26,rep,name=aliases,proto3" json:"aliases,omitempty"` // a list of additional aliases that should be considered the same. + DeletedWith string `protobuf:"bytes,27,opt,name=deletedWith,proto3" json:"deletedWith,omitempty"` // if set the engine will not call the resource providers delete method for this resource when specified resource is deleted. } func (x *RegisterResourceRequest) Reset() { @@ -576,6 +577,13 @@ func (x *RegisterResourceRequest) GetAliases() []*Alias { return nil } +func (x *RegisterResourceRequest) GetDeletedWith() string { + if x != nil { + return x.DeletedWith + } + return "" +} + // RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the // auto-assigned URN, the provider-assigned ID, and any other properties initialized by the engine. type RegisterResourceResponse struct { @@ -1020,7 +1028,7 @@ var file_pulumi_resource_proto_rawDesc = []byte{ 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x22, 0xd3, 0x0b, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x22, 0xf5, 0x0b, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, @@ -1093,117 +1101,120 @@ var file_pulumi_resource_proto_rawDesc = []byte{ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, - 0x73, 0x1a, 0x2a, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, - 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x6e, 0x73, 0x1a, 0x58, 0x0a, - 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x1a, 0x80, 0x01, 0x0a, 0x19, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, - 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x03, 0x0a, 0x18, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x14, 0x70, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, - 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, - 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x1a, 0x2a, 0x0a, - 0x14, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, - 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x6e, 0x73, 0x1a, 0x81, 0x01, 0x0a, 0x19, 0x50, 0x72, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, + 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x57, + 0x69, 0x74, 0x68, 0x1a, 0x2a, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, + 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x6e, 0x73, 0x1a, + 0x58, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x1a, 0x80, 0x01, 0x0a, 0x19, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, - 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x65, 0x0a, - 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x73, 0x22, 0xe4, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x74, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x6f, 0x6b, - 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, - 0x11, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, - 0x52, 0x4c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x32, 0xd4, 0x04, 0x0a, 0x0f, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, - 0x5a, 0x0a, 0x0f, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x21, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x06, 0x49, - 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, - 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, - 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, - 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, - 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x39, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x16, 0x2e, - 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, - 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x51, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x1e, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x61, - 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x61, - 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, - 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x75, - 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x29, 0x2e, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, + 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x03, 0x0a, 0x18, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x14, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x70, 0x75, 0x6c, + 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x1a, + 0x2a, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, + 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x6e, 0x73, 0x1a, 0x81, 0x01, 0x0a, 0x19, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x70, 0x75, 0x6c, + 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x69, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x65, 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0xe4, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, + 0x6f, 0x6b, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, + 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, + 0x2c, 0x0a, 0x11, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, + 0x64, 0x55, 0x52, 0x4c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x32, 0xd4, 0x04, + 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, + 0x72, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x21, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, + 0x06, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, + 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x75, 0x6c, 0x75, + 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, + 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x6b, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, + 0x69, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x39, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, + 0x16, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, + 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, + 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x70, 0x75, 0x6c, 0x75, + 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x2f, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x2f, 0x73, - 0x64, 0x6b, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x3b, 0x70, - 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, + 0x29, 0x2e, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x00, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x2f, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, + 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x3b, 0x70, 0x75, 0x6c, 0x75, 0x6d, 0x69, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/sdk/python/lib/pulumi/resource.py b/sdk/python/lib/pulumi/resource.py index 33f79236996d..bfe81756d7c1 100644 --- a/sdk/python/lib/pulumi/resource.py +++ b/sdk/python/lib/pulumi/resource.py @@ -487,6 +487,12 @@ class ResourceOptions: If set to True, the providers Delete method will not be called for this resource. """ + deleted_with: Optional["Resource"] + """ + If set, the providers Delete method will not be called for this resource + if specified resource is being deleted as well. + """ + # pylint: disable=redefined-builtin def __init__( self, @@ -512,6 +518,7 @@ def __init__( replace_on_changes: Optional[List[str]] = None, plugin_download_url: Optional[str] = None, retain_on_delete: Optional[bool] = None, + deleted_with: Optional["Resource"] = None, ) -> None: """ :param Optional[Resource] parent: If provided, the currently-constructing resource should be the child of @@ -552,6 +559,8 @@ def __init__( from the provided url. This url overrides the plugin download url inferred from the current package and should rarely be used. :param Optional[bool] retain_on_delete: If set to True, the providers Delete method will not be called for this resource. + :param Optional[Resource] deleted_with: If set, the providers Delete method will not be called for this resource + if specified resource is being deleted as well. """ # Expose 'merge' again this this object, but this time as an instance method. @@ -577,6 +586,7 @@ def __init__( self.replace_on_changes = replace_on_changes self.depends_on = depends_on self.retain_on_delete = retain_on_delete + self.deleted_with = deleted_with # Proactively check that `depends_on` values are of type # `Resource`. We cannot complete the check in the general case @@ -704,6 +714,11 @@ def expand_providers(providers) -> Optional[Sequence["ProviderResource"]]: if source.retain_on_delete is None else source.retain_on_delete ) + dest.deleted_with = ( + dest.deleted_with + if source.deleted_with is None + else source.deleted_with + ) # Now, if we are left with a .providers that is just a single key/value pair, then # collapse that down into .provider form. diff --git a/sdk/python/lib/pulumi/runtime/proto/alias_pb2.py b/sdk/python/lib/pulumi/runtime/proto/alias_pb2.py index 2e3e6ba2a80c..9ab69162221c 100644 --- a/sdk/python/lib/pulumi/runtime/proto/alias_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/alias_pb2.py @@ -2,10 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pulumi/alias.proto """Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -16,25 +15,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12pulumi/alias.proto\x12\tpulumirpc\"\xbd\x01\n\x05\x41lias\x12\r\n\x03urn\x18\x01 \x01(\tH\x00\x12%\n\x04spec\x18\x02 \x01(\x0b\x32\x15.pulumirpc.Alias.SpecH\x00\x1au\n\x04Spec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\r\n\x05stack\x18\x03 \x01(\t\x12\x0f\n\x07project\x18\x04 \x01(\t\x12\x13\n\tparentUrn\x18\x05 \x01(\tH\x00\x12\x12\n\x08noParent\x18\x06 \x01(\x08H\x00\x42\x08\n\x06parentB\x07\n\x05\x61liasB4Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') - - -_ALIAS = DESCRIPTOR.message_types_by_name['Alias'] -_ALIAS_SPEC = _ALIAS.nested_types_by_name['Spec'] -Alias = _reflection.GeneratedProtocolMessageType('Alias', (_message.Message,), { - - 'Spec' : _reflection.GeneratedProtocolMessageType('Spec', (_message.Message,), { - 'DESCRIPTOR' : _ALIAS_SPEC, - '__module__' : 'pulumi.alias_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.Alias.Spec) - }) - , - 'DESCRIPTOR' : _ALIAS, - '__module__' : 'pulumi.alias_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.Alias) - }) -_sym_db.RegisterMessage(Alias) -_sym_db.RegisterMessage(Alias.Spec) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pulumi.alias_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/sdk/python/lib/pulumi/runtime/proto/analyzer_pb2.py b/sdk/python/lib/pulumi/runtime/proto/analyzer_pb2.py index 880618335623..fd2511d0681d 100644 --- a/sdk/python/lib/pulumi/runtime/proto/analyzer_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/analyzer_pb2.py @@ -2,11 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pulumi/analyzer.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -20,154 +18,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15pulumi/analyzer.proto\x12\tpulumirpc\x1a\x13pulumi/plugin.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xd2\x01\n\x0e\x41nalyzeRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0b\n\x03urn\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x33\n\x07options\x18\x05 \x01(\x0b\x32\".pulumirpc.AnalyzerResourceOptions\x12\x35\n\x08provider\x18\x06 \x01(\x0b\x32#.pulumirpc.AnalyzerProviderResource\"\xb5\x03\n\x10\x41nalyzerResource\x12\x0c\n\x04type\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0b\n\x03urn\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x33\n\x07options\x18\x05 \x01(\x0b\x32\".pulumirpc.AnalyzerResourceOptions\x12\x35\n\x08provider\x18\x06 \x01(\x0b\x32#.pulumirpc.AnalyzerProviderResource\x12\x0e\n\x06parent\x18\x07 \x01(\t\x12\x14\n\x0c\x64\x65pendencies\x18\x08 \x03(\t\x12S\n\x14propertyDependencies\x18\t \x03(\x0b\x32\x35.pulumirpc.AnalyzerResource.PropertyDependenciesEntry\x1a\x64\n\x19PropertyDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.pulumirpc.AnalyzerPropertyDependencies:\x02\x38\x01\"\xc1\x02\n\x17\x41nalyzerResourceOptions\x12\x0f\n\x07protect\x18\x01 \x01(\x08\x12\x15\n\rignoreChanges\x18\x02 \x03(\t\x12\x1b\n\x13\x64\x65leteBeforeReplace\x18\x03 \x01(\x08\x12\"\n\x1a\x64\x65leteBeforeReplaceDefined\x18\x04 \x01(\x08\x12\x1f\n\x17\x61\x64\x64itionalSecretOutputs\x18\x05 \x03(\t\x12\x0f\n\x07\x61liases\x18\x06 \x03(\t\x12I\n\x0e\x63ustomTimeouts\x18\x07 \x01(\x0b\x32\x31.pulumirpc.AnalyzerResourceOptions.CustomTimeouts\x1a@\n\x0e\x43ustomTimeouts\x12\x0e\n\x06\x63reate\x18\x01 \x01(\x01\x12\x0e\n\x06update\x18\x02 \x01(\x01\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\x01\"p\n\x18\x41nalyzerProviderResource\x12\x0c\n\x04type\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0b\n\x03urn\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\",\n\x1c\x41nalyzerPropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\"E\n\x13\x41nalyzeStackRequest\x12.\n\tresources\x18\x01 \x03(\x0b\x32\x1b.pulumirpc.AnalyzerResource\"D\n\x0f\x41nalyzeResponse\x12\x31\n\x0b\x64iagnostics\x18\x02 \x03(\x0b\x32\x1c.pulumirpc.AnalyzeDiagnostic\"\xd2\x01\n\x11\x41nalyzeDiagnostic\x12\x12\n\npolicyName\x18\x01 \x01(\t\x12\x16\n\x0epolicyPackName\x18\x02 \x01(\t\x12\x19\n\x11policyPackVersion\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x0f\n\x07message\x18\x05 \x01(\t\x12\x0c\n\x04tags\x18\x06 \x03(\t\x12\x35\n\x10\x65nforcementLevel\x18\x07 \x01(\x0e\x32\x1b.pulumirpc.EnforcementLevel\x12\x0b\n\x03urn\x18\x08 \x01(\t\"\x95\x02\n\x0c\x41nalyzerInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64isplayName\x18\x02 \x01(\t\x12\'\n\x08policies\x18\x03 \x03(\x0b\x32\x15.pulumirpc.PolicyInfo\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x16\n\x0esupportsConfig\x18\x05 \x01(\x08\x12\x41\n\rinitialConfig\x18\x06 \x03(\x0b\x32*.pulumirpc.AnalyzerInfo.InitialConfigEntry\x1aM\n\x12InitialConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.pulumirpc.PolicyConfig:\x02\x38\x01\"\xc1\x01\n\nPolicyInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64isplayName\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0f\n\x07message\x18\x04 \x01(\t\x12\x35\n\x10\x65nforcementLevel\x18\x05 \x01(\x0e\x32\x1b.pulumirpc.EnforcementLevel\x12\x33\n\x0c\x63onfigSchema\x18\x06 \x01(\x0b\x32\x1d.pulumirpc.PolicyConfigSchema\"S\n\x12PolicyConfigSchema\x12+\n\nproperties\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08required\x18\x02 \x03(\t\"r\n\x0cPolicyConfig\x12\x35\n\x10\x65nforcementLevel\x18\x01 \x01(\x0e\x32\x1b.pulumirpc.EnforcementLevel\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xb5\x01\n\x18\x43onfigureAnalyzerRequest\x12K\n\x0cpolicyConfig\x18\x01 \x03(\x0b\x32\x35.pulumirpc.ConfigureAnalyzerRequest.PolicyConfigEntry\x1aL\n\x11PolicyConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.pulumirpc.PolicyConfig:\x02\x38\x01*=\n\x10\x45nforcementLevel\x12\x0c\n\x08\x41\x44VISORY\x10\x00\x12\r\n\tMANDATORY\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x32\xf0\x02\n\x08\x41nalyzer\x12\x42\n\x07\x41nalyze\x12\x19.pulumirpc.AnalyzeRequest\x1a\x1a.pulumirpc.AnalyzeResponse\"\x00\x12L\n\x0c\x41nalyzeStack\x12\x1e.pulumirpc.AnalyzeStackRequest\x1a\x1a.pulumirpc.AnalyzeResponse\"\x00\x12\x44\n\x0fGetAnalyzerInfo\x12\x16.google.protobuf.Empty\x1a\x17.pulumirpc.AnalyzerInfo\"\x00\x12@\n\rGetPluginInfo\x12\x16.google.protobuf.Empty\x1a\x15.pulumirpc.PluginInfo\"\x00\x12J\n\tConfigure\x12#.pulumirpc.ConfigureAnalyzerRequest\x1a\x16.google.protobuf.Empty\"\x00\x42\x34Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') -_ENFORCEMENTLEVEL = DESCRIPTOR.enum_types_by_name['EnforcementLevel'] -EnforcementLevel = enum_type_wrapper.EnumTypeWrapper(_ENFORCEMENTLEVEL) -ADVISORY = 0 -MANDATORY = 1 -DISABLED = 2 - - -_ANALYZEREQUEST = DESCRIPTOR.message_types_by_name['AnalyzeRequest'] -_ANALYZERRESOURCE = DESCRIPTOR.message_types_by_name['AnalyzerResource'] -_ANALYZERRESOURCE_PROPERTYDEPENDENCIESENTRY = _ANALYZERRESOURCE.nested_types_by_name['PropertyDependenciesEntry'] -_ANALYZERRESOURCEOPTIONS = DESCRIPTOR.message_types_by_name['AnalyzerResourceOptions'] -_ANALYZERRESOURCEOPTIONS_CUSTOMTIMEOUTS = _ANALYZERRESOURCEOPTIONS.nested_types_by_name['CustomTimeouts'] -_ANALYZERPROVIDERRESOURCE = DESCRIPTOR.message_types_by_name['AnalyzerProviderResource'] -_ANALYZERPROPERTYDEPENDENCIES = DESCRIPTOR.message_types_by_name['AnalyzerPropertyDependencies'] -_ANALYZESTACKREQUEST = DESCRIPTOR.message_types_by_name['AnalyzeStackRequest'] -_ANALYZERESPONSE = DESCRIPTOR.message_types_by_name['AnalyzeResponse'] -_ANALYZEDIAGNOSTIC = DESCRIPTOR.message_types_by_name['AnalyzeDiagnostic'] -_ANALYZERINFO = DESCRIPTOR.message_types_by_name['AnalyzerInfo'] -_ANALYZERINFO_INITIALCONFIGENTRY = _ANALYZERINFO.nested_types_by_name['InitialConfigEntry'] -_POLICYINFO = DESCRIPTOR.message_types_by_name['PolicyInfo'] -_POLICYCONFIGSCHEMA = DESCRIPTOR.message_types_by_name['PolicyConfigSchema'] -_POLICYCONFIG = DESCRIPTOR.message_types_by_name['PolicyConfig'] -_CONFIGUREANALYZERREQUEST = DESCRIPTOR.message_types_by_name['ConfigureAnalyzerRequest'] -_CONFIGUREANALYZERREQUEST_POLICYCONFIGENTRY = _CONFIGUREANALYZERREQUEST.nested_types_by_name['PolicyConfigEntry'] -AnalyzeRequest = _reflection.GeneratedProtocolMessageType('AnalyzeRequest', (_message.Message,), { - 'DESCRIPTOR' : _ANALYZEREQUEST, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzeRequest) - }) -_sym_db.RegisterMessage(AnalyzeRequest) - -AnalyzerResource = _reflection.GeneratedProtocolMessageType('AnalyzerResource', (_message.Message,), { - - 'PropertyDependenciesEntry' : _reflection.GeneratedProtocolMessageType('PropertyDependenciesEntry', (_message.Message,), { - 'DESCRIPTOR' : _ANALYZERRESOURCE_PROPERTYDEPENDENCIESENTRY, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzerResource.PropertyDependenciesEntry) - }) - , - 'DESCRIPTOR' : _ANALYZERRESOURCE, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzerResource) - }) -_sym_db.RegisterMessage(AnalyzerResource) -_sym_db.RegisterMessage(AnalyzerResource.PropertyDependenciesEntry) - -AnalyzerResourceOptions = _reflection.GeneratedProtocolMessageType('AnalyzerResourceOptions', (_message.Message,), { - - 'CustomTimeouts' : _reflection.GeneratedProtocolMessageType('CustomTimeouts', (_message.Message,), { - 'DESCRIPTOR' : _ANALYZERRESOURCEOPTIONS_CUSTOMTIMEOUTS, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzerResourceOptions.CustomTimeouts) - }) - , - 'DESCRIPTOR' : _ANALYZERRESOURCEOPTIONS, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzerResourceOptions) - }) -_sym_db.RegisterMessage(AnalyzerResourceOptions) -_sym_db.RegisterMessage(AnalyzerResourceOptions.CustomTimeouts) - -AnalyzerProviderResource = _reflection.GeneratedProtocolMessageType('AnalyzerProviderResource', (_message.Message,), { - 'DESCRIPTOR' : _ANALYZERPROVIDERRESOURCE, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzerProviderResource) - }) -_sym_db.RegisterMessage(AnalyzerProviderResource) - -AnalyzerPropertyDependencies = _reflection.GeneratedProtocolMessageType('AnalyzerPropertyDependencies', (_message.Message,), { - 'DESCRIPTOR' : _ANALYZERPROPERTYDEPENDENCIES, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzerPropertyDependencies) - }) -_sym_db.RegisterMessage(AnalyzerPropertyDependencies) - -AnalyzeStackRequest = _reflection.GeneratedProtocolMessageType('AnalyzeStackRequest', (_message.Message,), { - 'DESCRIPTOR' : _ANALYZESTACKREQUEST, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzeStackRequest) - }) -_sym_db.RegisterMessage(AnalyzeStackRequest) - -AnalyzeResponse = _reflection.GeneratedProtocolMessageType('AnalyzeResponse', (_message.Message,), { - 'DESCRIPTOR' : _ANALYZERESPONSE, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzeResponse) - }) -_sym_db.RegisterMessage(AnalyzeResponse) - -AnalyzeDiagnostic = _reflection.GeneratedProtocolMessageType('AnalyzeDiagnostic', (_message.Message,), { - 'DESCRIPTOR' : _ANALYZEDIAGNOSTIC, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzeDiagnostic) - }) -_sym_db.RegisterMessage(AnalyzeDiagnostic) - -AnalyzerInfo = _reflection.GeneratedProtocolMessageType('AnalyzerInfo', (_message.Message,), { - - 'InitialConfigEntry' : _reflection.GeneratedProtocolMessageType('InitialConfigEntry', (_message.Message,), { - 'DESCRIPTOR' : _ANALYZERINFO_INITIALCONFIGENTRY, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzerInfo.InitialConfigEntry) - }) - , - 'DESCRIPTOR' : _ANALYZERINFO, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AnalyzerInfo) - }) -_sym_db.RegisterMessage(AnalyzerInfo) -_sym_db.RegisterMessage(AnalyzerInfo.InitialConfigEntry) - -PolicyInfo = _reflection.GeneratedProtocolMessageType('PolicyInfo', (_message.Message,), { - 'DESCRIPTOR' : _POLICYINFO, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.PolicyInfo) - }) -_sym_db.RegisterMessage(PolicyInfo) - -PolicyConfigSchema = _reflection.GeneratedProtocolMessageType('PolicyConfigSchema', (_message.Message,), { - 'DESCRIPTOR' : _POLICYCONFIGSCHEMA, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.PolicyConfigSchema) - }) -_sym_db.RegisterMessage(PolicyConfigSchema) - -PolicyConfig = _reflection.GeneratedProtocolMessageType('PolicyConfig', (_message.Message,), { - 'DESCRIPTOR' : _POLICYCONFIG, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.PolicyConfig) - }) -_sym_db.RegisterMessage(PolicyConfig) - -ConfigureAnalyzerRequest = _reflection.GeneratedProtocolMessageType('ConfigureAnalyzerRequest', (_message.Message,), { - - 'PolicyConfigEntry' : _reflection.GeneratedProtocolMessageType('PolicyConfigEntry', (_message.Message,), { - 'DESCRIPTOR' : _CONFIGUREANALYZERREQUEST_POLICYCONFIGENTRY, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConfigureAnalyzerRequest.PolicyConfigEntry) - }) - , - 'DESCRIPTOR' : _CONFIGUREANALYZERREQUEST, - '__module__' : 'pulumi.analyzer_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConfigureAnalyzerRequest) - }) -_sym_db.RegisterMessage(ConfigureAnalyzerRequest) -_sym_db.RegisterMessage(ConfigureAnalyzerRequest.PolicyConfigEntry) - -_ANALYZER = DESCRIPTOR.services_by_name['Analyzer'] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pulumi.analyzer_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/sdk/python/lib/pulumi/runtime/proto/engine_pb2.py b/sdk/python/lib/pulumi/runtime/proto/engine_pb2.py index 646ff68a2abc..b950524be242 100644 --- a/sdk/python/lib/pulumi/runtime/proto/engine_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/engine_pb2.py @@ -2,11 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pulumi/engine.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -18,55 +16,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13pulumi/engine.proto\x12\tpulumirpc\x1a\x1bgoogle/protobuf/empty.proto\"y\n\nLogRequest\x12(\n\x08severity\x18\x01 \x01(\x0e\x32\x16.pulumirpc.LogSeverity\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0b\n\x03urn\x18\x03 \x01(\t\x12\x10\n\x08streamId\x18\x04 \x01(\x05\x12\x11\n\tephemeral\x18\x05 \x01(\x08\"\x18\n\x16GetRootResourceRequest\"&\n\x17GetRootResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\"%\n\x16SetRootResourceRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\"\x19\n\x17SetRootResourceResponse*:\n\x0bLogSeverity\x12\t\n\x05\x44\x45\x42UG\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\xf8\x01\n\x06\x45ngine\x12\x36\n\x03Log\x12\x15.pulumirpc.LogRequest\x1a\x16.google.protobuf.Empty\"\x00\x12Z\n\x0fGetRootResource\x12!.pulumirpc.GetRootResourceRequest\x1a\".pulumirpc.GetRootResourceResponse\"\x00\x12Z\n\x0fSetRootResource\x12!.pulumirpc.SetRootResourceRequest\x1a\".pulumirpc.SetRootResourceResponse\"\x00\x42\x34Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') -_LOGSEVERITY = DESCRIPTOR.enum_types_by_name['LogSeverity'] -LogSeverity = enum_type_wrapper.EnumTypeWrapper(_LOGSEVERITY) -DEBUG = 0 -INFO = 1 -WARNING = 2 -ERROR = 3 - - -_LOGREQUEST = DESCRIPTOR.message_types_by_name['LogRequest'] -_GETROOTRESOURCEREQUEST = DESCRIPTOR.message_types_by_name['GetRootResourceRequest'] -_GETROOTRESOURCERESPONSE = DESCRIPTOR.message_types_by_name['GetRootResourceResponse'] -_SETROOTRESOURCEREQUEST = DESCRIPTOR.message_types_by_name['SetRootResourceRequest'] -_SETROOTRESOURCERESPONSE = DESCRIPTOR.message_types_by_name['SetRootResourceResponse'] -LogRequest = _reflection.GeneratedProtocolMessageType('LogRequest', (_message.Message,), { - 'DESCRIPTOR' : _LOGREQUEST, - '__module__' : 'pulumi.engine_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.LogRequest) - }) -_sym_db.RegisterMessage(LogRequest) - -GetRootResourceRequest = _reflection.GeneratedProtocolMessageType('GetRootResourceRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETROOTRESOURCEREQUEST, - '__module__' : 'pulumi.engine_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.GetRootResourceRequest) - }) -_sym_db.RegisterMessage(GetRootResourceRequest) - -GetRootResourceResponse = _reflection.GeneratedProtocolMessageType('GetRootResourceResponse', (_message.Message,), { - 'DESCRIPTOR' : _GETROOTRESOURCERESPONSE, - '__module__' : 'pulumi.engine_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.GetRootResourceResponse) - }) -_sym_db.RegisterMessage(GetRootResourceResponse) - -SetRootResourceRequest = _reflection.GeneratedProtocolMessageType('SetRootResourceRequest', (_message.Message,), { - 'DESCRIPTOR' : _SETROOTRESOURCEREQUEST, - '__module__' : 'pulumi.engine_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.SetRootResourceRequest) - }) -_sym_db.RegisterMessage(SetRootResourceRequest) - -SetRootResourceResponse = _reflection.GeneratedProtocolMessageType('SetRootResourceResponse', (_message.Message,), { - 'DESCRIPTOR' : _SETROOTRESOURCERESPONSE, - '__module__' : 'pulumi.engine_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.SetRootResourceResponse) - }) -_sym_db.RegisterMessage(SetRootResourceResponse) - -_ENGINE = DESCRIPTOR.services_by_name['Engine'] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pulumi.engine_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/sdk/python/lib/pulumi/runtime/proto/errors_pb2.py b/sdk/python/lib/pulumi/runtime/proto/errors_pb2.py index 5b928832db87..fe63ab1f67b9 100644 --- a/sdk/python/lib/pulumi/runtime/proto/errors_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/errors_pb2.py @@ -2,10 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pulumi/errors.proto """Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -16,16 +15,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13pulumi/errors.proto\x12\tpulumirpc\"1\n\nErrorCause\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x12\n\nstackTrace\x18\x02 \x01(\tB4Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') - - -_ERRORCAUSE = DESCRIPTOR.message_types_by_name['ErrorCause'] -ErrorCause = _reflection.GeneratedProtocolMessageType('ErrorCause', (_message.Message,), { - 'DESCRIPTOR' : _ERRORCAUSE, - '__module__' : 'pulumi.errors_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ErrorCause) - }) -_sym_db.RegisterMessage(ErrorCause) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pulumi.errors_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/sdk/python/lib/pulumi/runtime/proto/language_pb2.py b/sdk/python/lib/pulumi/runtime/proto/language_pb2.py index 6a2f5b004279..0efb3cf0bbff 100644 --- a/sdk/python/lib/pulumi/runtime/proto/language_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/language_pb2.py @@ -2,10 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pulumi/language.proto """Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -18,107 +17,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15pulumi/language.proto\x12\tpulumirpc\x1a\x13pulumi/plugin.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9f\x01\n\rAboutResponse\x12\x12\n\nexecutable\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x38\n\x08metadata\x18\x03 \x03(\x0b\x32&.pulumirpc.AboutResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"n\n\x1dGetProgramDependenciesRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x0b\n\x03pwd\x18\x02 \x01(\t\x12\x0f\n\x07program\x18\x03 \x01(\t\x12\x1e\n\x16transitiveDependencies\x18\x04 \x01(\x08\"/\n\x0e\x44\x65pendencyInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"Q\n\x1eGetProgramDependenciesResponse\x12/\n\x0c\x64\x65pendencies\x18\x01 \x03(\x0b\x32\x19.pulumirpc.DependencyInfo\"J\n\x19GetRequiredPluginsRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x0b\n\x03pwd\x18\x02 \x01(\t\x12\x0f\n\x07program\x18\x03 \x01(\t\"J\n\x1aGetRequiredPluginsResponse\x12,\n\x07plugins\x18\x01 \x03(\x0b\x32\x1b.pulumirpc.PluginDependency\"\xb8\x02\n\nRunRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\r\n\x05stack\x18\x02 \x01(\t\x12\x0b\n\x03pwd\x18\x03 \x01(\t\x12\x0f\n\x07program\x18\x04 \x01(\t\x12\x0c\n\x04\x61rgs\x18\x05 \x03(\t\x12\x31\n\x06\x63onfig\x18\x06 \x03(\x0b\x32!.pulumirpc.RunRequest.ConfigEntry\x12\x0e\n\x06\x64ryRun\x18\x07 \x01(\x08\x12\x10\n\x08parallel\x18\x08 \x01(\x05\x12\x17\n\x0fmonitor_address\x18\t \x01(\t\x12\x11\n\tqueryMode\x18\n \x01(\x08\x12\x18\n\x10\x63onfigSecretKeys\x18\x0b \x03(\t\x12\x14\n\x0corganization\x18\x0c \x01(\t\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x0bRunResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\x12\x0c\n\x04\x62\x61il\x18\x02 \x01(\x08\"D\n\x1aInstallDependenciesRequest\x12\x11\n\tdirectory\x18\x01 \x01(\t\x12\x13\n\x0bis_terminal\x18\x02 \x01(\x08\"=\n\x1bInstallDependenciesResponse\x12\x0e\n\x06stdout\x18\x01 \x01(\x0c\x12\x0e\n\x06stderr\x18\x02 \x01(\x0c\x32\x88\x04\n\x0fLanguageRuntime\x12\x63\n\x12GetRequiredPlugins\x12$.pulumirpc.GetRequiredPluginsRequest\x1a%.pulumirpc.GetRequiredPluginsResponse\"\x00\x12\x36\n\x03Run\x12\x15.pulumirpc.RunRequest\x1a\x16.pulumirpc.RunResponse\"\x00\x12@\n\rGetPluginInfo\x12\x16.google.protobuf.Empty\x1a\x15.pulumirpc.PluginInfo\"\x00\x12h\n\x13InstallDependencies\x12%.pulumirpc.InstallDependenciesRequest\x1a&.pulumirpc.InstallDependenciesResponse\"\x00\x30\x01\x12;\n\x05\x41\x62out\x12\x16.google.protobuf.Empty\x1a\x18.pulumirpc.AboutResponse\"\x00\x12o\n\x16GetProgramDependencies\x12(.pulumirpc.GetProgramDependenciesRequest\x1a).pulumirpc.GetProgramDependenciesResponse\"\x00\x42\x34Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') - - -_ABOUTRESPONSE = DESCRIPTOR.message_types_by_name['AboutResponse'] -_ABOUTRESPONSE_METADATAENTRY = _ABOUTRESPONSE.nested_types_by_name['MetadataEntry'] -_GETPROGRAMDEPENDENCIESREQUEST = DESCRIPTOR.message_types_by_name['GetProgramDependenciesRequest'] -_DEPENDENCYINFO = DESCRIPTOR.message_types_by_name['DependencyInfo'] -_GETPROGRAMDEPENDENCIESRESPONSE = DESCRIPTOR.message_types_by_name['GetProgramDependenciesResponse'] -_GETREQUIREDPLUGINSREQUEST = DESCRIPTOR.message_types_by_name['GetRequiredPluginsRequest'] -_GETREQUIREDPLUGINSRESPONSE = DESCRIPTOR.message_types_by_name['GetRequiredPluginsResponse'] -_RUNREQUEST = DESCRIPTOR.message_types_by_name['RunRequest'] -_RUNREQUEST_CONFIGENTRY = _RUNREQUEST.nested_types_by_name['ConfigEntry'] -_RUNRESPONSE = DESCRIPTOR.message_types_by_name['RunResponse'] -_INSTALLDEPENDENCIESREQUEST = DESCRIPTOR.message_types_by_name['InstallDependenciesRequest'] -_INSTALLDEPENDENCIESRESPONSE = DESCRIPTOR.message_types_by_name['InstallDependenciesResponse'] -AboutResponse = _reflection.GeneratedProtocolMessageType('AboutResponse', (_message.Message,), { - - 'MetadataEntry' : _reflection.GeneratedProtocolMessageType('MetadataEntry', (_message.Message,), { - 'DESCRIPTOR' : _ABOUTRESPONSE_METADATAENTRY, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AboutResponse.MetadataEntry) - }) - , - 'DESCRIPTOR' : _ABOUTRESPONSE, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.AboutResponse) - }) -_sym_db.RegisterMessage(AboutResponse) -_sym_db.RegisterMessage(AboutResponse.MetadataEntry) - -GetProgramDependenciesRequest = _reflection.GeneratedProtocolMessageType('GetProgramDependenciesRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETPROGRAMDEPENDENCIESREQUEST, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.GetProgramDependenciesRequest) - }) -_sym_db.RegisterMessage(GetProgramDependenciesRequest) - -DependencyInfo = _reflection.GeneratedProtocolMessageType('DependencyInfo', (_message.Message,), { - 'DESCRIPTOR' : _DEPENDENCYINFO, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.DependencyInfo) - }) -_sym_db.RegisterMessage(DependencyInfo) - -GetProgramDependenciesResponse = _reflection.GeneratedProtocolMessageType('GetProgramDependenciesResponse', (_message.Message,), { - 'DESCRIPTOR' : _GETPROGRAMDEPENDENCIESRESPONSE, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.GetProgramDependenciesResponse) - }) -_sym_db.RegisterMessage(GetProgramDependenciesResponse) - -GetRequiredPluginsRequest = _reflection.GeneratedProtocolMessageType('GetRequiredPluginsRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETREQUIREDPLUGINSREQUEST, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.GetRequiredPluginsRequest) - }) -_sym_db.RegisterMessage(GetRequiredPluginsRequest) - -GetRequiredPluginsResponse = _reflection.GeneratedProtocolMessageType('GetRequiredPluginsResponse', (_message.Message,), { - 'DESCRIPTOR' : _GETREQUIREDPLUGINSRESPONSE, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.GetRequiredPluginsResponse) - }) -_sym_db.RegisterMessage(GetRequiredPluginsResponse) - -RunRequest = _reflection.GeneratedProtocolMessageType('RunRequest', (_message.Message,), { - - 'ConfigEntry' : _reflection.GeneratedProtocolMessageType('ConfigEntry', (_message.Message,), { - 'DESCRIPTOR' : _RUNREQUEST_CONFIGENTRY, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RunRequest.ConfigEntry) - }) - , - 'DESCRIPTOR' : _RUNREQUEST, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RunRequest) - }) -_sym_db.RegisterMessage(RunRequest) -_sym_db.RegisterMessage(RunRequest.ConfigEntry) - -RunResponse = _reflection.GeneratedProtocolMessageType('RunResponse', (_message.Message,), { - 'DESCRIPTOR' : _RUNRESPONSE, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RunResponse) - }) -_sym_db.RegisterMessage(RunResponse) - -InstallDependenciesRequest = _reflection.GeneratedProtocolMessageType('InstallDependenciesRequest', (_message.Message,), { - 'DESCRIPTOR' : _INSTALLDEPENDENCIESREQUEST, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.InstallDependenciesRequest) - }) -_sym_db.RegisterMessage(InstallDependenciesRequest) - -InstallDependenciesResponse = _reflection.GeneratedProtocolMessageType('InstallDependenciesResponse', (_message.Message,), { - 'DESCRIPTOR' : _INSTALLDEPENDENCIESRESPONSE, - '__module__' : 'pulumi.language_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.InstallDependenciesResponse) - }) -_sym_db.RegisterMessage(InstallDependenciesResponse) - -_LANGUAGERUNTIME = DESCRIPTOR.services_by_name['LanguageRuntime'] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pulumi.language_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/sdk/python/lib/pulumi/runtime/proto/plugin_pb2.py b/sdk/python/lib/pulumi/runtime/proto/plugin_pb2.py index 4cd7f27ab047..8d5458c4a91a 100644 --- a/sdk/python/lib/pulumi/runtime/proto/plugin_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/plugin_pb2.py @@ -2,10 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pulumi/plugin.proto """Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -16,32 +15,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13pulumi/plugin.proto\x12\tpulumirpc\"\x1d\n\nPluginInfo\x12\x0f\n\x07version\x18\x01 \x01(\t\"O\n\x10PluginDependency\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x0e\n\x06server\x18\x04 \x01(\t\"\x1f\n\x0cPluginAttach\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB4Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') - - -_PLUGININFO = DESCRIPTOR.message_types_by_name['PluginInfo'] -_PLUGINDEPENDENCY = DESCRIPTOR.message_types_by_name['PluginDependency'] -_PLUGINATTACH = DESCRIPTOR.message_types_by_name['PluginAttach'] -PluginInfo = _reflection.GeneratedProtocolMessageType('PluginInfo', (_message.Message,), { - 'DESCRIPTOR' : _PLUGININFO, - '__module__' : 'pulumi.plugin_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.PluginInfo) - }) -_sym_db.RegisterMessage(PluginInfo) - -PluginDependency = _reflection.GeneratedProtocolMessageType('PluginDependency', (_message.Message,), { - 'DESCRIPTOR' : _PLUGINDEPENDENCY, - '__module__' : 'pulumi.plugin_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.PluginDependency) - }) -_sym_db.RegisterMessage(PluginDependency) - -PluginAttach = _reflection.GeneratedProtocolMessageType('PluginAttach', (_message.Message,), { - 'DESCRIPTOR' : _PLUGINATTACH, - '__module__' : 'pulumi.plugin_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.PluginAttach) - }) -_sym_db.RegisterMessage(PluginAttach) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pulumi.plugin_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py b/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py index ea9e84b47f40..3f7ce819820d 100644 --- a/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py @@ -2,10 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pulumi/provider.proto """Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -19,337 +18,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15pulumi/provider.proto\x12\tpulumirpc\x1a\x13pulumi/plugin.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\"s\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\x12\x15\n\racceptOutputs\x18\x04 \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\"\x80\x01\n\rInvokeRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructJ\x04\x08\x03\x10\x07R\x08providerR\x07versionR\x0f\x61\x63\x63\x65ptResourcesR\x11pluginDownloadURL\"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\"\xbe\x04\n\x0b\x43\x61llRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x44\n\x0f\x61rgDependencies\x18\x03 \x03(\x0b\x32+.pulumirpc.CallRequest.ArgDependenciesEntry\x12\x10\n\x08provider\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x12\x19\n\x11pluginDownloadURL\x18\r \x01(\t\x12\x0f\n\x07project\x18\x06 \x01(\t\x12\r\n\x05stack\x18\x07 \x01(\t\x12\x32\n\x06\x63onfig\x18\x08 \x03(\x0b\x32\".pulumirpc.CallRequest.ConfigEntry\x12\x18\n\x10\x63onfigSecretKeys\x18\t \x03(\t\x12\x0e\n\x06\x64ryRun\x18\n \x01(\x08\x12\x10\n\x08parallel\x18\x0b \x01(\x05\x12\x17\n\x0fmonitorEndpoint\x18\x0c \x01(\t\x12\x14\n\x0corganization\x18\x0e \x01(\t\x1a$\n\x14\x41rgumentDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a\x63\n\x14\x41rgDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.pulumirpc.CallRequest.ArgumentDependencies:\x02\x38\x01\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xba\x02\n\x0c\x43\x61llResponse\x12\'\n\x06return\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12K\n\x12returnDependencies\x18\x02 \x03(\x0b\x32/.pulumirpc.CallResponse.ReturnDependenciesEntry\x12)\n\x08\x66\x61ilures\x18\x03 \x03(\x0b\x32\x17.pulumirpc.CheckFailure\x1a\"\n\x12ReturnDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a\x65\n\x17ReturnDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.pulumirpc.CallResponse.ReturnDependencies:\x02\x38\x01\"\x93\x01\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\x12\x12\n\nrandomSeed\x18\x05 \x01(\x0cJ\x04\x08\x04\x10\x05R\x0esequenceNumber\"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\"\xe4\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\x12\x14\n\x0corganization\x18\x11 \x01(\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\xe9\x08\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\x39\n\x04\x43\x61ll\x12\x16.pulumirpc.CallRequest\x1a\x17.pulumirpc.CallResponse\"\x00\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\x12;\n\x06\x41ttach\x12\x17.pulumirpc.PluginAttach\x1a\x16.google.protobuf.Empty\"\x00\x42\x34Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') - - -_GETSCHEMAREQUEST = DESCRIPTOR.message_types_by_name['GetSchemaRequest'] -_GETSCHEMARESPONSE = DESCRIPTOR.message_types_by_name['GetSchemaResponse'] -_CONFIGUREREQUEST = DESCRIPTOR.message_types_by_name['ConfigureRequest'] -_CONFIGUREREQUEST_VARIABLESENTRY = _CONFIGUREREQUEST.nested_types_by_name['VariablesEntry'] -_CONFIGURERESPONSE = DESCRIPTOR.message_types_by_name['ConfigureResponse'] -_CONFIGUREERRORMISSINGKEYS = DESCRIPTOR.message_types_by_name['ConfigureErrorMissingKeys'] -_CONFIGUREERRORMISSINGKEYS_MISSINGKEY = _CONFIGUREERRORMISSINGKEYS.nested_types_by_name['MissingKey'] -_INVOKEREQUEST = DESCRIPTOR.message_types_by_name['InvokeRequest'] -_INVOKERESPONSE = DESCRIPTOR.message_types_by_name['InvokeResponse'] -_CALLREQUEST = DESCRIPTOR.message_types_by_name['CallRequest'] -_CALLREQUEST_ARGUMENTDEPENDENCIES = _CALLREQUEST.nested_types_by_name['ArgumentDependencies'] -_CALLREQUEST_ARGDEPENDENCIESENTRY = _CALLREQUEST.nested_types_by_name['ArgDependenciesEntry'] -_CALLREQUEST_CONFIGENTRY = _CALLREQUEST.nested_types_by_name['ConfigEntry'] -_CALLRESPONSE = DESCRIPTOR.message_types_by_name['CallResponse'] -_CALLRESPONSE_RETURNDEPENDENCIES = _CALLRESPONSE.nested_types_by_name['ReturnDependencies'] -_CALLRESPONSE_RETURNDEPENDENCIESENTRY = _CALLRESPONSE.nested_types_by_name['ReturnDependenciesEntry'] -_CHECKREQUEST = DESCRIPTOR.message_types_by_name['CheckRequest'] -_CHECKRESPONSE = DESCRIPTOR.message_types_by_name['CheckResponse'] -_CHECKFAILURE = DESCRIPTOR.message_types_by_name['CheckFailure'] -_DIFFREQUEST = DESCRIPTOR.message_types_by_name['DiffRequest'] -_PROPERTYDIFF = DESCRIPTOR.message_types_by_name['PropertyDiff'] -_DIFFRESPONSE = DESCRIPTOR.message_types_by_name['DiffResponse'] -_DIFFRESPONSE_DETAILEDDIFFENTRY = _DIFFRESPONSE.nested_types_by_name['DetailedDiffEntry'] -_CREATEREQUEST = DESCRIPTOR.message_types_by_name['CreateRequest'] -_CREATERESPONSE = DESCRIPTOR.message_types_by_name['CreateResponse'] -_READREQUEST = DESCRIPTOR.message_types_by_name['ReadRequest'] -_READRESPONSE = DESCRIPTOR.message_types_by_name['ReadResponse'] -_UPDATEREQUEST = DESCRIPTOR.message_types_by_name['UpdateRequest'] -_UPDATERESPONSE = DESCRIPTOR.message_types_by_name['UpdateResponse'] -_DELETEREQUEST = DESCRIPTOR.message_types_by_name['DeleteRequest'] -_CONSTRUCTREQUEST = DESCRIPTOR.message_types_by_name['ConstructRequest'] -_CONSTRUCTREQUEST_PROPERTYDEPENDENCIES = _CONSTRUCTREQUEST.nested_types_by_name['PropertyDependencies'] -_CONSTRUCTREQUEST_CONFIGENTRY = _CONSTRUCTREQUEST.nested_types_by_name['ConfigEntry'] -_CONSTRUCTREQUEST_INPUTDEPENDENCIESENTRY = _CONSTRUCTREQUEST.nested_types_by_name['InputDependenciesEntry'] -_CONSTRUCTREQUEST_PROVIDERSENTRY = _CONSTRUCTREQUEST.nested_types_by_name['ProvidersEntry'] -_CONSTRUCTRESPONSE = DESCRIPTOR.message_types_by_name['ConstructResponse'] -_CONSTRUCTRESPONSE_PROPERTYDEPENDENCIES = _CONSTRUCTRESPONSE.nested_types_by_name['PropertyDependencies'] -_CONSTRUCTRESPONSE_STATEDEPENDENCIESENTRY = _CONSTRUCTRESPONSE.nested_types_by_name['StateDependenciesEntry'] -_ERRORRESOURCEINITFAILED = DESCRIPTOR.message_types_by_name['ErrorResourceInitFailed'] -_PROPERTYDIFF_KIND = _PROPERTYDIFF.enum_types_by_name['Kind'] -_DIFFRESPONSE_DIFFCHANGES = _DIFFRESPONSE.enum_types_by_name['DiffChanges'] -GetSchemaRequest = _reflection.GeneratedProtocolMessageType('GetSchemaRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETSCHEMAREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.GetSchemaRequest) - }) -_sym_db.RegisterMessage(GetSchemaRequest) - -GetSchemaResponse = _reflection.GeneratedProtocolMessageType('GetSchemaResponse', (_message.Message,), { - 'DESCRIPTOR' : _GETSCHEMARESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.GetSchemaResponse) - }) -_sym_db.RegisterMessage(GetSchemaResponse) - -ConfigureRequest = _reflection.GeneratedProtocolMessageType('ConfigureRequest', (_message.Message,), { - - 'VariablesEntry' : _reflection.GeneratedProtocolMessageType('VariablesEntry', (_message.Message,), { - 'DESCRIPTOR' : _CONFIGUREREQUEST_VARIABLESENTRY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConfigureRequest.VariablesEntry) - }) - , - 'DESCRIPTOR' : _CONFIGUREREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConfigureRequest) - }) -_sym_db.RegisterMessage(ConfigureRequest) -_sym_db.RegisterMessage(ConfigureRequest.VariablesEntry) - -ConfigureResponse = _reflection.GeneratedProtocolMessageType('ConfigureResponse', (_message.Message,), { - 'DESCRIPTOR' : _CONFIGURERESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConfigureResponse) - }) -_sym_db.RegisterMessage(ConfigureResponse) - -ConfigureErrorMissingKeys = _reflection.GeneratedProtocolMessageType('ConfigureErrorMissingKeys', (_message.Message,), { - - 'MissingKey' : _reflection.GeneratedProtocolMessageType('MissingKey', (_message.Message,), { - 'DESCRIPTOR' : _CONFIGUREERRORMISSINGKEYS_MISSINGKEY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConfigureErrorMissingKeys.MissingKey) - }) - , - 'DESCRIPTOR' : _CONFIGUREERRORMISSINGKEYS, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConfigureErrorMissingKeys) - }) -_sym_db.RegisterMessage(ConfigureErrorMissingKeys) -_sym_db.RegisterMessage(ConfigureErrorMissingKeys.MissingKey) - -InvokeRequest = _reflection.GeneratedProtocolMessageType('InvokeRequest', (_message.Message,), { - 'DESCRIPTOR' : _INVOKEREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.InvokeRequest) - }) -_sym_db.RegisterMessage(InvokeRequest) - -InvokeResponse = _reflection.GeneratedProtocolMessageType('InvokeResponse', (_message.Message,), { - 'DESCRIPTOR' : _INVOKERESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.InvokeResponse) - }) -_sym_db.RegisterMessage(InvokeResponse) - -CallRequest = _reflection.GeneratedProtocolMessageType('CallRequest', (_message.Message,), { - - 'ArgumentDependencies' : _reflection.GeneratedProtocolMessageType('ArgumentDependencies', (_message.Message,), { - 'DESCRIPTOR' : _CALLREQUEST_ARGUMENTDEPENDENCIES, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CallRequest.ArgumentDependencies) - }) - , - - 'ArgDependenciesEntry' : _reflection.GeneratedProtocolMessageType('ArgDependenciesEntry', (_message.Message,), { - 'DESCRIPTOR' : _CALLREQUEST_ARGDEPENDENCIESENTRY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CallRequest.ArgDependenciesEntry) - }) - , - - 'ConfigEntry' : _reflection.GeneratedProtocolMessageType('ConfigEntry', (_message.Message,), { - 'DESCRIPTOR' : _CALLREQUEST_CONFIGENTRY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CallRequest.ConfigEntry) - }) - , - 'DESCRIPTOR' : _CALLREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CallRequest) - }) -_sym_db.RegisterMessage(CallRequest) -_sym_db.RegisterMessage(CallRequest.ArgumentDependencies) -_sym_db.RegisterMessage(CallRequest.ArgDependenciesEntry) -_sym_db.RegisterMessage(CallRequest.ConfigEntry) - -CallResponse = _reflection.GeneratedProtocolMessageType('CallResponse', (_message.Message,), { - - 'ReturnDependencies' : _reflection.GeneratedProtocolMessageType('ReturnDependencies', (_message.Message,), { - 'DESCRIPTOR' : _CALLRESPONSE_RETURNDEPENDENCIES, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CallResponse.ReturnDependencies) - }) - , - - 'ReturnDependenciesEntry' : _reflection.GeneratedProtocolMessageType('ReturnDependenciesEntry', (_message.Message,), { - 'DESCRIPTOR' : _CALLRESPONSE_RETURNDEPENDENCIESENTRY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CallResponse.ReturnDependenciesEntry) - }) - , - 'DESCRIPTOR' : _CALLRESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CallResponse) - }) -_sym_db.RegisterMessage(CallResponse) -_sym_db.RegisterMessage(CallResponse.ReturnDependencies) -_sym_db.RegisterMessage(CallResponse.ReturnDependenciesEntry) - -CheckRequest = _reflection.GeneratedProtocolMessageType('CheckRequest', (_message.Message,), { - 'DESCRIPTOR' : _CHECKREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CheckRequest) - }) -_sym_db.RegisterMessage(CheckRequest) - -CheckResponse = _reflection.GeneratedProtocolMessageType('CheckResponse', (_message.Message,), { - 'DESCRIPTOR' : _CHECKRESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CheckResponse) - }) -_sym_db.RegisterMessage(CheckResponse) - -CheckFailure = _reflection.GeneratedProtocolMessageType('CheckFailure', (_message.Message,), { - 'DESCRIPTOR' : _CHECKFAILURE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CheckFailure) - }) -_sym_db.RegisterMessage(CheckFailure) - -DiffRequest = _reflection.GeneratedProtocolMessageType('DiffRequest', (_message.Message,), { - 'DESCRIPTOR' : _DIFFREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.DiffRequest) - }) -_sym_db.RegisterMessage(DiffRequest) - -PropertyDiff = _reflection.GeneratedProtocolMessageType('PropertyDiff', (_message.Message,), { - 'DESCRIPTOR' : _PROPERTYDIFF, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.PropertyDiff) - }) -_sym_db.RegisterMessage(PropertyDiff) - -DiffResponse = _reflection.GeneratedProtocolMessageType('DiffResponse', (_message.Message,), { - - 'DetailedDiffEntry' : _reflection.GeneratedProtocolMessageType('DetailedDiffEntry', (_message.Message,), { - 'DESCRIPTOR' : _DIFFRESPONSE_DETAILEDDIFFENTRY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.DiffResponse.DetailedDiffEntry) - }) - , - 'DESCRIPTOR' : _DIFFRESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.DiffResponse) - }) -_sym_db.RegisterMessage(DiffResponse) -_sym_db.RegisterMessage(DiffResponse.DetailedDiffEntry) - -CreateRequest = _reflection.GeneratedProtocolMessageType('CreateRequest', (_message.Message,), { - 'DESCRIPTOR' : _CREATEREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CreateRequest) - }) -_sym_db.RegisterMessage(CreateRequest) - -CreateResponse = _reflection.GeneratedProtocolMessageType('CreateResponse', (_message.Message,), { - 'DESCRIPTOR' : _CREATERESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.CreateResponse) - }) -_sym_db.RegisterMessage(CreateResponse) - -ReadRequest = _reflection.GeneratedProtocolMessageType('ReadRequest', (_message.Message,), { - 'DESCRIPTOR' : _READREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ReadRequest) - }) -_sym_db.RegisterMessage(ReadRequest) - -ReadResponse = _reflection.GeneratedProtocolMessageType('ReadResponse', (_message.Message,), { - 'DESCRIPTOR' : _READRESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ReadResponse) - }) -_sym_db.RegisterMessage(ReadResponse) - -UpdateRequest = _reflection.GeneratedProtocolMessageType('UpdateRequest', (_message.Message,), { - 'DESCRIPTOR' : _UPDATEREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.UpdateRequest) - }) -_sym_db.RegisterMessage(UpdateRequest) - -UpdateResponse = _reflection.GeneratedProtocolMessageType('UpdateResponse', (_message.Message,), { - 'DESCRIPTOR' : _UPDATERESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.UpdateResponse) - }) -_sym_db.RegisterMessage(UpdateResponse) - -DeleteRequest = _reflection.GeneratedProtocolMessageType('DeleteRequest', (_message.Message,), { - 'DESCRIPTOR' : _DELETEREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.DeleteRequest) - }) -_sym_db.RegisterMessage(DeleteRequest) - -ConstructRequest = _reflection.GeneratedProtocolMessageType('ConstructRequest', (_message.Message,), { - - 'PropertyDependencies' : _reflection.GeneratedProtocolMessageType('PropertyDependencies', (_message.Message,), { - 'DESCRIPTOR' : _CONSTRUCTREQUEST_PROPERTYDEPENDENCIES, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConstructRequest.PropertyDependencies) - }) - , - - 'ConfigEntry' : _reflection.GeneratedProtocolMessageType('ConfigEntry', (_message.Message,), { - 'DESCRIPTOR' : _CONSTRUCTREQUEST_CONFIGENTRY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConstructRequest.ConfigEntry) - }) - , - - 'InputDependenciesEntry' : _reflection.GeneratedProtocolMessageType('InputDependenciesEntry', (_message.Message,), { - 'DESCRIPTOR' : _CONSTRUCTREQUEST_INPUTDEPENDENCIESENTRY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConstructRequest.InputDependenciesEntry) - }) - , - - 'ProvidersEntry' : _reflection.GeneratedProtocolMessageType('ProvidersEntry', (_message.Message,), { - 'DESCRIPTOR' : _CONSTRUCTREQUEST_PROVIDERSENTRY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConstructRequest.ProvidersEntry) - }) - , - 'DESCRIPTOR' : _CONSTRUCTREQUEST, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConstructRequest) - }) -_sym_db.RegisterMessage(ConstructRequest) -_sym_db.RegisterMessage(ConstructRequest.PropertyDependencies) -_sym_db.RegisterMessage(ConstructRequest.ConfigEntry) -_sym_db.RegisterMessage(ConstructRequest.InputDependenciesEntry) -_sym_db.RegisterMessage(ConstructRequest.ProvidersEntry) - -ConstructResponse = _reflection.GeneratedProtocolMessageType('ConstructResponse', (_message.Message,), { - - 'PropertyDependencies' : _reflection.GeneratedProtocolMessageType('PropertyDependencies', (_message.Message,), { - 'DESCRIPTOR' : _CONSTRUCTRESPONSE_PROPERTYDEPENDENCIES, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConstructResponse.PropertyDependencies) - }) - , - - 'StateDependenciesEntry' : _reflection.GeneratedProtocolMessageType('StateDependenciesEntry', (_message.Message,), { - 'DESCRIPTOR' : _CONSTRUCTRESPONSE_STATEDEPENDENCIESENTRY, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConstructResponse.StateDependenciesEntry) - }) - , - 'DESCRIPTOR' : _CONSTRUCTRESPONSE, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ConstructResponse) - }) -_sym_db.RegisterMessage(ConstructResponse) -_sym_db.RegisterMessage(ConstructResponse.PropertyDependencies) -_sym_db.RegisterMessage(ConstructResponse.StateDependenciesEntry) - -ErrorResourceInitFailed = _reflection.GeneratedProtocolMessageType('ErrorResourceInitFailed', (_message.Message,), { - 'DESCRIPTOR' : _ERRORRESOURCEINITFAILED, - '__module__' : 'pulumi.provider_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ErrorResourceInitFailed) - }) -_sym_db.RegisterMessage(ErrorResourceInitFailed) - -_RESOURCEPROVIDER = DESCRIPTOR.services_by_name['ResourceProvider'] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pulumi.provider_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/sdk/python/lib/pulumi/runtime/proto/resource_pb2.py b/sdk/python/lib/pulumi/runtime/proto/resource_pb2.py index 2922cb4abe4a..5d58a4f9202f 100644 --- a/sdk/python/lib/pulumi/runtime/proto/resource_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/resource_pb2.py @@ -2,10 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pulumi/resource.proto """Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -18,129 +17,10 @@ from . import alias_pb2 as pulumi_dot_alias__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15pulumi/resource.proto\x12\tpulumirpc\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15pulumi/provider.proto\x1a\x12pulumi/alias.proto\"$\n\x16SupportsFeatureRequest\x12\n\n\x02id\x18\x01 \x01(\t\"-\n\x17SupportsFeatureResponse\x12\x12\n\nhasSupport\x18\x01 \x01(\x08\"\xae\x02\n\x13ReadResourceRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12+\n\nproperties\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x14\n\x0c\x64\x65pendencies\x18\x06 \x03(\t\x12\x10\n\x08provider\x18\x07 \x01(\t\x12\x0f\n\x07version\x18\x08 \x01(\t\x12\x15\n\racceptSecrets\x18\t \x01(\x08\x12\x1f\n\x17\x61\x64\x64itionalSecretOutputs\x18\n \x03(\t\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x0c \x01(\x08\x12\x19\n\x11pluginDownloadURL\x18\r \x01(\tJ\x04\x08\x0b\x10\x0cR\x07\x61liases\"P\n\x14ReadResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xb2\x08\n\x17RegisterResourceRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x0e\n\x06\x63ustom\x18\x04 \x01(\x08\x12\'\n\x06object\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07protect\x18\x06 \x01(\x08\x12\x14\n\x0c\x64\x65pendencies\x18\x07 \x03(\t\x12\x10\n\x08provider\x18\x08 \x01(\t\x12Z\n\x14propertyDependencies\x18\t \x03(\x0b\x32<.pulumirpc.RegisterResourceRequest.PropertyDependenciesEntry\x12\x1b\n\x13\x64\x65leteBeforeReplace\x18\n \x01(\x08\x12\x0f\n\x07version\x18\x0b \x01(\t\x12\x15\n\rignoreChanges\x18\x0c \x03(\t\x12\x15\n\racceptSecrets\x18\r \x01(\x08\x12\x1f\n\x17\x61\x64\x64itionalSecretOutputs\x18\x0e \x03(\t\x12\x11\n\taliasURNs\x18\x0f \x03(\t\x12\x10\n\x08importId\x18\x10 \x01(\t\x12I\n\x0e\x63ustomTimeouts\x18\x11 \x01(\x0b\x32\x31.pulumirpc.RegisterResourceRequest.CustomTimeouts\x12\"\n\x1a\x64\x65leteBeforeReplaceDefined\x18\x12 \x01(\x08\x12\x1d\n\x15supportsPartialValues\x18\x13 \x01(\x08\x12\x0e\n\x06remote\x18\x14 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x15 \x01(\x08\x12\x44\n\tproviders\x18\x16 \x03(\x0b\x32\x31.pulumirpc.RegisterResourceRequest.ProvidersEntry\x12\x18\n\x10replaceOnChanges\x18\x17 \x03(\t\x12\x19\n\x11pluginDownloadURL\x18\x18 \x01(\t\x12\x16\n\x0eretainOnDelete\x18\x19 \x01(\x08\x12!\n\x07\x61liases\x18\x1a \x03(\x0b\x32\x10.pulumirpc.Alias\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a@\n\x0e\x43ustomTimeouts\x12\x0e\n\x06\x63reate\x18\x01 \x01(\t\x12\x0e\n\x06update\x18\x02 \x01(\t\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\t\x1at\n\x19PropertyDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.pulumirpc.RegisterResourceRequest.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\"\xf7\x02\n\x18RegisterResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\'\n\x06object\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0e\n\x06stable\x18\x04 \x01(\x08\x12\x0f\n\x07stables\x18\x05 \x03(\t\x12[\n\x14propertyDependencies\x18\x06 \x03(\x0b\x32=.pulumirpc.RegisterResourceResponse.PropertyDependenciesEntry\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1au\n\x19PropertyDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.pulumirpc.RegisterResourceResponse.PropertyDependencies:\x02\x38\x01\"W\n\x1eRegisterResourceOutputsRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12(\n\x07outputs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa2\x01\n\x15ResourceInvokeRequest\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\x12\x19\n\x11pluginDownloadURL\x18\x06 \x01(\t2\xd4\x04\n\x0fResourceMonitor\x12Z\n\x0fSupportsFeature\x12!.pulumirpc.SupportsFeatureRequest\x1a\".pulumirpc.SupportsFeatureResponse\"\x00\x12G\n\x06Invoke\x12 .pulumirpc.ResourceInvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x12O\n\x0cStreamInvoke\x12 .pulumirpc.ResourceInvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x30\x01\x12\x39\n\x04\x43\x61ll\x12\x16.pulumirpc.CallRequest\x1a\x17.pulumirpc.CallResponse\"\x00\x12Q\n\x0cReadResource\x12\x1e.pulumirpc.ReadResourceRequest\x1a\x1f.pulumirpc.ReadResourceResponse\"\x00\x12]\n\x10RegisterResource\x12\".pulumirpc.RegisterResourceRequest\x1a#.pulumirpc.RegisterResourceResponse\"\x00\x12^\n\x17RegisterResourceOutputs\x12).pulumirpc.RegisterResourceOutputsRequest\x1a\x16.google.protobuf.Empty\"\x00\x42\x34Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15pulumi/resource.proto\x12\tpulumirpc\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15pulumi/provider.proto\x1a\x12pulumi/alias.proto\"$\n\x16SupportsFeatureRequest\x12\n\n\x02id\x18\x01 \x01(\t\"-\n\x17SupportsFeatureResponse\x12\x12\n\nhasSupport\x18\x01 \x01(\x08\"\xae\x02\n\x13ReadResourceRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12+\n\nproperties\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x14\n\x0c\x64\x65pendencies\x18\x06 \x03(\t\x12\x10\n\x08provider\x18\x07 \x01(\t\x12\x0f\n\x07version\x18\x08 \x01(\t\x12\x15\n\racceptSecrets\x18\t \x01(\x08\x12\x1f\n\x17\x61\x64\x64itionalSecretOutputs\x18\n \x03(\t\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x0c \x01(\x08\x12\x19\n\x11pluginDownloadURL\x18\r \x01(\tJ\x04\x08\x0b\x10\x0cR\x07\x61liases\"P\n\x14ReadResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xc7\x08\n\x17RegisterResourceRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x0e\n\x06\x63ustom\x18\x04 \x01(\x08\x12\'\n\x06object\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07protect\x18\x06 \x01(\x08\x12\x14\n\x0c\x64\x65pendencies\x18\x07 \x03(\t\x12\x10\n\x08provider\x18\x08 \x01(\t\x12Z\n\x14propertyDependencies\x18\t \x03(\x0b\x32<.pulumirpc.RegisterResourceRequest.PropertyDependenciesEntry\x12\x1b\n\x13\x64\x65leteBeforeReplace\x18\n \x01(\x08\x12\x0f\n\x07version\x18\x0b \x01(\t\x12\x15\n\rignoreChanges\x18\x0c \x03(\t\x12\x15\n\racceptSecrets\x18\r \x01(\x08\x12\x1f\n\x17\x61\x64\x64itionalSecretOutputs\x18\x0e \x03(\t\x12\x11\n\taliasURNs\x18\x0f \x03(\t\x12\x10\n\x08importId\x18\x10 \x01(\t\x12I\n\x0e\x63ustomTimeouts\x18\x11 \x01(\x0b\x32\x31.pulumirpc.RegisterResourceRequest.CustomTimeouts\x12\"\n\x1a\x64\x65leteBeforeReplaceDefined\x18\x12 \x01(\x08\x12\x1d\n\x15supportsPartialValues\x18\x13 \x01(\x08\x12\x0e\n\x06remote\x18\x14 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x15 \x01(\x08\x12\x44\n\tproviders\x18\x16 \x03(\x0b\x32\x31.pulumirpc.RegisterResourceRequest.ProvidersEntry\x12\x18\n\x10replaceOnChanges\x18\x17 \x03(\t\x12\x19\n\x11pluginDownloadURL\x18\x18 \x01(\t\x12\x16\n\x0eretainOnDelete\x18\x19 \x01(\x08\x12!\n\x07\x61liases\x18\x1a \x03(\x0b\x32\x10.pulumirpc.Alias\x12\x13\n\x0b\x64\x65letedWith\x18\x1b \x01(\t\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a@\n\x0e\x43ustomTimeouts\x12\x0e\n\x06\x63reate\x18\x01 \x01(\t\x12\x0e\n\x06update\x18\x02 \x01(\t\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\t\x1at\n\x19PropertyDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.pulumirpc.RegisterResourceRequest.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\"\xf7\x02\n\x18RegisterResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\'\n\x06object\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0e\n\x06stable\x18\x04 \x01(\x08\x12\x0f\n\x07stables\x18\x05 \x03(\t\x12[\n\x14propertyDependencies\x18\x06 \x03(\x0b\x32=.pulumirpc.RegisterResourceResponse.PropertyDependenciesEntry\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1au\n\x19PropertyDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.pulumirpc.RegisterResourceResponse.PropertyDependencies:\x02\x38\x01\"W\n\x1eRegisterResourceOutputsRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12(\n\x07outputs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa2\x01\n\x15ResourceInvokeRequest\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\x12\x19\n\x11pluginDownloadURL\x18\x06 \x01(\t2\xd4\x04\n\x0fResourceMonitor\x12Z\n\x0fSupportsFeature\x12!.pulumirpc.SupportsFeatureRequest\x1a\".pulumirpc.SupportsFeatureResponse\"\x00\x12G\n\x06Invoke\x12 .pulumirpc.ResourceInvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x12O\n\x0cStreamInvoke\x12 .pulumirpc.ResourceInvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x30\x01\x12\x39\n\x04\x43\x61ll\x12\x16.pulumirpc.CallRequest\x1a\x17.pulumirpc.CallResponse\"\x00\x12Q\n\x0cReadResource\x12\x1e.pulumirpc.ReadResourceRequest\x1a\x1f.pulumirpc.ReadResourceResponse\"\x00\x12]\n\x10RegisterResource\x12\".pulumirpc.RegisterResourceRequest\x1a#.pulumirpc.RegisterResourceResponse\"\x00\x12^\n\x17RegisterResourceOutputs\x12).pulumirpc.RegisterResourceOutputsRequest\x1a\x16.google.protobuf.Empty\"\x00\x42\x34Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') - - -_SUPPORTSFEATUREREQUEST = DESCRIPTOR.message_types_by_name['SupportsFeatureRequest'] -_SUPPORTSFEATURERESPONSE = DESCRIPTOR.message_types_by_name['SupportsFeatureResponse'] -_READRESOURCEREQUEST = DESCRIPTOR.message_types_by_name['ReadResourceRequest'] -_READRESOURCERESPONSE = DESCRIPTOR.message_types_by_name['ReadResourceResponse'] -_REGISTERRESOURCEREQUEST = DESCRIPTOR.message_types_by_name['RegisterResourceRequest'] -_REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES = _REGISTERRESOURCEREQUEST.nested_types_by_name['PropertyDependencies'] -_REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS = _REGISTERRESOURCEREQUEST.nested_types_by_name['CustomTimeouts'] -_REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY = _REGISTERRESOURCEREQUEST.nested_types_by_name['PropertyDependenciesEntry'] -_REGISTERRESOURCEREQUEST_PROVIDERSENTRY = _REGISTERRESOURCEREQUEST.nested_types_by_name['ProvidersEntry'] -_REGISTERRESOURCERESPONSE = DESCRIPTOR.message_types_by_name['RegisterResourceResponse'] -_REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES = _REGISTERRESOURCERESPONSE.nested_types_by_name['PropertyDependencies'] -_REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY = _REGISTERRESOURCERESPONSE.nested_types_by_name['PropertyDependenciesEntry'] -_REGISTERRESOURCEOUTPUTSREQUEST = DESCRIPTOR.message_types_by_name['RegisterResourceOutputsRequest'] -_RESOURCEINVOKEREQUEST = DESCRIPTOR.message_types_by_name['ResourceInvokeRequest'] -SupportsFeatureRequest = _reflection.GeneratedProtocolMessageType('SupportsFeatureRequest', (_message.Message,), { - 'DESCRIPTOR' : _SUPPORTSFEATUREREQUEST, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.SupportsFeatureRequest) - }) -_sym_db.RegisterMessage(SupportsFeatureRequest) - -SupportsFeatureResponse = _reflection.GeneratedProtocolMessageType('SupportsFeatureResponse', (_message.Message,), { - 'DESCRIPTOR' : _SUPPORTSFEATURERESPONSE, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.SupportsFeatureResponse) - }) -_sym_db.RegisterMessage(SupportsFeatureResponse) - -ReadResourceRequest = _reflection.GeneratedProtocolMessageType('ReadResourceRequest', (_message.Message,), { - 'DESCRIPTOR' : _READRESOURCEREQUEST, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ReadResourceRequest) - }) -_sym_db.RegisterMessage(ReadResourceRequest) - -ReadResourceResponse = _reflection.GeneratedProtocolMessageType('ReadResourceResponse', (_message.Message,), { - 'DESCRIPTOR' : _READRESOURCERESPONSE, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ReadResourceResponse) - }) -_sym_db.RegisterMessage(ReadResourceResponse) - -RegisterResourceRequest = _reflection.GeneratedProtocolMessageType('RegisterResourceRequest', (_message.Message,), { - - 'PropertyDependencies' : _reflection.GeneratedProtocolMessageType('PropertyDependencies', (_message.Message,), { - 'DESCRIPTOR' : _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RegisterResourceRequest.PropertyDependencies) - }) - , - - 'CustomTimeouts' : _reflection.GeneratedProtocolMessageType('CustomTimeouts', (_message.Message,), { - 'DESCRIPTOR' : _REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RegisterResourceRequest.CustomTimeouts) - }) - , - - 'PropertyDependenciesEntry' : _reflection.GeneratedProtocolMessageType('PropertyDependenciesEntry', (_message.Message,), { - 'DESCRIPTOR' : _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RegisterResourceRequest.PropertyDependenciesEntry) - }) - , - - 'ProvidersEntry' : _reflection.GeneratedProtocolMessageType('ProvidersEntry', (_message.Message,), { - 'DESCRIPTOR' : _REGISTERRESOURCEREQUEST_PROVIDERSENTRY, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RegisterResourceRequest.ProvidersEntry) - }) - , - 'DESCRIPTOR' : _REGISTERRESOURCEREQUEST, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RegisterResourceRequest) - }) -_sym_db.RegisterMessage(RegisterResourceRequest) -_sym_db.RegisterMessage(RegisterResourceRequest.PropertyDependencies) -_sym_db.RegisterMessage(RegisterResourceRequest.CustomTimeouts) -_sym_db.RegisterMessage(RegisterResourceRequest.PropertyDependenciesEntry) -_sym_db.RegisterMessage(RegisterResourceRequest.ProvidersEntry) - -RegisterResourceResponse = _reflection.GeneratedProtocolMessageType('RegisterResourceResponse', (_message.Message,), { - - 'PropertyDependencies' : _reflection.GeneratedProtocolMessageType('PropertyDependencies', (_message.Message,), { - 'DESCRIPTOR' : _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RegisterResourceResponse.PropertyDependencies) - }) - , - - 'PropertyDependenciesEntry' : _reflection.GeneratedProtocolMessageType('PropertyDependenciesEntry', (_message.Message,), { - 'DESCRIPTOR' : _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RegisterResourceResponse.PropertyDependenciesEntry) - }) - , - 'DESCRIPTOR' : _REGISTERRESOURCERESPONSE, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RegisterResourceResponse) - }) -_sym_db.RegisterMessage(RegisterResourceResponse) -_sym_db.RegisterMessage(RegisterResourceResponse.PropertyDependencies) -_sym_db.RegisterMessage(RegisterResourceResponse.PropertyDependenciesEntry) - -RegisterResourceOutputsRequest = _reflection.GeneratedProtocolMessageType('RegisterResourceOutputsRequest', (_message.Message,), { - 'DESCRIPTOR' : _REGISTERRESOURCEOUTPUTSREQUEST, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.RegisterResourceOutputsRequest) - }) -_sym_db.RegisterMessage(RegisterResourceOutputsRequest) - -ResourceInvokeRequest = _reflection.GeneratedProtocolMessageType('ResourceInvokeRequest', (_message.Message,), { - 'DESCRIPTOR' : _RESOURCEINVOKEREQUEST, - '__module__' : 'pulumi.resource_pb2' - # @@protoc_insertion_point(class_scope:pulumirpc.ResourceInvokeRequest) - }) -_sym_db.RegisterMessage(ResourceInvokeRequest) - -_RESOURCEMONITOR = DESCRIPTOR.services_by_name['ResourceMonitor'] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pulumi.resource_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -160,25 +40,25 @@ _READRESOURCERESPONSE._serialized_start=528 _READRESOURCERESPONSE._serialized_end=608 _REGISTERRESOURCEREQUEST._serialized_start=611 - _REGISTERRESOURCEREQUEST._serialized_end=1685 - _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES._serialized_start=1415 - _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES._serialized_end=1451 - _REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS._serialized_start=1453 - _REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS._serialized_end=1517 - _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY._serialized_start=1519 - _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY._serialized_end=1635 - _REGISTERRESOURCEREQUEST_PROVIDERSENTRY._serialized_start=1637 - _REGISTERRESOURCEREQUEST_PROVIDERSENTRY._serialized_end=1685 - _REGISTERRESOURCERESPONSE._serialized_start=1688 - _REGISTERRESOURCERESPONSE._serialized_end=2063 - _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES._serialized_start=1415 - _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES._serialized_end=1451 - _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY._serialized_start=1946 - _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY._serialized_end=2063 - _REGISTERRESOURCEOUTPUTSREQUEST._serialized_start=2065 - _REGISTERRESOURCEOUTPUTSREQUEST._serialized_end=2152 - _RESOURCEINVOKEREQUEST._serialized_start=2155 - _RESOURCEINVOKEREQUEST._serialized_end=2317 - _RESOURCEMONITOR._serialized_start=2320 - _RESOURCEMONITOR._serialized_end=2916 + _REGISTERRESOURCEREQUEST._serialized_end=1706 + _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES._serialized_start=1436 + _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES._serialized_end=1472 + _REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS._serialized_start=1474 + _REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS._serialized_end=1538 + _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY._serialized_start=1540 + _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY._serialized_end=1656 + _REGISTERRESOURCEREQUEST_PROVIDERSENTRY._serialized_start=1658 + _REGISTERRESOURCEREQUEST_PROVIDERSENTRY._serialized_end=1706 + _REGISTERRESOURCERESPONSE._serialized_start=1709 + _REGISTERRESOURCERESPONSE._serialized_end=2084 + _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES._serialized_start=1436 + _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES._serialized_end=1472 + _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY._serialized_start=1967 + _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY._serialized_end=2084 + _REGISTERRESOURCEOUTPUTSREQUEST._serialized_start=2086 + _REGISTERRESOURCEOUTPUTSREQUEST._serialized_end=2173 + _RESOURCEINVOKEREQUEST._serialized_start=2176 + _RESOURCEINVOKEREQUEST._serialized_end=2338 + _RESOURCEMONITOR._serialized_start=2341 + _RESOURCEMONITOR._serialized_end=2937 # @@protoc_insertion_point(module_scope) diff --git a/sdk/python/lib/pulumi/runtime/resource.py b/sdk/python/lib/pulumi/runtime/resource.py index 6941325f1468..33166da52d08 100644 --- a/sdk/python/lib/pulumi/runtime/resource.py +++ b/sdk/python/lib/pulumi/runtime/resource.py @@ -584,6 +584,7 @@ async def do_register(): remote=remote, replaceOnChanges=replace_on_changes, retainOnDelete=opts.retain_on_delete or False, + deletedWith=opts.deleted_with, ) from ..resource import create_urn # pylint: disable=import-outside-toplevel