Support aliases for renaming, re-typing, or re-parenting resources (#2774)
Adds a new resource option `aliases` which can be used to rename a resource. When making a breaking change to the name or type of a resource or component, the old name can be added to the list of `aliases` for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource. There are two key places this change is implemented. The first is the step generator in the engine. When computing whether there is an old version of a registered resource, we now take into account the aliases specified on the registered resource. That is, we first look up the resource by its new URN in the old state, and then by any aliases provided (in order). This can allow the resource to be matched as a (potential) update to an existing resource with a different URN. The second is the core `Resource` constructor in the JavaScript (and soon Python) SDKs. This change ensures that when a parent resource is aliased, that all children implicitly inherit corresponding aliases. It is similar to how many other resource options are "inherited" implicitly from the parent. Four specific scenarios are explicitly tested as part of this PR: 1. Renaming a resource 2. Adopting a resource into a component (as the owner of both component and consumption codebases) 3. Renaming a component instance (as the owner of the consumption codebase without changes to the component) 4. Changing the type of a component (as the owner of the component codebase without changes to the consumption codebase) 4. Combining (1) and (3) to make both changes to a resource at the same time
This commit is contained in:
parent
cb6ccb8026
commit
15e924b5cf
|
@ -7,6 +7,9 @@
|
|||
- Support for referencing the outputs of other Pulumi stacks has been added to the Pulumi Python libraries via the
|
||||
`StackReference` type.
|
||||
- Add CI system detection for Bitbucket Pipelines.
|
||||
- Add support for renaming resources via the `aliases` resource option. Adding aliases allows new resources to match
|
||||
resources from previous deployments which used different names, maintaining the identity of the resource and avoiding
|
||||
replacements or re-creation of the resource.
|
||||
|
||||
## 0.17.14 (Released May 28, 2019)
|
||||
|
||||
|
|
|
@ -283,6 +283,8 @@ type ResourceV3 struct {
|
|||
PendingReplacement bool `json:"pendingReplacement,omitempty" yaml:"pendingReplacement,omitempty"`
|
||||
// AdditionalSecretOutputs is a list of outputs that were explicitly marked as secret when the resource was created.
|
||||
AdditionalSecretOutputs []resource.PropertyKey `json:"additionalSecretOutputs,omitempty" yaml:"additionalSecretOutputs,omitempty"`
|
||||
// Aliases is a list of previous URNs that this resource may have had in previous deployments
|
||||
Aliases []resource.URN `json:"aliases,omitempty" yaml:"aliases,omitempty"`
|
||||
}
|
||||
|
||||
// ManifestV1 captures meta-information about this checkpoint file, such as versions of binaries, etc.
|
||||
|
|
|
@ -86,7 +86,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.PropertyDependencies, s.PendingReplacement, s.AdditionalSecretOutputs, s.Aliases)
|
||||
}
|
||||
|
||||
// ShowJSONEvents renders engine events from a preview into a well-formed JSON document. Note that this does not
|
||||
|
|
|
@ -168,11 +168,21 @@ type sameSnapshotMutation struct {
|
|||
// step that forces us to write the checkpoint. If no such difference exists, the checkpoint write that corresponds to
|
||||
// this step can be elided.
|
||||
func (ssm *sameSnapshotMutation) mustWrite(old, new *resource.State) bool {
|
||||
contract.Assert(old.Type == new.Type)
|
||||
contract.Assert(old.URN == new.URN)
|
||||
contract.Assert(old.Delete == new.Delete)
|
||||
contract.Assert(old.External == new.External)
|
||||
|
||||
// If the URN of this resource has changed, we must write the checkpoint. This should only be possible when a
|
||||
// resource is aliased.
|
||||
if old.URN != new.URN {
|
||||
return true
|
||||
}
|
||||
|
||||
// If the type of this resource has changed, we must write the checkpoint. This should only be possible when a
|
||||
// resource is aliased.
|
||||
if old.Type != new.Type {
|
||||
return true
|
||||
}
|
||||
|
||||
// If the kind of this resource has changed, we must write the checkpoint.
|
||||
if old.Custom != new.Custom {
|
||||
return true
|
||||
|
@ -509,6 +519,7 @@ func (sm *SnapshotManager) snap() *deploy.Snapshot {
|
|||
// saveSnapshot persists the current snapshot and optionally verifies it afterwards.
|
||||
func (sm *SnapshotManager) saveSnapshot() error {
|
||||
snap := sm.snap()
|
||||
snap.NormalizeURNReferences()
|
||||
if err := sm.persister.Save(snap); err != nil {
|
||||
return errors.Wrap(err, "failed to save snapshot")
|
||||
}
|
||||
|
|
|
@ -60,3 +60,9 @@ func GetBadProviderError(urn resource.URN) *Diag {
|
|||
func GetUnknownProviderError(urn resource.URN) *Diag {
|
||||
return newError(urn, 2007, "unknown provider '%v' for resource '%v'")
|
||||
}
|
||||
|
||||
func GetDuplicateResourceAliasError(urn resource.URN) *Diag {
|
||||
return newError(urn, 2008,
|
||||
"Duplicate resource alias '%v' applied to resource with URN '%v' conflicting with resource with URN '%v'",
|
||||
)
|
||||
}
|
||||
|
|
|
@ -568,7 +568,7 @@ func TestSingleResourceDefaultProviderLifecycle(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
return nil
|
||||
})
|
||||
|
@ -590,7 +590,7 @@ func TestSingleResourceExplicitProviderLifecycle(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
provURN, provID, _, err := monitor.RegisterResource(providers.MakeProviderType("pkgA"), "provA", true, "",
|
||||
false, nil, "", resource.PropertyMap{}, nil, false, "", nil)
|
||||
false, nil, "", resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
if provID == "" {
|
||||
|
@ -601,7 +601,7 @@ func TestSingleResourceExplicitProviderLifecycle(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
_, _, _, err = monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, provRef.String(),
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
return nil
|
||||
|
@ -624,7 +624,7 @@ func TestSingleResourceDefaultProviderUpgrade(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
return nil
|
||||
})
|
||||
|
@ -730,7 +730,7 @@ func TestSingleResourceDefaultProviderReplace(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
return nil
|
||||
})
|
||||
|
@ -812,7 +812,7 @@ func TestSingleResourceExplicitProviderReplace(t *testing.T) {
|
|||
}
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
provURN, provID, _, err := monitor.RegisterResource(providers.MakeProviderType("pkgA"), "provA", true, "",
|
||||
false, nil, "", providerInputs, nil, false, "", nil)
|
||||
false, nil, "", providerInputs, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
if provID == "" {
|
||||
|
@ -823,7 +823,7 @@ func TestSingleResourceExplicitProviderReplace(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
_, _, _, err = monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, provRef.String(),
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
return nil
|
||||
|
@ -902,7 +902,7 @@ func TestSingleResourceExplicitProviderDeleteBeforeReplace(t *testing.T) {
|
|||
}
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
provURN, provID, _, err := monitor.RegisterResource(providers.MakeProviderType("pkgA"), "provA", true, "",
|
||||
false, nil, "", providerInputs, nil, false, "", nil)
|
||||
false, nil, "", providerInputs, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
if provID == "" {
|
||||
|
@ -913,7 +913,7 @@ func TestSingleResourceExplicitProviderDeleteBeforeReplace(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
_, _, _, err = monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, provRef.String(),
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
return nil
|
||||
|
@ -1006,7 +1006,7 @@ func TestSingleResourceDiffUnavailable(t *testing.T) {
|
|||
inputs := resource.PropertyMap{}
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource(
|
||||
"pkgA:m:typA", "resA", true, "", false, nil, "", inputs, nil, false, "", nil)
|
||||
"pkgA:m:typA", "resA", true, "", false, nil, "", inputs, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
return nil
|
||||
})
|
||||
|
@ -1205,19 +1205,19 @@ func TestParallelRefresh(t *testing.T) {
|
|||
// it.
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
resA, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
resB, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resB", true, "", false, []resource.URN{resA}, "",
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
resC, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resC", true, "", false, []resource.URN{resB}, "",
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
_, _, _, err = monitor.RegisterResource("pkgA:m:typA", "resD", true, "", false, []resource.URN{resC}, "",
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
return nil
|
||||
|
@ -1331,7 +1331,7 @@ func TestRefreshInitFailure(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
return nil
|
||||
})
|
||||
|
@ -1420,7 +1420,7 @@ func TestCheckFailureRecord(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
nil, nil, false, "", nil)
|
||||
nil, nil, false, "", nil, nil)
|
||||
assert.Error(t, err)
|
||||
return err
|
||||
})
|
||||
|
@ -1471,7 +1471,7 @@ func TestCheckFailureInvalidPropertyRecord(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
nil, nil, false, "", nil)
|
||||
nil, nil, false, "", nil, nil)
|
||||
assert.Error(t, err)
|
||||
return err
|
||||
})
|
||||
|
@ -1529,7 +1529,7 @@ func TestRefreshWithDelete(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource(
|
||||
"pkgA:m:typA", "resA", true, "", false, nil, "", nil, nil, false, "", nil)
|
||||
"pkgA:m:typA", "resA", true, "", false, nil, "", nil, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
return err
|
||||
})
|
||||
|
@ -2036,7 +2036,7 @@ func TestBadResourceType(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, mon *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := mon.RegisterResource(
|
||||
"very:bad", "resA", true, "", false, nil, "", resource.PropertyMap{}, nil, false, "", nil)
|
||||
"very:bad", "resA", true, "", false, nil, "", resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.Error(t, err)
|
||||
rpcerr, ok := rpcerror.FromError(err)
|
||||
assert.True(t, ok)
|
||||
|
@ -2051,12 +2051,12 @@ func TestBadResourceType(t *testing.T) {
|
|||
assert.Contains(t, rpcerr.Message(), "Type 'very:bad' is not a valid type token")
|
||||
|
||||
// Component resources may have any format type.
|
||||
_, _, _, noErr := mon.RegisterResource(
|
||||
"a:component", "resB", false /* custom */, "", false, nil, "", resource.PropertyMap{}, nil, false, "", nil)
|
||||
_, _, _, noErr := mon.RegisterResource("a:component", "resB", false /* custom */, "",
|
||||
false, nil, "", resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, noErr)
|
||||
|
||||
_, _, _, noErr = mon.RegisterResource(
|
||||
"singlename", "resC", false /* custom */, "", false, nil, "", resource.PropertyMap{}, nil, false, "", nil)
|
||||
_, _, _, noErr = mon.RegisterResource("singlename", "resC", false /* custom */, "",
|
||||
false, nil, "", resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, noErr)
|
||||
|
||||
return err
|
||||
|
@ -2120,7 +2120,7 @@ func TestProviderCancellation(t *testing.T) {
|
|||
for i := 0; i < resourceCount; i++ {
|
||||
go func(idx int) {
|
||||
_, _, _, errors[idx] = monitor.RegisterResource("pkgA:m:typA", fmt.Sprintf("res%d", idx), true, "",
|
||||
false, nil, "", resource.PropertyMap{}, nil, false, "", nil)
|
||||
false, nil, "", resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
resources.Done()
|
||||
}(i)
|
||||
}
|
||||
|
@ -2185,7 +2185,7 @@ func TestPreviewWithPendingOperations(t *testing.T) {
|
|||
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
resource.PropertyMap{}, nil, false, "", nil)
|
||||
resource.PropertyMap{}, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
return nil
|
||||
})
|
||||
|
@ -2231,7 +2231,7 @@ func TestUpdatePartialFailure(t *testing.T) {
|
|||
_, _, _, err := mon.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
resource.NewPropertyMapFromMap(map[string]interface{}{
|
||||
"input_prop": "new inputs",
|
||||
}), nil, false, "", nil)
|
||||
}), nil, false, "", nil, nil)
|
||||
|
||||
return err
|
||||
})
|
||||
|
@ -2303,7 +2303,7 @@ func TestStackReference(t *testing.T) {
|
|||
_, _, state, err := mon.RegisterResource("pulumi:pulumi:StackReference", "other", true, "", false, nil, "",
|
||||
resource.NewPropertyMapFromMap(map[string]interface{}{
|
||||
"name": "other",
|
||||
}), nil, false, "", nil)
|
||||
}), nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
if !info.DryRun {
|
||||
assert.Equal(t, "bar", state["outputs"].ObjectValue()["foo"].StringValue())
|
||||
|
@ -2376,7 +2376,7 @@ func TestStackReference(t *testing.T) {
|
|||
_, _, _, err := mon.RegisterResource("pulumi:pulumi:StackReference", "other", true, "", false, nil, "",
|
||||
resource.NewPropertyMapFromMap(map[string]interface{}{
|
||||
"name": "rehto",
|
||||
}), nil, false, "", nil)
|
||||
}), nil, false, "", nil, nil)
|
||||
assert.Error(t, err)
|
||||
return err
|
||||
})
|
||||
|
@ -2394,7 +2394,7 @@ func TestStackReference(t *testing.T) {
|
|||
resource.NewPropertyMapFromMap(map[string]interface{}{
|
||||
"name": "other",
|
||||
"foo": "bar",
|
||||
}), nil, false, "", nil)
|
||||
}), nil, false, "", nil, nil)
|
||||
assert.Error(t, err)
|
||||
return err
|
||||
})
|
||||
|
@ -2626,7 +2626,7 @@ func TestDeleteBeforeReplace(t *testing.T) {
|
|||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
register := func(urn resource.URN, provider string, inputs resource.PropertyMap) resource.ID {
|
||||
_, id, _, err := monitor.RegisterResource(urn.Type(), string(urn.Name()), true, "", false, nil, provider,
|
||||
inputs, nil, false, "", nil)
|
||||
inputs, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
return id
|
||||
}
|
||||
|
@ -2701,7 +2701,7 @@ func TestPropertyDependenciesAdapter(t *testing.T) {
|
|||
dependencies []resource.URN) resource.URN {
|
||||
|
||||
urn, _, _, err := monitor.RegisterResource(resType, name, true, "", false, dependencies, "", inputs,
|
||||
inputDeps, false, "", nil)
|
||||
inputDeps, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
return urn
|
||||
|
@ -2780,7 +2780,7 @@ func TestExplicitDeleteBeforeReplace(t *testing.T) {
|
|||
var err error
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
provURN, provID, _, err = monitor.RegisterResource(
|
||||
providers.MakeProviderType("pkgA"), "provA", true, "", false, nil, "", nil, nil, false, "", nil)
|
||||
providers.MakeProviderType("pkgA"), "provA", true, "", false, nil, "", nil, nil, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
if provID == "" {
|
||||
|
@ -2791,12 +2791,12 @@ func TestExplicitDeleteBeforeReplace(t *testing.T) {
|
|||
provA := provRef.String()
|
||||
|
||||
urnA, _, _, err = monitor.RegisterResource(resType, "resA", true, "", false, nil, provA, inputsA,
|
||||
nil, dbrA, "", nil)
|
||||
nil, dbrA, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
inputDepsB := map[resource.PropertyKey][]resource.URN{"A": {urnA}}
|
||||
urnB, _, _, err = monitor.RegisterResource(resType, "resB", true, "", false, []resource.URN{urnA}, provA,
|
||||
inputsB, inputDepsB, false, "", nil)
|
||||
inputsB, inputDepsB, false, "", nil, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
return nil
|
||||
|
@ -2914,7 +2914,7 @@ func TestSingleResourceIgnoreChanges(t *testing.T) {
|
|||
allowedOps []deploy.StepOp) *deploy.Snapshot {
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
_, _, _, err := monitor.RegisterResource("pkgA:m:typA", "resA", true, "", false, nil, "",
|
||||
props, nil, false, "", ignoreChanges)
|
||||
props, nil, false, "", ignoreChanges, nil)
|
||||
assert.NoError(t, err)
|
||||
return nil
|
||||
})
|
||||
|
@ -2970,3 +2970,294 @@ func TestSingleResourceIgnoreChanges(t *testing.T) {
|
|||
"b": resource.NewNumberProperty(4),
|
||||
}, []string{"a"}, []deploy.StepOp{deploy.OpUpdate})
|
||||
}
|
||||
|
||||
// Resource is an abstract representation of a resource graph
|
||||
type Resource struct {
|
||||
t tokens.Type
|
||||
name string
|
||||
children []Resource
|
||||
props resource.PropertyMap
|
||||
aliases []resource.URN
|
||||
dependencies []resource.URN
|
||||
parent resource.URN
|
||||
deleteBeforeReplace bool
|
||||
}
|
||||
|
||||
func registerResources(t *testing.T, monitor *deploytest.ResourceMonitor, resources []Resource) error {
|
||||
for _, r := range resources {
|
||||
_, _, _, err := monitor.RegisterResource(r.t, r.name, true, r.parent, false, r.dependencies, "",
|
||||
r.props, nil, r.deleteBeforeReplace, "", nil, r.aliases)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = registerResources(t, monitor, r.children)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestAliases(t *testing.T) {
|
||||
loaders := []*deploytest.ProviderLoader{
|
||||
deploytest.NewProviderLoader("pkgA", semver.MustParse("1.0.0"), func() (plugin.Provider, error) {
|
||||
return &deploytest.Provider{
|
||||
// The `forcesReplacement` key forces replacement and all other keys can update in place
|
||||
DiffF: func(res resource.URN, id resource.ID, olds, news resource.PropertyMap) (plugin.DiffResult, error) {
|
||||
replaceKeys := []resource.PropertyKey{}
|
||||
old, hasOld := olds["forcesReplacement"]
|
||||
new, hasNew := news["forcesReplacement"]
|
||||
if hasOld && !hasNew || hasNew && !hasOld || hasOld && hasNew && old.Diff(new) != nil {
|
||||
replaceKeys = append(replaceKeys, "forcesReplacement")
|
||||
}
|
||||
return plugin.DiffResult{ReplaceKeys: replaceKeys}, nil
|
||||
},
|
||||
}, nil
|
||||
}),
|
||||
}
|
||||
|
||||
updateProgramWithResource := func(
|
||||
snap *deploy.Snapshot, resources []Resource, allowedOps []deploy.StepOp) *deploy.Snapshot {
|
||||
program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error {
|
||||
err := registerResources(t, monitor, resources)
|
||||
return err
|
||||
})
|
||||
host := deploytest.NewPluginHost(nil, nil, program, loaders...)
|
||||
p := &TestPlan{
|
||||
Options: UpdateOptions{host: host},
|
||||
Steps: []TestStep{
|
||||
{
|
||||
Op: Update,
|
||||
Validate: func(project workspace.Project, target deploy.Target, j *Journal,
|
||||
events []Event, res result.Result) result.Result {
|
||||
for _, event := range events {
|
||||
if event.Type == ResourcePreEvent {
|
||||
payload := event.Payload.(ResourcePreEventPayload)
|
||||
assert.Subset(t, allowedOps, []deploy.StepOp{payload.Metadata.Op})
|
||||
}
|
||||
}
|
||||
|
||||
for _, entry := range j.Entries {
|
||||
if entry.Step.Type() == "pulumi:providers:pkgA" {
|
||||
continue
|
||||
}
|
||||
switch entry.Kind {
|
||||
case JournalEntrySuccess:
|
||||
assert.Subset(t, allowedOps, []deploy.StepOp{entry.Step.Op()})
|
||||
case JournalEntryFailure:
|
||||
assert.Fail(t, "unexpected failure in journal")
|
||||
case JournalEntryBegin:
|
||||
case JournalEntryOutputs:
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
return p.Run(t, snap)
|
||||
}
|
||||
|
||||
snap := updateProgramWithResource(nil, []Resource{{
|
||||
t: "pkgA:index:t1",
|
||||
name: "n1",
|
||||
}}, []deploy.StepOp{deploy.OpCreate})
|
||||
|
||||
// Ensure that rename produces Same
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t1",
|
||||
name: "n2",
|
||||
aliases: []resource.URN{"urn:pulumi:test::test::pkgA:index:t1::n1"},
|
||||
}}, []deploy.StepOp{deploy.OpSame})
|
||||
|
||||
// Ensure that rename produces Same with multiple aliases
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t1",
|
||||
name: "n3",
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n1",
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n2",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpSame})
|
||||
|
||||
// Ensure that rename produces Same with multiple aliases (reversed)
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t1",
|
||||
name: "n3",
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n2",
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n1",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpSame})
|
||||
|
||||
// Ensure that aliasing back to original name is okay
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t1",
|
||||
name: "n1",
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n3",
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n2",
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n1",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpSame})
|
||||
|
||||
// Ensure that removing aliases is okay (once old names are gone from all snapshots)
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t1",
|
||||
name: "n1",
|
||||
}}, []deploy.StepOp{deploy.OpSame})
|
||||
|
||||
// Ensure that changing the type works
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t2",
|
||||
name: "n1",
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n1",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpSame})
|
||||
|
||||
// Ensure that changing the type again works
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:othermod:t3",
|
||||
name: "n1",
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n1",
|
||||
"urn:pulumi:test::test::pkgA:index:t2::n1",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpSame})
|
||||
|
||||
// Ensure that order of aliases doesn't matter
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:othermod:t3",
|
||||
name: "n1",
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n1",
|
||||
"urn:pulumi:test::test::pkgA:othermod:t3::n1",
|
||||
"urn:pulumi:test::test::pkgA:index:t2::n1",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpSame})
|
||||
|
||||
// Ensure that removing aliases is okay (once old names are gone from all snapshots)
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:othermod:t3",
|
||||
name: "n1",
|
||||
}}, []deploy.StepOp{deploy.OpSame})
|
||||
|
||||
// Ensure that changing everything (including props) leads to update not delete and re-create
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t4",
|
||||
name: "n2",
|
||||
props: resource.PropertyMap{
|
||||
resource.PropertyKey("x"): resource.NewNumberProperty(42),
|
||||
},
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:othermod:t3::n1",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpUpdate})
|
||||
|
||||
// Ensure that changing everything again (including props) leads to update not delete and re-create
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t5",
|
||||
name: "n3",
|
||||
props: resource.PropertyMap{
|
||||
resource.PropertyKey("x"): resource.NewNumberProperty(1000),
|
||||
},
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t4::n2",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpUpdate})
|
||||
|
||||
// Ensure that changing a forceNew property while also changing type and name leads to replacement not delete+create
|
||||
snap = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t6",
|
||||
name: "n4",
|
||||
props: resource.PropertyMap{
|
||||
resource.PropertyKey("forcesReplacement"): resource.NewNumberProperty(1000),
|
||||
},
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t5::n3",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpReplace, deploy.OpCreateReplacement, deploy.OpDeleteReplaced})
|
||||
|
||||
// Ensure that changing a forceNew property and deleteBeforeReplace while also changing type and name leads to
|
||||
// replacement not delete+create
|
||||
_ = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t7",
|
||||
name: "n5",
|
||||
props: resource.PropertyMap{
|
||||
resource.PropertyKey("forcesReplacement"): resource.NewNumberProperty(999),
|
||||
},
|
||||
deleteBeforeReplace: true,
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t6::n4",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpReplace, deploy.OpCreateReplacement, deploy.OpDeleteReplaced})
|
||||
|
||||
// Start again - this time with two resources with depends on relationship
|
||||
snap = updateProgramWithResource(nil, []Resource{{
|
||||
t: "pkgA:index:t1",
|
||||
name: "n1",
|
||||
props: resource.PropertyMap{
|
||||
resource.PropertyKey("forcesReplacement"): resource.NewNumberProperty(1),
|
||||
},
|
||||
deleteBeforeReplace: true,
|
||||
}, {
|
||||
t: "pkgA:index:t2",
|
||||
name: "n2",
|
||||
dependencies: []resource.URN{"urn:pulumi:test::test::pkgA:index:t1::n1"},
|
||||
}}, []deploy.StepOp{deploy.OpCreate})
|
||||
|
||||
_ = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t1-new",
|
||||
name: "n1-new",
|
||||
props: resource.PropertyMap{
|
||||
resource.PropertyKey("forcesReplacement"): resource.NewNumberProperty(2),
|
||||
},
|
||||
deleteBeforeReplace: true,
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n1",
|
||||
},
|
||||
}, {
|
||||
t: "pkgA:index:t2-new",
|
||||
name: "n2-new",
|
||||
dependencies: []resource.URN{"urn:pulumi:test::test::pkgA:index:t1-new::n1-new"},
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t2::n2",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpSame, deploy.OpReplace, deploy.OpCreateReplacement, deploy.OpDeleteReplaced})
|
||||
|
||||
// Start again - this time with two resources with parent relationship
|
||||
snap = updateProgramWithResource(nil, []Resource{{
|
||||
t: "pkgA:index:t1",
|
||||
name: "n1",
|
||||
props: resource.PropertyMap{
|
||||
resource.PropertyKey("forcesReplacement"): resource.NewNumberProperty(1),
|
||||
},
|
||||
deleteBeforeReplace: true,
|
||||
}, {
|
||||
t: "pkgA:index:t2",
|
||||
name: "n2",
|
||||
parent: resource.URN("urn:pulumi:test::test::pkgA:index:t1::n1"),
|
||||
}}, []deploy.StepOp{deploy.OpCreate})
|
||||
|
||||
_ = updateProgramWithResource(snap, []Resource{{
|
||||
t: "pkgA:index:t1-new",
|
||||
name: "n1-new",
|
||||
props: resource.PropertyMap{
|
||||
resource.PropertyKey("forcesReplacement"): resource.NewNumberProperty(2),
|
||||
},
|
||||
deleteBeforeReplace: true,
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t1::n1",
|
||||
},
|
||||
}, {
|
||||
t: "pkgA:index:t2-new",
|
||||
name: "n2-new",
|
||||
parent: resource.URN("urn:pulumi:test::test::pkgA:index:t1-new::n1-new"),
|
||||
aliases: []resource.URN{
|
||||
"urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t2::n2",
|
||||
},
|
||||
}}, []deploy.StepOp{deploy.OpSame, deploy.OpReplace, deploy.OpCreateReplacement, deploy.OpDeleteReplaced})
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ type ResourceMonitor struct {
|
|||
func (rm *ResourceMonitor) RegisterResource(t tokens.Type, name string, custom bool, parent resource.URN, protect bool,
|
||||
dependencies []resource.URN, provider string, inputs resource.PropertyMap,
|
||||
propertyDeps map[resource.PropertyKey][]resource.URN, deleteBeforeReplace bool,
|
||||
version string, ignoreChanges []string) (resource.URN, resource.ID, resource.PropertyMap, error) {
|
||||
version string, ignoreChanges []string,
|
||||
aliases []resource.URN) (resource.URN, resource.ID, resource.PropertyMap, error) {
|
||||
|
||||
// marshal inputs
|
||||
ins, err := plugin.MarshalProperties(inputs, plugin.MarshalOptions{KeepUnknowns: true})
|
||||
|
@ -44,6 +45,12 @@ func (rm *ResourceMonitor) RegisterResource(t tokens.Type, name string, custom b
|
|||
deps = append(deps, string(d))
|
||||
}
|
||||
|
||||
// marshal aliases
|
||||
aliasStrings := []string{}
|
||||
for _, a := range aliases {
|
||||
aliasStrings = append(aliasStrings, string(a))
|
||||
}
|
||||
|
||||
inputDeps := make(map[string]*pulumirpc.RegisterResourceRequest_PropertyDependencies)
|
||||
for pk, pd := range propertyDeps {
|
||||
pdeps := []string{}
|
||||
|
@ -69,6 +76,7 @@ func (rm *ResourceMonitor) RegisterResource(t tokens.Type, name string, custom b
|
|||
DeleteBeforeReplace: deleteBeforeReplace,
|
||||
IgnoreChanges: ignoreChanges,
|
||||
Version: version,
|
||||
Aliases: aliasStrings,
|
||||
})
|
||||
if err != nil {
|
||||
return "", "", nil, err
|
||||
|
|
|
@ -24,6 +24,7 @@ import (
|
|||
"github.com/pulumi/pulumi/pkg/resource"
|
||||
"github.com/pulumi/pulumi/pkg/resource/deploy/providers"
|
||||
"github.com/pulumi/pulumi/pkg/secrets"
|
||||
"github.com/pulumi/pulumi/pkg/util/contract"
|
||||
"github.com/pulumi/pulumi/pkg/workspace"
|
||||
)
|
||||
|
||||
|
@ -67,6 +68,52 @@ func NewSnapshot(manifest Manifest, secretsManager secrets.Manager,
|
|||
}
|
||||
}
|
||||
|
||||
// NormalizeURNReferences fixes up all URN references in a snapshot to use the new URNs instead of potentially-aliased
|
||||
// URNs. This will affect resources that are "old", and which would be expected to be updated to refer to the new names
|
||||
// later in the deployment. But until they are, we still want to ensure that any serialization of the snapshot uses URN
|
||||
// references which do not need to be indirected through any alias lookups, and which instead refer directly to the URN
|
||||
// of a resource in the resources map.
|
||||
//
|
||||
// Note: This method modifies the snapshot (and resource.States in the snapshot) in-place.
|
||||
func (snap *Snapshot) NormalizeURNReferences() {
|
||||
if snap != nil {
|
||||
aliased := make(map[resource.URN]resource.URN)
|
||||
fixUrn := func(urn resource.URN) resource.URN {
|
||||
if newUrn, has := aliased[urn]; has {
|
||||
return newUrn
|
||||
}
|
||||
return urn
|
||||
}
|
||||
for _, state := range snap.Resources {
|
||||
// Fix up any references to URNs
|
||||
state.Parent = fixUrn(state.Parent)
|
||||
for i, dependency := range state.Dependencies {
|
||||
state.Dependencies[i] = fixUrn(dependency)
|
||||
}
|
||||
for k, deps := range state.PropertyDependencies {
|
||||
for i, dep := range deps {
|
||||
state.PropertyDependencies[k][i] = fixUrn(dep)
|
||||
}
|
||||
}
|
||||
if state.Provider != "" {
|
||||
ref, err := providers.ParseReference(state.Provider)
|
||||
contract.AssertNoError(err)
|
||||
ref, err = providers.NewReference(fixUrn(ref.URN()), ref.ID())
|
||||
contract.AssertNoError(err)
|
||||
state.Provider = ref.String()
|
||||
}
|
||||
|
||||
// Add to aliased maps
|
||||
for _, alias := range state.Aliases {
|
||||
if otherUrn, has := aliased[alias]; has {
|
||||
contract.Assertf(!has, "two resources ('%s' and '%s') aliased to the same: '%s'", otherUrn, state.URN, alias)
|
||||
}
|
||||
aliased[alias] = state.URN
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// VerifyIntegrity checks a snapshot to ensure it is well-formed. Because of the cost of this operation,
|
||||
// integrity verification is only performed on demand, and not automatically during snapshot construction.
|
||||
//
|
||||
|
|
|
@ -298,7 +298,7 @@ func (d *defaultProviders) newRegisterDefaultProviderEvent(
|
|||
event := ®isterResourceEvent{
|
||||
goal: resource.NewGoal(
|
||||
providers.MakeProviderType(req.Package()),
|
||||
req.Name(), true, inputs, "", false, nil, "", nil, nil, false, nil, nil),
|
||||
req.Name(), true, inputs, "", false, nil, "", nil, nil, false, nil, nil, nil),
|
||||
done: done,
|
||||
}
|
||||
return event, done, nil
|
||||
|
@ -706,6 +706,11 @@ func (rm *resmon) RegisterResource(ctx context.Context,
|
|||
provider = ref.String()
|
||||
}
|
||||
|
||||
aliases := []resource.URN{}
|
||||
for _, aliasURN := range req.GetAliases() {
|
||||
aliases = append(aliases, resource.URN(aliasURN))
|
||||
}
|
||||
|
||||
dependencies := []resource.URN{}
|
||||
for _, dependingURN := range req.GetDependencies() {
|
||||
dependencies = append(dependencies, resource.URN(dependingURN))
|
||||
|
@ -753,7 +758,7 @@ func (rm *resmon) RegisterResource(ctx context.Context,
|
|||
// Send the goal state to the engine.
|
||||
step := ®isterResourceEvent{
|
||||
goal: resource.NewGoal(t, name, custom, props, parent, protect, dependencies, provider, nil,
|
||||
propertyDependencies, deleteBeforeReplace, ignoreChanges, additionalSecretOutputs),
|
||||
propertyDependencies, deleteBeforeReplace, ignoreChanges, additionalSecretOutputs, aliases),
|
||||
done: make(chan *RegisterResult),
|
||||
}
|
||||
|
||||
|
|
|
@ -55,13 +55,13 @@ func fixedProgram(steps []RegisterResourceEvent) deploytest.ProgramFunc {
|
|||
for _, s := range steps {
|
||||
g := s.Goal()
|
||||
urn, id, outs, err := resmon.RegisterResource(g.Type, string(g.Name), g.Custom, g.Parent, g.Protect,
|
||||
g.Dependencies, g.Provider, g.Properties, g.PropertyDependencies, false, "", nil)
|
||||
g.Dependencies, g.Provider, g.Properties, g.PropertyDependencies, false, "", nil, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
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),
|
||||
false, g.Dependencies, nil, g.Provider, g.PropertyDependencies, false, nil, nil),
|
||||
})
|
||||
}
|
||||
return nil
|
||||
|
@ -143,16 +143,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, false, nil, nil),
|
||||
nil, "", []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
// 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, false, nil, nil),
|
||||
providerARef.String(), []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
&testRegEvent{
|
||||
goal: resource.NewGoal("pkgA:index:typA", "res2", true, resource.PropertyMap{}, componentURN, false, nil,
|
||||
providerARef.String(), []string{}, nil, false, nil, nil),
|
||||
providerARef.String(), []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
// Register two more providers.
|
||||
newProviderEvent("pkgA", "providerB", nil, ""),
|
||||
|
@ -160,11 +160,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, false, nil, nil),
|
||||
providerBRef.String(), []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
&testRegEvent{
|
||||
goal: resource.NewGoal("pkgB:index:typC", "res4", true, resource.PropertyMap{}, "", false, nil,
|
||||
providerCRef.String(), []string{}, nil, false, nil, nil),
|
||||
providerCRef.String(), []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,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),
|
||||
false, nil, nil),
|
||||
})
|
||||
|
||||
processed++
|
||||
|
@ -227,25 +227,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, false, nil, nil),
|
||||
nil, "", []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
// Register a couple resources from package A.
|
||||
&testRegEvent{
|
||||
goal: resource.NewGoal("pkgA:m:typA", "res1", true, resource.PropertyMap{},
|
||||
componentURN, false, nil, "", []string{}, nil, false, nil, nil),
|
||||
componentURN, false, nil, "", []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
&testRegEvent{
|
||||
goal: resource.NewGoal("pkgA:m:typA", "res2", true, resource.PropertyMap{},
|
||||
componentURN, false, nil, "", []string{}, nil, false, nil, nil),
|
||||
componentURN, false, nil, "", []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
// Register a few resources from other packages.
|
||||
&testRegEvent{
|
||||
goal: resource.NewGoal("pkgB:m:typB", "res3", true, resource.PropertyMap{}, "", false,
|
||||
nil, "", []string{}, nil, false, nil, nil),
|
||||
nil, "", []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
&testRegEvent{
|
||||
goal: resource.NewGoal("pkgB:m:typC", "res4", true, resource.PropertyMap{}, "", false,
|
||||
nil, "", []string{}, nil, false, nil, nil),
|
||||
nil, "", []string{}, nil, false, nil, nil, nil),
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,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),
|
||||
false, nil, nil),
|
||||
})
|
||||
|
||||
processed++
|
||||
|
@ -380,7 +380,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),
|
||||
false, nil, nil),
|
||||
})
|
||||
reads++
|
||||
}
|
||||
|
@ -465,7 +465,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),
|
||||
false, nil, nil),
|
||||
})
|
||||
registers++
|
||||
|
||||
|
@ -474,7 +474,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),
|
||||
})
|
||||
reads++
|
||||
}
|
||||
|
|
|
@ -142,7 +142,6 @@ func NewCreateReplacementStep(plan *Plan, reg RegisterResourceEvent,
|
|||
contract.Assert(new.ID == "")
|
||||
contract.Assert(!new.Custom || new.Provider != "" || providers.IsProviderType(new.Type))
|
||||
contract.Assert(!new.Delete)
|
||||
contract.Assert(old.Type == new.Type)
|
||||
contract.Assert(!new.External)
|
||||
return &CreateStep{
|
||||
plan: plan,
|
||||
|
@ -365,7 +364,6 @@ func NewUpdateStep(plan *Plan, reg RegisterResourceEvent, old *resource.State,
|
|||
contract.Assert(new.ID == "")
|
||||
contract.Assert(!new.Custom || new.Provider != "" || providers.IsProviderType(new.Type))
|
||||
contract.Assert(!new.Delete)
|
||||
contract.Assert(old.Type == new.Type)
|
||||
contract.Assert(!new.External)
|
||||
contract.Assert(!old.External)
|
||||
return &UpdateStep{
|
||||
|
@ -693,7 +691,7 @@ func (s *RefreshStep) Apply(preview bool) (resource.Status, StepCompleteFunc, er
|
|||
if outputs != nil {
|
||||
s.new = resource.NewState(s.old.Type, s.old.URN, s.old.Custom, s.old.Delete, s.old.ID, 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.PropertyDependencies, s.old.PendingReplacement, s.old.AdditionalSecretOutputs, s.old.Aliases)
|
||||
} else {
|
||||
s.new = nil
|
||||
}
|
||||
|
|
|
@ -42,10 +42,11 @@ type stepGenerator struct {
|
|||
creates map[resource.URN]bool // set of URNs created in this plan
|
||||
sames map[resource.URN]bool // set of URNs that were not changed in this plan
|
||||
pendingDeletes map[*resource.State]bool // set of resources (not URNs!) that are pending deletion
|
||||
|
||||
// a map from URN to a list of property keys that caused the replacement of a dependent resource during a
|
||||
// delete-before-replace.
|
||||
dependentReplaceKeys map[resource.URN][]resource.PropertyKey
|
||||
// a map from old names (aliased URNs) to the new URN that aliased to them.
|
||||
aliased map[resource.URN]resource.URN
|
||||
}
|
||||
|
||||
// GenerateReadSteps is responsible for producing one or more steps required to service
|
||||
|
@ -67,7 +68,9 @@ func (sg *stepGenerator) GenerateReadSteps(event ReadResourceEvent) ([]Step, res
|
|||
event.Provider(),
|
||||
nil, /* propertyDependencies */
|
||||
false, /* deleteBeforeCreate */
|
||||
event.AdditionalSecretOutputs())
|
||||
event.AdditionalSecretOutputs(),
|
||||
nil, /* aliases */
|
||||
)
|
||||
old, hasOld := sg.plan.Olds()[urn]
|
||||
|
||||
// If the snapshot has an old resource for this URN and it's not external, we're going
|
||||
|
@ -122,13 +125,27 @@ func (sg *stepGenerator) GenerateSteps(event RegisterResourceEvent) ([]Step, res
|
|||
}
|
||||
sg.urns[urn] = true
|
||||
|
||||
// Check for an old resource so that we can figure out if this is a create, delete, etc., and/or to diff.
|
||||
old, hasOld := sg.plan.Olds()[urn]
|
||||
// Check for an old resource so that we can figure out if this is a create, delete, etc., and/or to diff. We look
|
||||
// up first by URN and then by any provided aliases. If it is found using an alias, record that alias so that we do
|
||||
// not delete the aliased resource later.
|
||||
var oldInputs resource.PropertyMap
|
||||
var oldOutputs resource.PropertyMap
|
||||
if hasOld {
|
||||
oldInputs = old.Inputs
|
||||
oldOutputs = old.Outputs
|
||||
var old *resource.State
|
||||
var hasOld bool
|
||||
for _, urnOrAlias := range append([]resource.URN{urn}, goal.Aliases...) {
|
||||
old, hasOld = sg.plan.Olds()[urnOrAlias]
|
||||
if hasOld {
|
||||
oldInputs = old.Inputs
|
||||
oldOutputs = old.Outputs
|
||||
if urnOrAlias != urn {
|
||||
if previousAliasURN, alreadyAliased := sg.aliased[urnOrAlias]; alreadyAliased {
|
||||
invalid = true
|
||||
sg.plan.Diag().Errorf(diag.GetDuplicateResourceAliasError(urn), urnOrAlias, urn, previousAliasURN)
|
||||
}
|
||||
sg.aliased[urnOrAlias] = urn
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Create the desired inputs from the goal state
|
||||
|
@ -141,7 +158,8 @@ func (sg *stepGenerator) GenerateSteps(event RegisterResourceEvent) ([]Step, res
|
|||
// Produce a new state object that we'll build up as operations are performed. Ultimately, this is what will
|
||||
// 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)
|
||||
goal.Dependencies, goal.InitErrors, goal.Provider, goal.PropertyDependencies, false,
|
||||
goal.AdditionalSecretOutputs, goal.Aliases)
|
||||
|
||||
// Fetch the provider for this resource.
|
||||
prov, res := sg.loadResourceProvider(urn, goal.Custom, goal.Provider, goal.Type)
|
||||
|
@ -265,7 +283,7 @@ func (sg *stepGenerator) GenerateSteps(event RegisterResourceEvent) ([]Step, res
|
|||
// - Otherwise, we invoke the resource's provider's `Diff` method. If this method indicates that the resource must
|
||||
// be replaced, we do so. If it does not, we update the resource in place.
|
||||
if hasOld {
|
||||
contract.Assert(old != nil && old.Type == new.Type)
|
||||
contract.Assert(old != nil)
|
||||
|
||||
var diff plugin.DiffResult
|
||||
if old.Provider != new.Provider {
|
||||
|
@ -454,7 +472,8 @@ func (sg *stepGenerator) GenerateDeletes() []Step {
|
|||
logging.V(7).Infof("Planner decided to delete '%v' due to replacement", res.URN)
|
||||
sg.deletes[res.URN] = true
|
||||
dels = append(dels, NewDeleteReplacementStep(sg.plan, res, false))
|
||||
} else if !sg.sames[res.URN] && !sg.updates[res.URN] && !sg.replaces[res.URN] && !sg.reads[res.URN] {
|
||||
} 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
|
||||
// delete steps for the same URN if the old checkpoint contained pending deletes.
|
||||
logging.V(7).Infof("Planner decided to delete '%v'", res.URN)
|
||||
|
@ -783,5 +802,6 @@ func newStepGenerator(plan *Plan, opts Options) *stepGenerator {
|
|||
deletes: make(map[resource.URN]bool),
|
||||
pendingDeletes: make(map[*resource.State]bool),
|
||||
dependentReplaceKeys: make(map[resource.URN][]resource.PropertyKey),
|
||||
aliased: make(map[resource.URN]resource.URN),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,13 +34,14 @@ type Goal struct {
|
|||
DeleteBeforeReplace bool // true if this resource should be deleted prior to replacement.
|
||||
IgnoreChanges []string // a list of property names to ignore during changes.
|
||||
AdditionalSecretOutputs []PropertyKey // outputs that should always be treated as secrets.
|
||||
Aliases []URN // additional URNs that should be aliased to this resource.
|
||||
}
|
||||
|
||||
// NewGoal allocates a new resource goal state.
|
||||
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) *Goal {
|
||||
additionalSecretOutputs []PropertyKey, aliases []URN) *Goal {
|
||||
|
||||
return &Goal{
|
||||
Type: t,
|
||||
|
@ -56,5 +57,6 @@ func NewGoal(t tokens.Type, name tokens.QName, custom bool, props PropertyMap,
|
|||
DeleteBeforeReplace: deleteBeforeReplace,
|
||||
IgnoreChanges: ignoreChanges,
|
||||
AdditionalSecretOutputs: additionalSecretOutputs,
|
||||
Aliases: aliases,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,13 +40,15 @@ type State struct {
|
|||
PropertyDependencies map[PropertyKey][]URN // the set of dependencies that affect each property.
|
||||
PendingReplacement bool // true if this resource was deleted and is awaiting replacement.
|
||||
AdditionalSecretOutputs []PropertyKey // an additional set of outputs that should be treated as secrets.
|
||||
Aliases []URN // TODO
|
||||
}
|
||||
|
||||
// NewState creates a new resource value from existing resource state information.
|
||||
func NewState(t tokens.Type, urn URN, custom bool, del bool, id ID,
|
||||
inputs PropertyMap, outputs PropertyMap, parent URN, protect bool,
|
||||
external bool, dependencies []URN, initErrors []string, provider string,
|
||||
propertyDependencies map[PropertyKey][]URN, pendingReplacement bool, additionalSecretOutputs []PropertyKey) *State {
|
||||
propertyDependencies map[PropertyKey][]URN, pendingReplacement bool,
|
||||
additionalSecretOutputs []PropertyKey, aliases []URN) *State {
|
||||
|
||||
contract.Assertf(t != "", "type was empty")
|
||||
contract.Assertf(custom || id == "", "is custom or had empty ID")
|
||||
|
@ -68,5 +70,6 @@ func NewState(t tokens.Type, urn URN, custom bool, del bool, id ID,
|
|||
PropertyDependencies: propertyDependencies,
|
||||
PendingReplacement: pendingReplacement,
|
||||
AdditionalSecretOutputs: additionalSecretOutputs,
|
||||
Aliases: aliases,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,6 +290,7 @@ func SerializeResource(res *resource.State, enc config.Encrypter) (apitype.Resou
|
|||
PropertyDependencies: res.PropertyDependencies,
|
||||
PendingReplacement: res.PendingReplacement,
|
||||
AdditionalSecretOutputs: res.AdditionalSecretOutputs,
|
||||
Aliases: res.Aliases,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -395,7 +396,7 @@ func DeserializeResource(res apitype.ResourceV3, dec config.Decrypter) (*resourc
|
|||
return resource.NewState(
|
||||
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), nil
|
||||
res.PropertyDependencies, res.PendingReplacement, res.AdditionalSecretOutputs, res.Aliases), nil
|
||||
}
|
||||
|
||||
func DeserializeOperation(op apitype.OperationV2, dec config.Decrypter) (resource.Operation, error) {
|
||||
|
|
|
@ -80,6 +80,7 @@ func TestDeploymentSerialization(t *testing.T) {
|
|||
nil,
|
||||
false,
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
|
||||
dep, err := SerializeResource(res, config.NopEncrypter)
|
||||
|
|
|
@ -75,6 +75,9 @@ type EditDir struct {
|
|||
// tolerate *any* failure in the program (IDEA: in the future, offer a way to narrow this down more).
|
||||
ExpectFailure bool
|
||||
|
||||
// ExpectNoChanges is true if the edit is expected to not propose any changes.
|
||||
ExpectNoChanges bool
|
||||
|
||||
// Stdout is the writer to use for all stdout messages.
|
||||
Stdout io.Writer
|
||||
// Stderr is the writer to use for all stderr messages.
|
||||
|
@ -1049,7 +1052,8 @@ func (pt *programTester) testEdit(dir string, i int, edit EditDir) error {
|
|||
pt.opts.Verbose = oldVerbose
|
||||
}()
|
||||
|
||||
if err = pt.previewAndUpdate(dir, fmt.Sprintf("edit-%d", i), edit.ExpectFailure, false, false); err != nil {
|
||||
if err = pt.previewAndUpdate(dir, fmt.Sprintf("edit-%d", i),
|
||||
edit.ExpectFailure, edit.ExpectNoChanges, edit.ExpectNoChanges); err != nil {
|
||||
return err
|
||||
}
|
||||
return pt.performExtraRuntimeValidation(edit.ExtraRuntimeValidation, dir)
|
||||
|
|
|
@ -331,7 +331,7 @@ if (goog.DEBUG && !COMPILED) {
|
|||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.pulumirpc.ReadResourceRequest.repeatedFields_ = [6,10];
|
||||
proto.pulumirpc.ReadResourceRequest.repeatedFields_ = [6,10,11];
|
||||
|
||||
|
||||
|
||||
|
@ -371,7 +371,8 @@ proto.pulumirpc.ReadResourceRequest.toObject = function(includeInstance, msg) {
|
|||
provider: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
||||
version: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
||||
acceptsecrets: jspb.Message.getFieldWithDefault(msg, 9, false),
|
||||
additionalsecretoutputsList: jspb.Message.getRepeatedField(msg, 10)
|
||||
additionalsecretoutputsList: jspb.Message.getRepeatedField(msg, 10),
|
||||
aliasesList: jspb.Message.getRepeatedField(msg, 11)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
|
@ -449,6 +450,10 @@ proto.pulumirpc.ReadResourceRequest.deserializeBinaryFromReader = function(msg,
|
|||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addAdditionalsecretoutputs(value);
|
||||
break;
|
||||
case 11:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addAliases(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
|
@ -549,6 +554,13 @@ proto.pulumirpc.ReadResourceRequest.serializeBinaryToWriter = function(message,
|
|||
f
|
||||
);
|
||||
}
|
||||
f = message.getAliasesList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
11,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -747,6 +759,35 @@ proto.pulumirpc.ReadResourceRequest.prototype.clearAdditionalsecretoutputsList =
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string aliases = 11;
|
||||
* @return {!Array.<string>}
|
||||
*/
|
||||
proto.pulumirpc.ReadResourceRequest.prototype.getAliasesList = function() {
|
||||
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 11));
|
||||
};
|
||||
|
||||
|
||||
/** @param {!Array.<string>} value */
|
||||
proto.pulumirpc.ReadResourceRequest.prototype.setAliasesList = function(value) {
|
||||
jspb.Message.setField(this, 11, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!string} value
|
||||
* @param {number=} opt_index
|
||||
*/
|
||||
proto.pulumirpc.ReadResourceRequest.prototype.addAliases = function(value, opt_index) {
|
||||
jspb.Message.addToRepeatedField(this, 11, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
proto.pulumirpc.ReadResourceRequest.prototype.clearAliasesList = function() {
|
||||
this.setAliasesList([]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
|
@ -956,7 +997,7 @@ if (goog.DEBUG && !COMPILED) {
|
|||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.pulumirpc.RegisterResourceRequest.repeatedFields_ = [7,12,14];
|
||||
proto.pulumirpc.RegisterResourceRequest.repeatedFields_ = [7,12,14,15];
|
||||
|
||||
|
||||
|
||||
|
@ -1000,7 +1041,8 @@ proto.pulumirpc.RegisterResourceRequest.toObject = function(includeInstance, msg
|
|||
version: jspb.Message.getFieldWithDefault(msg, 11, ""),
|
||||
ignorechangesList: jspb.Message.getRepeatedField(msg, 12),
|
||||
acceptsecrets: jspb.Message.getFieldWithDefault(msg, 13, false),
|
||||
additionalsecretoutputsList: jspb.Message.getRepeatedField(msg, 14)
|
||||
additionalsecretoutputsList: jspb.Message.getRepeatedField(msg, 14),
|
||||
aliasesList: jspb.Message.getRepeatedField(msg, 15)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
|
@ -1096,6 +1138,10 @@ proto.pulumirpc.RegisterResourceRequest.deserializeBinaryFromReader = function(m
|
|||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addAdditionalsecretoutputs(value);
|
||||
break;
|
||||
case 15:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addAliases(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
|
@ -1221,6 +1267,13 @@ proto.pulumirpc.RegisterResourceRequest.serializeBinaryToWriter = function(messa
|
|||
f
|
||||
);
|
||||
}
|
||||
f = message.getAliasesList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
15,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -1665,6 +1718,35 @@ proto.pulumirpc.RegisterResourceRequest.prototype.clearAdditionalsecretoutputsLi
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string aliases = 15;
|
||||
* @return {!Array.<string>}
|
||||
*/
|
||||
proto.pulumirpc.RegisterResourceRequest.prototype.getAliasesList = function() {
|
||||
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 15));
|
||||
};
|
||||
|
||||
|
||||
/** @param {!Array.<string>} value */
|
||||
proto.pulumirpc.RegisterResourceRequest.prototype.setAliasesList = function(value) {
|
||||
jspb.Message.setField(this, 15, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!string} value
|
||||
* @param {number=} opt_index
|
||||
*/
|
||||
proto.pulumirpc.RegisterResourceRequest.prototype.addAliases = function(value, opt_index) {
|
||||
jspb.Message.addToRepeatedField(this, 15, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
proto.pulumirpc.RegisterResourceRequest.prototype.clearAliasesList = function() {
|
||||
this.setAliasesList([]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
|
|
|
@ -13,13 +13,60 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { ResourceError, RunError } from "./errors";
|
||||
import { Input, Inputs, Output } from "./output";
|
||||
import { all, Input, Inputs, interpolate, Output, output } from "./output";
|
||||
import { readResource, registerResource, registerResourceOutputs } from "./runtime/resource";
|
||||
import { getProject, getStack } from "./runtime/settings";
|
||||
import * as utils from "./utils";
|
||||
|
||||
export type ID = string; // a provider-assigned ID.
|
||||
export type URN = string; // an automatically generated logical URN, used to stably identify resources.
|
||||
|
||||
/**
|
||||
* createUrn computes a URN from the combination of a resource name, resource type, optional parent,
|
||||
* optional project and optional stack.
|
||||
*/
|
||||
export function createUrn(name: Input<string>, type: Input<string>, parent?: Resource | Input<URN>, project?: string, stack?: string): Output<string> {
|
||||
let parentPrefix: Output<string>;
|
||||
if (parent) {
|
||||
let parentUrn: Output<string>;
|
||||
if (Resource.isInstance(parent)) {
|
||||
parentUrn = parent.urn;
|
||||
} else {
|
||||
parentUrn = output(parent);
|
||||
}
|
||||
parentPrefix = parentUrn.apply(parentUrnString => parentUrnString.substring(0, parentUrnString.lastIndexOf("::")) + "$");
|
||||
} else {
|
||||
parentPrefix = output(`urn:pulumi:${stack || getStack()}::${project || getProject()}::`);
|
||||
}
|
||||
return interpolate`${parentPrefix}${type}::${name}`;
|
||||
}
|
||||
|
||||
// inheritedChildAlias computes the alias that should be applied to a child based on an alias applied to it's parent.
|
||||
// This may involve changing the name of the resource in cases where the resource has a named derived from the name of
|
||||
// the parent, and the parent name changed.
|
||||
function inheritedChildAlias(childName: string, parentName: string, parentAlias: Input<string>, childType: string): Output<string> {
|
||||
// If the child name has the parent name as a prefix, then we make the assumption that it was
|
||||
// constructed from the convention of using `{name}-details` as the name of the child resource. To
|
||||
// ensure this is aliased correctly, we must then also replace the parent aliases name in the prefix of
|
||||
// the child resource name.
|
||||
//
|
||||
// For example:
|
||||
// * name: "newapp-function"
|
||||
// * opts.parent.__name: "newapp"
|
||||
// * parentAlias: "urn:pulumi:stackname::projectname::awsx:ec2:Vpc::app"
|
||||
// * parentAliasName: "app"
|
||||
// * aliasName: "app-function"
|
||||
// * childAlias: "urn:pulumi:stackname::projectname::aws:s3/bucket:Bucket::app-function"
|
||||
let aliasName = output(childName);
|
||||
if (childName.startsWith(parentName)) {
|
||||
aliasName = output(parentAlias).apply(parentAliasUrn => {
|
||||
const parentAliasName = parentAliasUrn.substring(parentAliasUrn.lastIndexOf("::") + 2);
|
||||
return parentAliasName + childName.substring(parentName.length);
|
||||
});
|
||||
}
|
||||
return createUrn(aliasName, childType, parentAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resource represents a class whose CRUD operations are implemented by a provider plugin.
|
||||
*/
|
||||
|
@ -28,8 +75,8 @@ export abstract class Resource {
|
|||
* @internal
|
||||
* A private field to help with RTTI that works in SxS scenarios.
|
||||
*/
|
||||
// tslint:disable-next-line:variable-name
|
||||
public readonly __pulumiResource: boolean = true;
|
||||
// tslint:disable-next-line:variable-name
|
||||
public readonly __pulumiResource: boolean = true;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -92,11 +139,25 @@ export abstract class Resource {
|
|||
// tslint:disable-next-line:variable-name
|
||||
private readonly __protect: boolean;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* A list of aliases applied to this resource.
|
||||
*/
|
||||
// tslint:disable-next-line:variable-name
|
||||
readonly __aliases: Input<URN>[];
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* The name assigned to the resource at construction.
|
||||
*/
|
||||
// tslint:disable-next-line:variable-name
|
||||
private readonly __name: string;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* The set of providers to use for child resources. Keyed by package name (e.g. "aws").
|
||||
*/
|
||||
// tslint:disable-next-line:variable-name
|
||||
// tslint:disable-next-line:variable-name
|
||||
private readonly __providers: Record<string, ProviderResource>;
|
||||
|
||||
public static isInstance(obj: any): obj is Resource {
|
||||
|
@ -138,6 +199,11 @@ export abstract class Resource {
|
|||
throw new ResourceError("Missing resource name argument (for URN creation)", opts.parent);
|
||||
}
|
||||
|
||||
this.__name = name;
|
||||
|
||||
// Make a shallow clone of opts to ensure we don't modify the value passed in.
|
||||
opts = Object.assign({}, opts);
|
||||
|
||||
// Check the parent type if one exists and fill in any default options.
|
||||
this.__providers = {};
|
||||
if (opts.parent) {
|
||||
|
@ -149,6 +215,12 @@ export abstract class Resource {
|
|||
opts.protect = opts.parent.__protect;
|
||||
}
|
||||
|
||||
// Make a copy of the aliases array, and add to it any implicit aliases inherited from its parent
|
||||
opts.aliases = [...(opts.aliases || [])];
|
||||
for (const parentAlias of opts.parent.__aliases) {
|
||||
opts.aliases.push(inheritedChildAlias(name, opts.parent.__name, parentAlias, t));
|
||||
}
|
||||
|
||||
this.__providers = opts.parent.__providers;
|
||||
|
||||
if (custom) {
|
||||
|
@ -174,6 +246,15 @@ export abstract class Resource {
|
|||
}
|
||||
this.__protect = !!opts.protect;
|
||||
|
||||
// Collapse any `Alias`es down to URNs. We have to wait until this point to do so because we do not know the
|
||||
// default `name` and `type` to apply until we are inside the resource constructor.
|
||||
this.__aliases = [];
|
||||
if (opts.aliases) {
|
||||
for (const alias of opts.aliases) {
|
||||
this.__aliases.push(collapseAliasToUrn(alias, name, t, opts.parent));
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.id) {
|
||||
// If this resource already exists, read its state rather than registering it anew.
|
||||
if (!custom) {
|
||||
|
@ -193,6 +274,54 @@ export abstract class Resource {
|
|||
|
||||
(<any>Resource).doNotCapture = true;
|
||||
|
||||
/**
|
||||
* Alias is a partial description of prior named used for a resource. It can be processed in the context of a resource
|
||||
* creation to determine what the full aliased URN would be.
|
||||
*/
|
||||
export interface Alias {
|
||||
/**
|
||||
* The previous name of the resource. If not provided, the current name of the resource is used.
|
||||
*/
|
||||
name?: Input<string>;
|
||||
/**
|
||||
* The previous type of the resource. If not provided, the current type of the resource is used.
|
||||
*/
|
||||
type?: Input<string>;
|
||||
/**
|
||||
* The previous parent of the resource. If not provided, the current parent of the resource is used
|
||||
* (`opts.parent` if provided, else the implicit stack resource parent).
|
||||
*/
|
||||
parent?: Resource | Input<URN>;
|
||||
/**
|
||||
* The previous stack of the resource. If not provided, defaults to `pulumi.getStack()`.
|
||||
*/
|
||||
stack?: Input<string>;
|
||||
/**
|
||||
* The previous project of the resource. If not provided, defaults to `pulumi.getProject()`.
|
||||
*/
|
||||
project?: Input<string>;
|
||||
}
|
||||
|
||||
// collapseAliasToUrn turns an Alias into a URN given a set of default data
|
||||
function collapseAliasToUrn(
|
||||
alias: Input<Alias | string>, defaultName: string, defaultType: string,
|
||||
defaultParent: Resource | undefined): Output<URN> {
|
||||
|
||||
return output(alias).apply(a => {
|
||||
if (typeof a === "string") {
|
||||
return output(a);
|
||||
} else {
|
||||
return createUrn(
|
||||
output(a.name).apply(n => n || defaultName),
|
||||
output(a.type).apply(ty => ty || defaultType),
|
||||
a.parent || defaultParent,
|
||||
a.project,
|
||||
a.stack,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ResourceOptions is a bag of optional settings that control a resource's behavior.
|
||||
*/
|
||||
|
@ -213,18 +342,20 @@ export interface ResourceOptions {
|
|||
* When set to true, protect ensures this resource cannot be deleted.
|
||||
*/
|
||||
protect?: boolean;
|
||||
|
||||
/**
|
||||
* Ignore changes to any of the specified properties.
|
||||
*/
|
||||
ignoreChanges?: string[];
|
||||
|
||||
/**
|
||||
* An optional version, corresponding to the version of the provider plugin that should be used when operating on
|
||||
* this resource. This version overrides the version information inferred from the current package and should
|
||||
* rarely be used.
|
||||
*/
|
||||
version?: string;
|
||||
/**
|
||||
* An optional list of aliases to treat this resoruce as matching.
|
||||
*/
|
||||
aliases?: Input<URN | Alias>[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,9 +14,10 @@
|
|||
|
||||
import * as grpc from "grpc";
|
||||
import * as log from "../log";
|
||||
import { Input, Inputs, Output } from "../output";
|
||||
import { Input, Inputs, Output, output } from "../output";
|
||||
import {
|
||||
ComponentResource,
|
||||
createUrn,
|
||||
CustomResource,
|
||||
CustomResourceOptions,
|
||||
ID,
|
||||
|
@ -70,13 +71,8 @@ interface ResourceResolverOperation {
|
|||
// the dependency. All urns in this map must exist in [allDirectDependencyURNs]. These will
|
||||
// all be URNs of custom resources, not component resources.
|
||||
propertyToDirectDependencyURNs: Map<string, Set<URN>>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a test URN in the case where the engine isn't available to give us one.
|
||||
*/
|
||||
function createTestUrn(t: string, name: string): string {
|
||||
return `urn:pulumi:${getStack()}::${getProject()}::${t}::${name}`;
|
||||
// A list of aliases applied to this resource.
|
||||
aliases: URN[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -133,8 +129,9 @@ export function readResource(res: Resource, t: string, name: string, props: Inpu
|
|||
})), opLabel);
|
||||
} else {
|
||||
// If we aren't attached to the engine, in test mode, mock up a fake response for testing purposes.
|
||||
const mockurn = await createUrn(req.getName(), req.getType(), req.getParent()).promise();
|
||||
resp = {
|
||||
getUrn: () => createTestUrn(t, name),
|
||||
getUrn: () => mockurn,
|
||||
getProperties: () => req.getProperties(),
|
||||
};
|
||||
}
|
||||
|
@ -183,6 +180,7 @@ export function registerResource(res: Resource, t: string, name: string, custom:
|
|||
req.setVersion(opts.version || "");
|
||||
req.setAcceptsecrets(true);
|
||||
req.setAdditionalsecretoutputsList((<any>opts).additionalSecretOutputs || []);
|
||||
req.setAliasesList(resop.aliases);
|
||||
|
||||
const propertyDependencies = req.getPropertydependenciesMap();
|
||||
for (const [key, resourceURNs] of resop.propertyToDirectDependencyURNs) {
|
||||
|
@ -218,8 +216,9 @@ export function registerResource(res: Resource, t: string, name: string, custom:
|
|||
})), opLabel);
|
||||
} else {
|
||||
// If we aren't attached to the engine, in test mode, mock up a fake response for testing purposes.
|
||||
const mockurn = await createUrn(req.getName(), req.getType(), req.getParent()).promise();
|
||||
resp = {
|
||||
getUrn: () => createTestUrn(t, name),
|
||||
getUrn: () => mockurn,
|
||||
getId: () => undefined,
|
||||
getObject: () => req.getObject(),
|
||||
};
|
||||
|
@ -323,6 +322,14 @@ async function prepareResource(label: string, res: Resource, custom: boolean,
|
|||
propertyToDirectDependencyURNs.set(propertyName, urns);
|
||||
}
|
||||
|
||||
// Wait for all aliases. Note that we use `res.__aliases` instead of `opts.aliases` as the former has been processed
|
||||
// in the Resource constructor prior to calling `registerResource` - both adding new inherited aliases and
|
||||
// simplifying aliases down to URNs.
|
||||
const aliases = [];
|
||||
for (const alias of res.__aliases) {
|
||||
aliases.push(await output(alias).promise());
|
||||
}
|
||||
|
||||
return {
|
||||
resolveURN: resolveURN!,
|
||||
resolveID: resolveID,
|
||||
|
@ -332,6 +339,7 @@ async function prepareResource(label: string, res: Resource, custom: boolean,
|
|||
providerRef: providerRef,
|
||||
allDirectDependencyURNs: allDirectDependencyURNs,
|
||||
propertyToDirectDependencyURNs: propertyToDirectDependencyURNs,
|
||||
aliases: aliases,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ export function getProject(): string {
|
|||
}
|
||||
|
||||
/** @internal Used only for testing purposes. */
|
||||
export function _setProject(val: string) {
|
||||
export function _setProject(val: string | undefined) {
|
||||
(options as any).project = val;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ export function getStack(): string {
|
|||
}
|
||||
|
||||
/** @internal Used only for testing purposes. */
|
||||
export function _setStack(val: string) {
|
||||
export function _setStack(val: string | undefined) {
|
||||
(options as any).stack = val;
|
||||
}
|
||||
|
||||
|
|
66
sdk/nodejs/tests/resource.spec.ts
Normal file
66
sdk/nodejs/tests/resource.spec.ts
Normal file
|
@ -0,0 +1,66 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// tslint:disable
|
||||
|
||||
import * as assert from "assert";
|
||||
import { Output, concat, interpolate, output } from "../output";
|
||||
import * as runtime from "../runtime";
|
||||
import { asyncTest } from "./util";
|
||||
import { createUrn, ComponentResource, CustomResourceOptions } from "../resource";
|
||||
|
||||
class MyResource extends ComponentResource {
|
||||
constructor(name: string, opts?: CustomResourceOptions) {
|
||||
super("my:mod:MyResource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
class MyParentResource extends ComponentResource {
|
||||
child: MyResource;
|
||||
constructor(name: string, opts?: CustomResourceOptions) {
|
||||
super("my:mod:MyParentResource", name, {}, opts);
|
||||
this.child = new MyResource(`${name}-child`, { parent: this });
|
||||
}
|
||||
}
|
||||
|
||||
describe("createUrn", () => {
|
||||
before(() => {
|
||||
runtime._setTestModeEnabled(true);
|
||||
runtime._setProject("myproject");
|
||||
runtime._setStack("mystack");
|
||||
});
|
||||
|
||||
after(() => {
|
||||
runtime._setTestModeEnabled(false);
|
||||
runtime._setProject(undefined);
|
||||
runtime._setStack(undefined);
|
||||
});
|
||||
|
||||
it("handles name and type", asyncTest(async () => {
|
||||
const urn = await createUrn("n", "t").promise();
|
||||
assert.equal(urn, "urn:pulumi:mystack::myproject::t::n");
|
||||
}));
|
||||
|
||||
it("handles name and type and parent", asyncTest(async () => {
|
||||
const res = new MyResource("myres");
|
||||
const urn = await createUrn("n", "t", res).promise();
|
||||
assert.equal(urn, "urn:pulumi:mystack::myproject::my:mod:MyResource$t::n");
|
||||
}));
|
||||
|
||||
it("handles name and type and parent with parent", asyncTest(async () => {
|
||||
const res = new MyParentResource("myres");
|
||||
const urn = await createUrn("n", "t", res.child).promise();
|
||||
assert.equal(urn, "urn:pulumi:mystack::myproject::my:mod:MyParentResource$my:mod:MyResource$t::n");
|
||||
}));
|
||||
});
|
|
@ -58,6 +58,7 @@
|
|||
"tests/init.spec.ts",
|
||||
"tests/iterable.spec.ts",
|
||||
"tests/output.spec.ts",
|
||||
"tests/resource.spec.ts",
|
||||
"tests/testmode.spec.ts",
|
||||
"tests/unwrap.spec.ts",
|
||||
"tests/util.ts",
|
||||
|
|
|
@ -273,23 +273,23 @@ var _Analyzer_serviceDesc = grpc.ServiceDesc{
|
|||
func init() { proto.RegisterFile("analyzer.proto", fileDescriptor_analyzer_4d94ca02b59f2385) }
|
||||
|
||||
var fileDescriptor_analyzer_4d94ca02b59f2385 = []byte{
|
||||
// 287 bytes of a gzipped FileDescriptorProto
|
||||
// 285 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x91, 0x4f, 0x4b, 0xc3, 0x40,
|
||||
0x10, 0xc5, 0x1b, 0x95, 0xda, 0x4e, 0xb5, 0xc2, 0x80, 0xb5, 0xae, 0x1e, 0x42, 0x4e, 0x39, 0x6d,
|
||||
0x21, 0x22, 0x5e, 0x55, 0xfc, 0x7b, 0x93, 0x78, 0xf6, 0x90, 0x96, 0x49, 0x08, 0xa4, 0xd9, 0x75,
|
||||
0xff, 0x1c, 0xe2, 0xa7, 0xf0, 0x23, 0x8b, 0xbb, 0x6b, 0x2c, 0xda, 0xdb, 0x0c, 0xef, 0xf1, 0x9b,
|
||||
0x37, 0x33, 0x30, 0x2d, 0xda, 0xa2, 0xe9, 0x3e, 0x48, 0x71, 0xa9, 0x84, 0x11, 0x38, 0x96, 0xb6,
|
||||
0xb1, 0xeb, 0x5a, 0xc9, 0x15, 0x3b, 0x90, 0x8d, 0xad, 0xea, 0xd6, 0x0b, 0xec, 0xac, 0x12, 0xa2,
|
||||
0x6a, 0x68, 0xe1, 0xba, 0xa5, 0x2d, 0x17, 0xb4, 0x96, 0xa6, 0x0b, 0xe2, 0xf9, 0x5f, 0x51, 0x1b,
|
||||
0x65, 0x57, 0xc6, 0xab, 0xc9, 0x1b, 0x4c, 0x6f, 0xfc, 0x94, 0x9c, 0xde, 0x2d, 0x69, 0x83, 0x08,
|
||||
0x7b, 0xa6, 0x93, 0x34, 0x8f, 0xe2, 0x28, 0x1d, 0xe7, 0xae, 0xc6, 0x2b, 0x00, 0xa9, 0x84, 0x24,
|
||||
0x65, 0x6a, 0xd2, 0xf3, 0x9d, 0x38, 0x4a, 0x27, 0xd9, 0x09, 0xf7, 0x60, 0xfe, 0x03, 0xe6, 0xaf,
|
||||
0x0e, 0x9c, 0x6f, 0x58, 0x93, 0x27, 0x38, 0xea, 0xf1, 0x5a, 0x8a, 0x56, 0x13, 0x5e, 0xc2, 0xa8,
|
||||
0x2c, 0xea, 0xc6, 0x2a, 0xd2, 0xf3, 0x28, 0xde, 0x4d, 0x27, 0xd9, 0x29, 0xef, 0x17, 0xe3, 0xc1,
|
||||
0xfd, 0xe0, 0x1d, 0x79, 0x6f, 0x4d, 0xee, 0xfa, 0xa0, 0x41, 0x43, 0x06, 0xa3, 0x30, 0xa9, 0x0b,
|
||||
0x61, 0xfb, 0x1e, 0x67, 0x30, 0x54, 0x54, 0x68, 0xd1, 0xba, 0xb0, 0xe3, 0x3c, 0x74, 0xd9, 0x67,
|
||||
0x04, 0xa3, 0x80, 0x51, 0x78, 0x0b, 0xfb, 0xa1, 0xc6, 0x2d, 0x11, 0xc2, 0x3d, 0x18, 0xdb, 0x26,
|
||||
0xf9, 0x5d, 0x92, 0x01, 0x5e, 0xc3, 0xe1, 0x23, 0x99, 0x17, 0xf7, 0x8d, 0xe7, 0xb6, 0x14, 0x38,
|
||||
0xfb, 0x77, 0x96, 0xfb, 0xef, 0x67, 0xb0, 0xe3, 0x0d, 0xcc, 0xaf, 0x3d, 0x19, 0x2c, 0x87, 0xce,
|
||||
0x78, 0xf1, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, 0x6d, 0x9c, 0x46, 0xee, 0x01, 0x00, 0x00,
|
||||
0x10, 0xc5, 0x1b, 0x95, 0x9a, 0x8c, 0x5a, 0x61, 0xc0, 0x5a, 0x57, 0x0f, 0x25, 0x27, 0x4f, 0x5b,
|
||||
0xa8, 0x88, 0x57, 0x15, 0xff, 0xde, 0x24, 0x9e, 0x3d, 0xa4, 0x65, 0x12, 0x02, 0x69, 0x76, 0xdd,
|
||||
0x3f, 0x87, 0xf8, 0x29, 0xfc, 0xc8, 0xc6, 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x50, 0xe3, 0x86, 0x08, 0xe1, 0x1e, 0x8c, 0x6d, 0x92, 0xfc, 0x2e,
|
||||
0xe9, 0x00, 0xaf, 0xe1, 0xe0, 0x91, 0xcc, 0x8b, 0xfb, 0xc6, 0x73, 0x53, 0x08, 0x1c, 0xff, 0x3b,
|
||||
0xcb, 0xfd, 0xf7, 0x33, 0xd8, 0xd1, 0x1a, 0xe6, 0xd7, 0x9e, 0x0e, 0x16, 0x43, 0x67, 0xbc, 0xf8,
|
||||
0x0a, 0x00, 0x00, 0xff, 0xff, 0xff, 0x6d, 0x9c, 0x46, 0xee, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
@ -431,28 +431,27 @@ var _Engine_serviceDesc = grpc.ServiceDesc{
|
|||
func init() { proto.RegisterFile("engine.proto", fileDescriptor_engine_8ab3bc277096818e) }
|
||||
|
||||
var fileDescriptor_engine_8ab3bc277096818e = []byte{
|
||||
// 356 bytes of a gzipped FileDescriptorProto
|
||||
// 352 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x91, 0x4f, 0x4b, 0xeb, 0x40,
|
||||
0x14, 0xc5, 0x3b, 0x4d, 0xff, 0x24, 0xb7, 0x8f, 0xf7, 0xc2, 0xc0, 0x4b, 0xf3, 0xf2, 0x5c, 0xc4,
|
||||
0xac, 0x42, 0x85, 0x14, 0x2a, 0xb8, 0x70, 0xa7, 0x18, 0x4b, 0xa1, 0xb4, 0x30, 0x41, 0x04, 0x77,
|
||||
0x6d, 0xbd, 0xc6, 0x42, 0x93, 0x89, 0x99, 0x89, 0xd0, 0x2f, 0xe4, 0x67, 0x74, 0x29, 0x4d, 0xda,
|
||||
0x58, 0x35, 0xd6, 0xdd, 0xcc, 0xbd, 0x87, 0x1f, 0xe7, 0x9e, 0x03, 0xbf, 0x30, 0x0e, 0x97, 0x31,
|
||||
0x7a, 0x49, 0xca, 0x25, 0xa7, 0x5a, 0x92, 0xad, 0xb2, 0x68, 0x99, 0x26, 0x0b, 0xeb, 0x7f, 0xc8,
|
||||
0x79, 0xb8, 0xc2, 0x7e, 0xbe, 0x98, 0x67, 0x0f, 0x7d, 0x8c, 0x12, 0xb9, 0x2e, 0x74, 0xce, 0x0b,
|
||||
0x01, 0x18, 0xf3, 0x90, 0xe1, 0x53, 0x86, 0x42, 0xd2, 0x01, 0xa8, 0x02, 0x9f, 0x31, 0x5d, 0xca,
|
||||
0xb5, 0x49, 0x6c, 0xe2, 0xfe, 0x1e, 0x18, 0x5e, 0x49, 0xf2, 0xc6, 0x3c, 0x0c, 0xb6, 0x5b, 0x56,
|
||||
0xea, 0xa8, 0x09, 0xed, 0x08, 0x85, 0x98, 0x85, 0x68, 0xd6, 0x6d, 0xe2, 0x6a, 0x6c, 0xf7, 0xa5,
|
||||
0x3a, 0x28, 0x59, 0x1a, 0x9b, 0x4a, 0x3e, 0xdd, 0x3c, 0xa9, 0x05, 0xaa, 0x90, 0x29, 0xce, 0xa2,
|
||||
0xd1, 0xbd, 0xd9, 0xb0, 0x89, 0xdb, 0x64, 0xe5, 0x9f, 0x1e, 0x81, 0x86, 0xc9, 0x23, 0x46, 0x98,
|
||||
0xce, 0x56, 0x66, 0xd3, 0x26, 0xae, 0xca, 0xde, 0x07, 0x8e, 0x09, 0xc6, 0x10, 0x25, 0xe3, 0x5c,
|
||||
0x32, 0x14, 0x3c, 0x4b, 0x17, 0xb8, 0xf5, 0xec, 0x9c, 0x40, 0xf7, 0xcb, 0x46, 0x24, 0x3c, 0x16,
|
||||
0xa5, 0x01, 0x52, 0x1a, 0x70, 0x7a, 0x60, 0x04, 0x95, 0x98, 0x0a, 0xed, 0x3f, 0xe8, 0x06, 0xd5,
|
||||
0xe0, 0xde, 0x39, 0x74, 0xf6, 0xc2, 0xa0, 0x1a, 0x34, 0xaf, 0xfc, 0xcb, 0x9b, 0xa1, 0x5e, 0xa3,
|
||||
0x2a, 0x34, 0x46, 0x93, 0xeb, 0xa9, 0x4e, 0x68, 0x07, 0xda, 0xb7, 0x17, 0x6c, 0x32, 0x9a, 0x0c,
|
||||
0xf5, 0xfa, 0x46, 0xe1, 0x33, 0x36, 0x65, 0xba, 0x32, 0x78, 0x25, 0xd0, 0xf2, 0xf3, 0xae, 0xe8,
|
||||
0x19, 0x28, 0x63, 0x1e, 0xd2, 0xbf, 0x1f, 0x33, 0xde, 0x3a, 0xb2, 0x0c, 0xaf, 0x68, 0xce, 0xdb,
|
||||
0x35, 0xe7, 0xf9, 0x9b, 0xe6, 0x9c, 0x1a, 0xbd, 0x83, 0x3f, 0x9f, 0x4e, 0xa6, 0xc7, 0x7b, 0x8c,
|
||||
0xea, 0xa0, 0x2c, 0xe7, 0x90, 0xa4, 0x38, 0xac, 0x60, 0x07, 0x07, 0xd8, 0xc1, 0xcf, 0xec, 0xe0,
|
||||
0x3b, 0xf6, 0xbc, 0x95, 0x5f, 0x72, 0xfa, 0x16, 0x00, 0x00, 0xff, 0xff, 0x26, 0x3e, 0xcf, 0xd2,
|
||||
0xac, 0x02, 0x00, 0x00,
|
||||
0x14, 0xc5, 0x9b, 0xa6, 0xff, 0x72, 0xfb, 0x78, 0x2f, 0x0c, 0xbc, 0x74, 0x8c, 0x2e, 0x34, 0x2b,
|
||||
0xa9, 0x90, 0x42, 0x05, 0x17, 0xee, 0x14, 0x63, 0x29, 0x48, 0x0b, 0x13, 0x44, 0x70, 0xd7, 0xd6,
|
||||
0x6b, 0x2c, 0x34, 0x99, 0x38, 0x33, 0x11, 0xfa, 0x85, 0xfc, 0x8c, 0x2e, 0x4d, 0x93, 0x36, 0x56,
|
||||
0x8d, 0x75, 0x97, 0xb9, 0xe7, 0xe4, 0xc7, 0xb9, 0xf7, 0xc0, 0x1f, 0x8c, 0x82, 0x79, 0x84, 0x6e,
|
||||
0x2c, 0xb8, 0xe2, 0xc4, 0x88, 0x93, 0x45, 0x12, 0xce, 0x45, 0x3c, 0xb3, 0xf7, 0x03, 0xce, 0x83,
|
||||
0x05, 0xf6, 0x32, 0x61, 0x9a, 0x3c, 0xf6, 0x30, 0x8c, 0xd5, 0x32, 0xf7, 0x39, 0xaf, 0x1a, 0xc0,
|
||||
0x0d, 0x0f, 0x18, 0x3e, 0x27, 0x28, 0x15, 0xe9, 0x43, 0x4b, 0xe2, 0x0b, 0x8a, 0xb9, 0x5a, 0x52,
|
||||
0xed, 0x50, 0x3b, 0xfe, 0xdb, 0xb7, 0xdc, 0x82, 0xe4, 0xa6, 0x46, 0x7f, 0xad, 0xb2, 0xc2, 0x47,
|
||||
0x28, 0x34, 0x43, 0x94, 0x72, 0x12, 0x20, 0xad, 0xa6, 0xbf, 0x18, 0x6c, 0xf3, 0x24, 0x26, 0xe8,
|
||||
0x89, 0x88, 0xa8, 0x9e, 0x4d, 0x57, 0x9f, 0xc4, 0x4e, 0xf9, 0x4a, 0xe0, 0x24, 0x1c, 0x3e, 0xd0,
|
||||
0x5a, 0x3a, 0xae, 0xb3, 0xe2, 0x4d, 0x0e, 0xc0, 0xc0, 0xf8, 0x09, 0x43, 0x14, 0x93, 0x05, 0xad,
|
||||
0xa7, 0x62, 0x8b, 0x7d, 0x0c, 0x1c, 0x0a, 0xd6, 0x00, 0x15, 0xe3, 0x5c, 0x31, 0x94, 0x3c, 0x11,
|
||||
0x33, 0x5c, 0x67, 0x76, 0x4e, 0xa0, 0xf3, 0x4d, 0x91, 0x31, 0x8f, 0x64, 0x11, 0x40, 0x2b, 0x02,
|
||||
0x38, 0x5d, 0xb0, 0xfc, 0x52, 0x4c, 0x89, 0x77, 0x0f, 0x3a, 0x7e, 0x39, 0xb8, 0x7b, 0x0e, 0xed,
|
||||
0xad, 0x63, 0x10, 0x03, 0xea, 0x57, 0xde, 0xe5, 0xed, 0xc0, 0xac, 0x90, 0x16, 0xd4, 0x86, 0xa3,
|
||||
0xeb, 0xb1, 0xa9, 0x91, 0x36, 0x34, 0xef, 0x2e, 0xd8, 0x68, 0x38, 0x1a, 0x98, 0xd5, 0x95, 0xc3,
|
||||
0x63, 0x6c, 0xcc, 0x4c, 0xbd, 0xff, 0xa6, 0x41, 0xc3, 0xcb, 0xba, 0x22, 0x67, 0xa0, 0xa7, 0x18,
|
||||
0xf2, 0xff, 0xf3, 0x8d, 0xd7, 0x89, 0x6c, 0xcb, 0xcd, 0x9b, 0x73, 0x37, 0xcd, 0xb9, 0xde, 0xaa,
|
||||
0x39, 0xa7, 0x42, 0xee, 0xe1, 0xdf, 0x97, 0x95, 0xc9, 0xd1, 0x16, 0xa3, 0xfc, 0x50, 0xb6, 0xb3,
|
||||
0xcb, 0x92, 0x2f, 0x96, 0xb3, 0xfd, 0x1d, 0x6c, 0xff, 0x77, 0xb6, 0xff, 0x13, 0x7b, 0xda, 0xc8,
|
||||
0x36, 0x39, 0x7d, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x26, 0x3e, 0xcf, 0xd2, 0xac, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
@ -433,35 +433,35 @@ var _LanguageRuntime_serviceDesc = grpc.ServiceDesc{
|
|||
func init() { proto.RegisterFile("language.proto", fileDescriptor_language_aca56bed509f6786) }
|
||||
|
||||
var fileDescriptor_language_aca56bed509f6786 = []byte{
|
||||
// 477 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x93, 0xdf, 0x6e, 0xd3, 0x30,
|
||||
0x14, 0xc6, 0x97, 0x66, 0xfd, 0x77, 0x0a, 0x1b, 0xb2, 0xb6, 0xca, 0x64, 0x5c, 0x94, 0x08, 0x44,
|
||||
0xaf, 0x32, 0x69, 0x88, 0x3f, 0xe3, 0x0a, 0x04, 0xd3, 0x84, 0x04, 0x12, 0x32, 0x0f, 0x80, 0xdc,
|
||||
0xe4, 0x34, 0x0a, 0x4b, 0x6d, 0xcf, 0xb1, 0x41, 0x79, 0x68, 0x24, 0x1e, 0x01, 0xd9, 0x4e, 0xbb,
|
||||
0xc2, 0x8a, 0x76, 0x77, 0xbe, 0x93, 0xef, 0x24, 0xbf, 0x7c, 0x3e, 0x86, 0x83, 0x9a, 0x8b, 0xd2,
|
||||
0xf2, 0x12, 0x33, 0xa5, 0xa5, 0x91, 0x64, 0xac, 0x6c, 0x6d, 0x57, 0x95, 0x56, 0x79, 0x72, 0x4f,
|
||||
0xd5, 0xb6, 0xac, 0x44, 0x78, 0x90, 0x9c, 0x94, 0x52, 0x96, 0x35, 0x9e, 0x7a, 0xb5, 0xb0, 0xcb,
|
||||
0x53, 0x5c, 0x29, 0xd3, 0x86, 0x87, 0x29, 0x87, 0x87, 0x97, 0x68, 0x18, 0x5e, 0xdb, 0x4a, 0x63,
|
||||
0xf1, 0xc5, 0xcf, 0x35, 0x4e, 0x62, 0x63, 0x08, 0x85, 0xa1, 0xd2, 0xf2, 0x3b, 0xe6, 0x86, 0x46,
|
||||
0xb3, 0x68, 0x3e, 0x66, 0x6b, 0x49, 0x1e, 0x40, 0xac, 0x7e, 0x16, 0xb4, 0xe7, 0xbb, 0xae, 0xec,
|
||||
0xbc, 0xa5, 0xe6, 0x2b, 0x1a, 0x6f, 0xbc, 0x4e, 0xa6, 0x5f, 0x21, 0xd9, 0xf5, 0x89, 0x46, 0x49,
|
||||
0xd1, 0x20, 0x79, 0x01, 0xc3, 0x40, 0xdb, 0xd0, 0x68, 0x16, 0xcf, 0x27, 0x67, 0x27, 0xd9, 0xe6,
|
||||
0x47, 0xb2, 0x60, 0xfe, 0x80, 0x0a, 0x45, 0x81, 0x22, 0x6f, 0xd9, 0xda, 0x9b, 0xfe, 0xea, 0x01,
|
||||
0x30, 0x2b, 0xee, 0x26, 0x3d, 0x82, 0x7e, 0x63, 0x78, 0x7e, 0xd5, 0xb1, 0x06, 0xb1, 0xe6, 0x8f,
|
||||
0x77, 0xf2, 0xef, 0xff, 0xc5, 0x4f, 0x08, 0xec, 0x73, 0x5d, 0x36, 0xb4, 0x3f, 0x8b, 0xe7, 0x63,
|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7b, 0xe4,
|
||||
0x25, 0xc4, 0x2e, 0xd6, 0xe3, 0x9d, 0x27, 0x93, 0x4c, 0xff, 0x6d, 0x6f, 0xe6, 0xde, 0xc2, 0xfd,
|
||||
0x4b, 0x34, 0xe1, 0x7d, 0x1f, 0xc5, 0x52, 0x92, 0x69, 0x16, 0x2e, 0x50, 0xb6, 0xbe, 0x40, 0xd9,
|
||||
0x85, 0xbb, 0x40, 0xc9, 0xf1, 0xad, 0x45, 0x75, 0xf6, 0x74, 0x6f, 0x31, 0xf0, 0xc6, 0xe7, 0x7f,
|
||||
0x02, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xdb, 0x96, 0xaa, 0xa2, 0x03, 0x00, 0x00,
|
||||
// 471 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x53, 0xdb, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0x6d, 0xe2, 0x26, 0x8d, 0x27, 0xd0, 0xa2, 0x15, 0x8d, 0x16, 0x97, 0x07, 0xb0, 0x40, 0xf4,
|
||||
0xc9, 0x95, 0x8a, 0xb8, 0x94, 0x27, 0x10, 0x54, 0x08, 0x09, 0x24, 0x64, 0x3e, 0x00, 0x6d, 0xec,
|
||||
0x89, 0x65, 0x6a, 0xef, 0x9a, 0xb5, 0x17, 0xe4, 0x8f, 0x46, 0xe2, 0x13, 0xd8, 0x9b, 0xd3, 0x40,
|
||||
0x83, 0xf2, 0x36, 0x67, 0xf6, 0xcc, 0xcc, 0xd9, 0xb3, 0xb3, 0x70, 0x58, 0x31, 0x5e, 0x28, 0x56,
|
||||
0x60, 0xd2, 0x48, 0xd1, 0x09, 0x12, 0x36, 0xaa, 0x52, 0x75, 0x29, 0x9b, 0x2c, 0xba, 0xd5, 0x54,
|
||||
0xaa, 0x28, 0xb9, 0x3b, 0x88, 0x4e, 0x0a, 0x21, 0x8a, 0x0a, 0xcf, 0x2c, 0x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xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4e,
|
||||
0xdb, 0x96, 0xaa, 0xa2, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
@ -1538,68 +1538,67 @@ var _ResourceProvider_serviceDesc = grpc.ServiceDesc{
|
|||
func init() { proto.RegisterFile("provider.proto", fileDescriptor_provider_308463e06268e293) }
|
||||
|
||||
var fileDescriptor_provider_308463e06268e293 = []byte{
|
||||
// 997 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xc4, 0x57, 0x4d, 0x6f, 0xdb, 0x46,
|
||||
0x13, 0x16, 0x25, 0x59, 0xb6, 0x46, 0x1f, 0xd0, 0xbb, 0x6f, 0x6b, 0x2b, 0x4c, 0x0e, 0x02, 0xdb,
|
||||
0x83, 0xd1, 0x02, 0x72, 0xe1, 0x1c, 0xda, 0x04, 0x09, 0x52, 0xd8, 0x96, 0x5b, 0x21, 0x88, 0x9c,
|
||||
0xd2, 0x48, 0x8b, 0xf6, 0x52, 0xd0, 0xe4, 0x50, 0x61, 0x45, 0x93, 0xec, 0x72, 0xa9, 0xc2, 0x3d,
|
||||
0xf7, 0xd0, 0x8f, 0x6b, 0x2f, 0xfd, 0x11, 0xbd, 0xf4, 0x7f, 0xf5, 0x3f, 0x14, 0xfb, 0x41, 0x8a,
|
||||
0x6b, 0xc9, 0x8a, 0x6c, 0xa4, 0xe8, 0x8d, 0xa3, 0x99, 0xdd, 0x79, 0xe6, 0x99, 0x99, 0x87, 0x14,
|
||||
0x74, 0x13, 0x1a, 0xcf, 0x03, 0x0f, 0xe9, 0x30, 0xa1, 0x31, 0x8b, 0x49, 0x33, 0xc9, 0xc2, 0xec,
|
||||
0x32, 0xa0, 0x89, 0x6b, 0xb6, 0x93, 0x30, 0x9b, 0x06, 0x91, 0x74, 0x98, 0xf7, 0xa7, 0x71, 0x3c,
|
||||
0x0d, 0xf1, 0x40, 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 0x55, 0xc8, 0x33, 0x00, 0x21, 0x35, 0xf2,
|
||||
0x8a, 0xdd, 0x25, 0xf1, 0x92, 0x37, 0xec, 0xdd, 0x20, 0x6a, 0x56, 0x85, 0x7f, 0x06, 0x16, 0x1f,
|
||||
0x2d, 0xe4, 0xfe, 0x9a, 0x0f, 0x40, 0xf3, 0xc1, 0x6a, 0x67, 0x09, 0x4a, 0x43, 0xbe, 0xfe, 0x49,
|
||||
0x19, 0xb0, 0xf6, 0x5d, 0x62, 0xde, 0x5b, 0xe1, 0x29, 0x2e, 0x78, 0x02, 0x5b, 0xa2, 0xbc, 0xbb,
|
||||
0x31, 0xf1, 0x08, 0xea, 0xbc, 0xb4, 0xbb, 0x70, 0xf0, 0x0c, 0x1a, 0x52, 0x14, 0x35, 0xe4, 0x9a,
|
||||
0x06, 0x6b, 0xc8, 0x75, 0x05, 0x95, 0xb9, 0xb9, 0xba, 0x68, 0xb9, 0x4b, 0x52, 0xa8, 0xe5, 0x2e,
|
||||
0xcb, 0x90, 0xcc, 0x2d, 0x17, 0x50, 0xcb, 0xad, 0x09, 0x84, 0x96, 0x5b, 0xdf, 0x56, 0xc1, 0x5a,
|
||||
0x43, 0xae, 0x9d, 0x76, 0x81, 0xb6, 0x89, 0xe6, 0xee, 0xd2, 0x7c, 0x8e, 0xf8, 0x9f, 0x07, 0xab,
|
||||
0x42, 0x1e, 0x43, 0xe3, 0xd8, 0x89, 0x5c, 0x0c, 0xc9, 0x0d, 0x31, 0x6b, 0xce, 0x7e, 0x0a, 0x9d,
|
||||
0xcf, 0x90, 0xbd, 0x14, 0x7f, 0x52, 0xc6, 0x91, 0x1f, 0xdf, 0x78, 0xc5, 0xbb, 0x25, 0x60, 0x8b,
|
||||
0x70, 0xab, 0x72, 0xd1, 0x10, 0x81, 0x0f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x51, 0x61, 0x5d,
|
||||
0xad, 0x05, 0x0d, 0x00, 0x00,
|
||||
// 992 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xc4, 0x57, 0x4f, 0x73, 0xdb, 0x54,
|
||||
0x10, 0x8f, 0x6c, 0xc7, 0x8d, 0xd7, 0x7f, 0xc6, 0x3c, 0x20, 0x71, 0xd5, 0x1e, 0x32, 0x82, 0x43,
|
||||
0x07, 0x66, 0x14, 0x26, 0x3d, 0x40, 0x3b, 0xed, 0xc0, 0xa4, 0x71, 0xc0, 0xd3, 0xa9, 0x53, 0x94,
|
||||
0x29, 0x0c, 0x5c, 0x18, 0x45, 0x5a, 0xbb, 0x22, 0x8a, 0x24, 0x9e, 0x24, 0x33, 0xe1, 0xcc, 0x81,
|
||||
0x3f, 0x57, 0x2e, 0x7c, 0x08, 0x2e, 0x7c, 0x2f, 0xbe, 0x03, 0x4f, 0xef, 0x8f, 0xac, 0x17, 0x3b,
|
||||
0xae, 0x93, 0x09, 0xc3, 0x4d, 0xab, 0xdd, 0xb7, 0xfb, 0xdb, 0xdf, 0xee, 0xfb, 0x59, 0x86, 0x5e,
|
||||
0x42, 0xe3, 0x59, 0xe0, 0x23, 0xb5, 0xd9, 0x43, 0x16, 0x93, 0x56, 0x92, 0x87, 0xf9, 0x79, 0x40,
|
||||
0x13, 0xcf, 0xec, 0x24, 0x61, 0x3e, 0x0d, 0x22, 0xe1, 0x30, 0xef, 0x4d, 0xe3, 0x78, 0x1a, 0xe2,
|
||||
0x1e, 0xb7, 0x4e, 0xf3, 0xc9, 0x1e, 0x9e, 0x27, 0xd9, 0x85, 0x74, 0xde, 0xbf, 0xec, 0x4c, 0x33,
|
||||
0x9a, 0x7b, 0x99, 0xf0, 0x5a, 0xff, 0x18, 0xd0, 0x7f, 0x16, 0x47, 0x93, 0x60, 0x9a, 0x53, 0x74,
|
||||
0xf0, 0x87, 0x1c, 0xd3, 0x8c, 0x7c, 0x01, 0xad, 0x99, 0x4b, 0x03, 0xf7, 0x34, 0xc4, 0x74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4b, 0x3c, 0x65, 0x82, 0x27, 0xb0, 0xc9, 0xdb, 0xbb, 0x19, 0x13, 0x8f, 0xa0, 0x51,
|
||||
0xb4, 0x76, 0x13, 0x0e, 0x18, 0x72, 0x21, 0x8a, 0x1a, 0x72, 0x4d, 0x83, 0x35, 0xe4, 0xba, 0x82,
|
||||
0x8a, 0xda, 0x85, 0xba, 0x68, 0xb5, 0x2b, 0x52, 0xa8, 0xd5, 0xae, 0xca, 0x90, 0xa8, 0x2d, 0x2e,
|
||||
0xa0, 0x56, 0x5b, 0x13, 0x08, 0xad, 0xb6, 0x7e, 0x5b, 0x39, 0x6b, 0x4d, 0x71, 0xed, 0xb4, 0x04,
|
||||
0xda, 0x4d, 0x34, 0xb7, 0x17, 0xf6, 0x73, 0x58, 0xfc, 0x79, 0x60, 0xa7, 0x1f, 0xb3, 0xd6, 0xdd,
|
||||
0xc8, 0xc3, 0x90, 0x5c, 0x11, 0xb3, 0xe2, 0xec, 0x67, 0xd0, 0xfd, 0x1c, 0xb3, 0x97, 0xfc, 0x4f,
|
||||
0xca, 0x28, 0x9a, 0xc4, 0x57, 0xa6, 0x78, 0xb7, 0x02, 0x6c, 0x1e, 0x6e, 0x6d, 0x9c, 0x36, 0x79,
|
||||
0xe0, 0xc3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x51, 0x61, 0x5d, 0xad, 0x05, 0x0d, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ func (m *SupportsFeatureRequest) Reset() { *m = SupportsFeatureRequest{}
|
|||
func (m *SupportsFeatureRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SupportsFeatureRequest) ProtoMessage() {}
|
||||
func (*SupportsFeatureRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_resource_12d170a7510bd808, []int{0}
|
||||
return fileDescriptor_resource_968947468bf03677, []int{0}
|
||||
}
|
||||
func (m *SupportsFeatureRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SupportsFeatureRequest.Unmarshal(m, b)
|
||||
|
@ -76,7 +76,7 @@ func (m *SupportsFeatureResponse) Reset() { *m = SupportsFeatureResponse
|
|||
func (m *SupportsFeatureResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SupportsFeatureResponse) ProtoMessage() {}
|
||||
func (*SupportsFeatureResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_resource_12d170a7510bd808, []int{1}
|
||||
return fileDescriptor_resource_968947468bf03677, []int{1}
|
||||
}
|
||||
func (m *SupportsFeatureResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SupportsFeatureResponse.Unmarshal(m, b)
|
||||
|
@ -115,6 +115,7 @@ type ReadResourceRequest struct {
|
|||
Version string `protobuf:"bytes,8,opt,name=version" json:"version,omitempty"`
|
||||
AcceptSecrets bool `protobuf:"varint,9,opt,name=acceptSecrets" json:"acceptSecrets,omitempty"`
|
||||
AdditionalSecretOutputs []string `protobuf:"bytes,10,rep,name=additionalSecretOutputs" json:"additionalSecretOutputs,omitempty"`
|
||||
Aliases []string `protobuf:"bytes,11,rep,name=aliases" json:"aliases,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
|
@ -124,7 +125,7 @@ func (m *ReadResourceRequest) Reset() { *m = ReadResourceRequest{} }
|
|||
func (m *ReadResourceRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ReadResourceRequest) ProtoMessage() {}
|
||||
func (*ReadResourceRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_resource_12d170a7510bd808, []int{2}
|
||||
return fileDescriptor_resource_968947468bf03677, []int{2}
|
||||
}
|
||||
func (m *ReadResourceRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ReadResourceRequest.Unmarshal(m, b)
|
||||
|
@ -214,6 +215,13 @@ func (m *ReadResourceRequest) GetAdditionalSecretOutputs() []string {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *ReadResourceRequest) GetAliases() []string {
|
||||
if m != nil {
|
||||
return m.Aliases
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ReadResourceResponse contains the result of reading a resource's state.
|
||||
type ReadResourceResponse struct {
|
||||
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
|
||||
|
@ -227,7 +235,7 @@ func (m *ReadResourceResponse) Reset() { *m = ReadResourceResponse{} }
|
|||
func (m *ReadResourceResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ReadResourceResponse) ProtoMessage() {}
|
||||
func (*ReadResourceResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_resource_12d170a7510bd808, []int{3}
|
||||
return fileDescriptor_resource_968947468bf03677, []int{3}
|
||||
}
|
||||
func (m *ReadResourceResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ReadResourceResponse.Unmarshal(m, b)
|
||||
|
@ -277,6 +285,7 @@ type RegisterResourceRequest struct {
|
|||
IgnoreChanges []string `protobuf:"bytes,12,rep,name=ignoreChanges" json:"ignoreChanges,omitempty"`
|
||||
AcceptSecrets bool `protobuf:"varint,13,opt,name=acceptSecrets" json:"acceptSecrets,omitempty"`
|
||||
AdditionalSecretOutputs []string `protobuf:"bytes,14,rep,name=additionalSecretOutputs" json:"additionalSecretOutputs,omitempty"`
|
||||
Aliases []string `protobuf:"bytes,15,rep,name=aliases" json:"aliases,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
|
@ -286,7 +295,7 @@ func (m *RegisterResourceRequest) Reset() { *m = RegisterResourceRequest
|
|||
func (m *RegisterResourceRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*RegisterResourceRequest) ProtoMessage() {}
|
||||
func (*RegisterResourceRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_resource_12d170a7510bd808, []int{4}
|
||||
return fileDescriptor_resource_968947468bf03677, []int{4}
|
||||
}
|
||||
func (m *RegisterResourceRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RegisterResourceRequest.Unmarshal(m, b)
|
||||
|
@ -404,6 +413,13 @@ func (m *RegisterResourceRequest) GetAdditionalSecretOutputs() []string {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *RegisterResourceRequest) GetAliases() []string {
|
||||
if m != nil {
|
||||
return m.Aliases
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// PropertyDependencies describes the resources that a particular property depends on.
|
||||
type RegisterResourceRequest_PropertyDependencies struct {
|
||||
Urns []string `protobuf:"bytes,1,rep,name=urns" json:"urns,omitempty"`
|
||||
|
@ -420,7 +436,7 @@ func (m *RegisterResourceRequest_PropertyDependencies) String() string {
|
|||
}
|
||||
func (*RegisterResourceRequest_PropertyDependencies) ProtoMessage() {}
|
||||
func (*RegisterResourceRequest_PropertyDependencies) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_resource_12d170a7510bd808, []int{4, 0}
|
||||
return fileDescriptor_resource_968947468bf03677, []int{4, 0}
|
||||
}
|
||||
func (m *RegisterResourceRequest_PropertyDependencies) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RegisterResourceRequest_PropertyDependencies.Unmarshal(m, b)
|
||||
|
@ -464,7 +480,7 @@ func (m *RegisterResourceResponse) Reset() { *m = RegisterResourceRespon
|
|||
func (m *RegisterResourceResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*RegisterResourceResponse) ProtoMessage() {}
|
||||
func (*RegisterResourceResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_resource_12d170a7510bd808, []int{5}
|
||||
return fileDescriptor_resource_968947468bf03677, []int{5}
|
||||
}
|
||||
func (m *RegisterResourceResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RegisterResourceResponse.Unmarshal(m, b)
|
||||
|
@ -532,7 +548,7 @@ func (m *RegisterResourceOutputsRequest) Reset() { *m = RegisterResource
|
|||
func (m *RegisterResourceOutputsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*RegisterResourceOutputsRequest) ProtoMessage() {}
|
||||
func (*RegisterResourceOutputsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_resource_12d170a7510bd808, []int{6}
|
||||
return fileDescriptor_resource_968947468bf03677, []int{6}
|
||||
}
|
||||
func (m *RegisterResourceOutputsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RegisterResourceOutputsRequest.Unmarshal(m, b)
|
||||
|
@ -782,55 +798,56 @@ var _ResourceMonitor_serviceDesc = grpc.ServiceDesc{
|
|||
Metadata: "resource.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("resource.proto", fileDescriptor_resource_12d170a7510bd808) }
|
||||
func init() { proto.RegisterFile("resource.proto", fileDescriptor_resource_968947468bf03677) }
|
||||
|
||||
var fileDescriptor_resource_12d170a7510bd808 = []byte{
|
||||
// 741 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0xd3, 0x4a,
|
||||
0x14, 0xae, 0x9d, 0xd6, 0x49, 0x4e, 0xdb, 0xb4, 0x9a, 0x56, 0xc9, 0xd4, 0xf7, 0xaa, 0x37, 0xd7,
|
||||
0xf7, 0x2e, 0x02, 0x8b, 0x14, 0xca, 0xa2, 0x05, 0x21, 0x21, 0x01, 0x45, 0x62, 0x51, 0x01, 0xee,
|
||||
0x0e, 0x09, 0x24, 0xc7, 0x3e, 0x4d, 0x4d, 0x13, 0xcf, 0x30, 0x33, 0x8e, 0x94, 0x1d, 0x6f, 0xc2,
|
||||
0xab, 0xf0, 0x18, 0xbc, 0x05, 0xaf, 0x80, 0x3c, 0xb6, 0x43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 0x4d, 0x07, 0xe1, 0xb8, 0xb8, 0xc1, 0x0c, 0xeb, 0x7c, 0x32, 0xcb, 0xdb,
|
||||
0x7c, 0x08, 0x75, 0x96, 0xd1, 0xb5, 0x66, 0xfa, 0xf3, 0xbc, 0xd3, 0x6f, 0x35, 0xd8, 0xcb, 0xfb,
|
||||
0x5f, 0xb2, 0x28, 0x54, 0x4c, 0x90, 0xf7, 0xb0, 0x57, 0x78, 0x07, 0xc8, 0xbf, 0x73, 0x98, 0x57,
|
||||
0xbf, 0x26, 0xb6, 0xb3, 0x2a, 0x25, 0x45, 0xd6, 0xd9, 0x20, 0xcf, 0xc0, 0x7a, 0x1d, 0x4d, 0xd8,
|
||||
0x2d, 0x12, 0x3a, 0x97, 0x9f, 0xba, 0xf2, 0x4e, 0x47, 0x15, 0x91, 0x59, 0x83, 0x77, 0xb0, 0x33,
|
||||
0x7f, 0x1d, 0x92, 0xe3, 0x05, 0x35, 0x94, 0x5e, 0x20, 0xfb, 0x9f, 0xa5, 0xf1, 0x59, 0xcb, 0x0f,
|
||||
0xb0, 0x5f, 0x84, 0x9a, 0x38, 0xeb, 0x45, 0x66, 0xff, 0xb7, 0x32, 0x67, 0xd6, 0xfe, 0x63, 0xf9,
|
||||
0x72, 0xcd, 0x98, 0x24, 0xf7, 0x56, 0x74, 0x58, 0x64, 0xdb, 0x6e, 0x97, 0xa8, 0xbc, 0x48, 0x7e,
|
||||
0x09, 0x9c, 0x8d, 0x81, 0xa5, 0x3d, 0x8f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x86, 0x35,
|
||||
0xc8, 0x4f, 0x08, 0x00, 0x00,
|
||||
var fileDescriptor_resource_968947468bf03677 = []byte{
|
||||
// 756 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x6e, 0xd3, 0x48,
|
||||
0x14, 0x6e, 0x92, 0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, 0x3a, 0xec, 0xba, 0xe8, 0x05, 0x6e, 0x76, 0xa2, 0x25, 0x9f, 0x20, 0x04, 0xd6, 0xe5,
|
||||
0x94, 0xa1, 0x55, 0x37, 0x11, 0x63, 0xeb, 0x58, 0xec, 0x8d, 0xd1, 0x6a, 0xa4, 0x31, 0x6d, 0x93,
|
||||
0x7d, 0x68, 0x32, 0x8f, 0x63, 0x2c, 0xad, 0x75, 0x13, 0xcd, 0x3c, 0x72, 0x06, 0xa0, 0x4e, 0xc5,
|
||||
0x90, 0xcb, 0x10, 0x85, 0xb5, 0xa1, 0x72, 0xdd, 0xd3, 0xfe, 0x20, 0xc5, 0x63, 0x90, 0xe3, 0x31,
|
||||
0xb8, 0x32, 0x78, 0xb8, 0x73, 0xa5, 0xc4, 0x81, 0xcd, 0x00, 0x19, 0xc6, 0x01, 0xc6, 0xbe, 0x5e,
|
||||
0xda, 0x3c, 0x6a, 0xa8, 0xb6, 0x85, 0x18, 0xb1, 0xa1, 0x9d, 0x63, 0x67, 0xb5, 0xcc, 0x67, 0x67,
|
||||
0x3e, 0xb1, 0xa0, 0x35, 0x41, 0x2e, 0x42, 0x1a, 0x5b, 0x6d, 0x93, 0xca, 0x5d, 0xf2, 0x37, 0x6c,
|
||||
0x79, 0xbe, 0x8f, 0x4c, 0x5e, 0xa1, 0xcf, 0x51, 0x0a, 0xab, 0x63, 0xd0, 0x29, 0x06, 0xc9, 0x39,
|
||||
0xf4, 0xbd, 0x20, 0x08, 0xa5, 0x5a, 0xe1, 0x45, 0x69, 0xf0, 0x55, 0x22, 0x59, 0xa2, 0xea, 0xc1,
|
||||
0x6c, 0x65, 0x59, 0x5a, 0x7f, 0xd9, 0x8b, 0x42, 0x4f, 0xa8, 0x4d, 0x77, 0x4d, 0x65, 0xee, 0x3a,
|
||||
0x1e, 0xec, 0x15, 0x31, 0xcf, 0xc8, 0xda, 0x81, 0x46, 0xc2, 0xe3, 0x0c, 0x75, 0x6d, 0x2e, 0xc0,
|
||||
0x56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xbe, 0x7c, 0xed,
|
||||
0xe6, 0xf3, 0xf4, 0xcf, 0x1d, 0x1d, 0x8a, 0x6c, 0xdb, 0xfb, 0x25, 0x2a, 0x2f, 0xf4, 0xdf, 0x08,
|
||||
0x67, 0x6d, 0xd8, 0x34, 0x91, 0x07, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7d, 0xff, 0x47, 0xb3,
|
||||
0x83, 0x08, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ message ReadResourceRequest {
|
|||
string version = 8; // the version of the provider to use when servicing this request.
|
||||
bool acceptSecrets = 9; // when true operations should return secrets as strongly typed.
|
||||
repeated string additionalSecretOutputs = 10; // a list of output properties that should also be treated as secret, in addition to ones we detect.
|
||||
repeated string aliases = 11; // a list of additional URNs that shoud be considered the same.
|
||||
}
|
||||
|
||||
// ReadResourceResponse contains the result of reading a resource's state.
|
||||
|
@ -86,6 +87,7 @@ message RegisterResourceRequest {
|
|||
repeated string ignoreChanges = 12; // a list of property selectors to ignore during updates.
|
||||
bool acceptSecrets = 13; // when true operations should return secrets as strongly typed.
|
||||
repeated string additionalSecretOutputs = 14; // a list of output properties that should also be treated as secret, in addition to ones we detect.
|
||||
repeated string aliases = 15; // a list of additional URNs that shoud be considered the same.
|
||||
}
|
||||
|
||||
// RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the
|
||||
|
|
|
@ -22,7 +22,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
|
|||
package='pulumirpc',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\x0eresource.proto\x12\tpulumirpc\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x0eprovider.proto\"$\n\x16SupportsFeatureRequest\x12\n\n\x02id\x18\x01 \x01(\t\"-\n\x17SupportsFeatureResponse\x12\x12\n\nhasSupport\x18\x01 \x01(\x08\"\xeb\x01\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\"P\n\x14ReadResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xac\x04\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\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\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\"}\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\"W\n\x1eRegisterResourceOutputsRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12(\n\x07outputs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct2\xc0\x03\n\x0fResourceMonitor\x12Z\n\x0fSupportsFeature\x12!.pulumirpc.SupportsFeatureRequest\x1a\".pulumirpc.SupportsFeatureResponse\"\x00\x12?\n\x06Invoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\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\x62\x06proto3')
|
||||
serialized_pb=_b('\n\x0eresource.proto\x12\tpulumirpc\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x0eprovider.proto\"$\n\x16SupportsFeatureRequest\x12\n\n\x02id\x18\x01 \x01(\t\"-\n\x17SupportsFeatureResponse\x12\x12\n\nhasSupport\x18\x01 \x01(\x08\"\xfc\x01\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\x0f\n\x07\x61liases\x18\x0b \x03(\t\"P\n\x14ReadResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xbd\x04\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\x0f\n\x07\x61liases\x18\x0f \x03(\t\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\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\"}\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\"W\n\x1eRegisterResourceOutputsRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12(\n\x07outputs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct2\xc0\x03\n\x0fResourceMonitor\x12Z\n\x0fSupportsFeature\x12!.pulumirpc.SupportsFeatureRequest\x1a\".pulumirpc.SupportsFeatureResponse\"\x00\x12?\n\x06Invoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\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\x62\x06proto3')
|
||||
,
|
||||
dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,provider__pb2.DESCRIPTOR,])
|
||||
|
||||
|
@ -168,6 +168,13 @@ _READRESOURCEREQUEST = _descriptor.Descriptor(
|
|||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='aliases', full_name='pulumirpc.ReadResourceRequest.aliases', index=10,
|
||||
number=11, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
|
@ -181,7 +188,7 @@ _READRESOURCEREQUEST = _descriptor.Descriptor(
|
|||
oneofs=[
|
||||
],
|
||||
serialized_start=190,
|
||||
serialized_end=425,
|
||||
serialized_end=442,
|
||||
)
|
||||
|
||||
|
||||
|
@ -218,8 +225,8 @@ _READRESOURCERESPONSE = _descriptor.Descriptor(
|
|||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=427,
|
||||
serialized_end=507,
|
||||
serialized_start=444,
|
||||
serialized_end=524,
|
||||
)
|
||||
|
||||
|
||||
|
@ -249,8 +256,8 @@ _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES = _descriptor.Descriptor(
|
|||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=912,
|
||||
serialized_end=948,
|
||||
serialized_start=946,
|
||||
serialized_end=982,
|
||||
)
|
||||
|
||||
_REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY = _descriptor.Descriptor(
|
||||
|
@ -286,8 +293,8 @@ _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY = _descriptor.Descriptor(
|
|||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=950,
|
||||
serialized_end=1066,
|
||||
serialized_start=984,
|
||||
serialized_end=1100,
|
||||
)
|
||||
|
||||
_REGISTERRESOURCEREQUEST = _descriptor.Descriptor(
|
||||
|
@ -395,6 +402,13 @@ _REGISTERRESOURCEREQUEST = _descriptor.Descriptor(
|
|||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='aliases', full_name='pulumirpc.RegisterResourceRequest.aliases', index=14,
|
||||
number=15, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
|
@ -407,8 +421,8 @@ _REGISTERRESOURCEREQUEST = _descriptor.Descriptor(
|
|||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=510,
|
||||
serialized_end=1066,
|
||||
serialized_start=527,
|
||||
serialized_end=1100,
|
||||
)
|
||||
|
||||
|
||||
|
@ -466,8 +480,8 @@ _REGISTERRESOURCERESPONSE = _descriptor.Descriptor(
|
|||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=1068,
|
||||
serialized_end=1193,
|
||||
serialized_start=1102,
|
||||
serialized_end=1227,
|
||||
)
|
||||
|
||||
|
||||
|
@ -504,8 +518,8 @@ _REGISTERRESOURCEOUTPUTSREQUEST = _descriptor.Descriptor(
|
|||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=1195,
|
||||
serialized_end=1282,
|
||||
serialized_start=1229,
|
||||
serialized_end=1316,
|
||||
)
|
||||
|
||||
_READRESOURCEREQUEST.fields_by_name['properties'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
|
||||
|
@ -600,8 +614,8 @@ _RESOURCEMONITOR = _descriptor.ServiceDescriptor(
|
|||
file=DESCRIPTOR,
|
||||
index=0,
|
||||
serialized_options=None,
|
||||
serialized_start=1285,
|
||||
serialized_end=1733,
|
||||
serialized_start=1319,
|
||||
serialized_end=1767,
|
||||
methods=[
|
||||
_descriptor.MethodDescriptor(
|
||||
name='SupportsFeature',
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
name: aliases_adopt_into_component
|
||||
description: A program that replaces a resource with a new name and alias.
|
||||
runtime: nodejs
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #2 - adopt a resource into a component
|
||||
class Component extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Component", name, {}, opts);
|
||||
}
|
||||
}
|
||||
const res2 = new Resource("res2");
|
||||
const comp2 = new Component("comp2");
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "aliases",
|
||||
"license": "Apache-2.0",
|
||||
"main": "bin/index.js",
|
||||
"typings": "bin/index.d.ts",
|
||||
"devDependencies": {
|
||||
"typescript": "^2.5.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@pulumi/pulumi": "latest"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #2 - adopt a resource into a component. The component author is the same as the component user, and changes
|
||||
// the component to be able to adopt the resource that was previously defined separately...
|
||||
class Component extends pulumi.ComponentResource {
|
||||
resource: Resource;
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Component", name, {}, opts);
|
||||
// The resource creation was moved from top level to inside the component.
|
||||
this.resource = new Resource(`${name}-child`, {
|
||||
// With a new parent
|
||||
parent: this,
|
||||
// But with an alias provided based on knowing where the resource existing before - in this case at top
|
||||
// level. We use an absolute URN instead of a relative `Alias` because we are referencing a fixed resource
|
||||
// that was in some arbitrary other location in the hierarchy prior to being adopted into this component.
|
||||
aliases: [pulumi.createUrn("res2", "my:module:Resource")],
|
||||
});
|
||||
}
|
||||
}
|
||||
// The creation of the component is unchanged.
|
||||
const comp2 = new Component("comp2");
|
36
tests/integration/aliases/aliases_test.go
Normal file
36
tests/integration/aliases/aliases_test.go
Normal file
|
@ -0,0 +1,36 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
package ints
|
||||
|
||||
import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/pulumi/pulumi/pkg/testing/integration"
|
||||
)
|
||||
|
||||
// TestAliases tests a case where a resource's name changes but it provides an `alias` pointing to the old URN to ensure
|
||||
// the resource is preserved across the update.
|
||||
func TestAliases(t *testing.T) {
|
||||
dirs := []string{
|
||||
"rename", "adopt_into_component", "rename_component",
|
||||
"rename_component_and_child", "retype_component",
|
||||
}
|
||||
for _, dir := range dirs {
|
||||
d := dir
|
||||
t.Run(d, func(t *testing.T) {
|
||||
integration.ProgramTest(t, &integration.ProgramTestOptions{
|
||||
Dir: path.Join(d, "step1"),
|
||||
Dependencies: []string{"@pulumi/pulumi"},
|
||||
Quick: true,
|
||||
EditDirs: []integration.EditDir{
|
||||
{
|
||||
Dir: path.Join(d, "step2"),
|
||||
Additive: true,
|
||||
ExpectNoChanges: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
3
tests/integration/aliases/rename/step1/Pulumi.yaml
Normal file
3
tests/integration/aliases/rename/step1/Pulumi.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
name: aliases_rename
|
||||
description: A program that replaces a resource with a new name and alias.
|
||||
runtime: nodejs
|
12
tests/integration/aliases/rename/step1/index.ts
Normal file
12
tests/integration/aliases/rename/step1/index.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #1 - rename a resource
|
||||
const res1 = new Resource("res1");
|
12
tests/integration/aliases/rename/step1/package.json
Normal file
12
tests/integration/aliases/rename/step1/package.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "aliases",
|
||||
"license": "Apache-2.0",
|
||||
"main": "bin/index.js",
|
||||
"typings": "bin/index.d.ts",
|
||||
"devDependencies": {
|
||||
"typescript": "^2.5.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@pulumi/pulumi": "latest"
|
||||
}
|
||||
}
|
15
tests/integration/aliases/rename/step2/index.ts
Normal file
15
tests/integration/aliases/rename/step2/index.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #1 - rename a resource
|
||||
// This resource was previously named `res1`, we'll alias to the old name.
|
||||
const res1 = new Resource("newres1", {
|
||||
aliases: [{ name: "res1" }],
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
name: aliases_rename_component
|
||||
description: A program that replaces a resource with a new name and alias.
|
||||
runtime: nodejs
|
23
tests/integration/aliases/rename_component/step1/index.ts
Normal file
23
tests/integration/aliases/rename_component/step1/index.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #3 - rename a component (and all it's children)
|
||||
class ComponentThree extends pulumi.ComponentResource {
|
||||
resource1: Resource;
|
||||
resource2: Resource;
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:ComponentThree", name, {}, opts);
|
||||
// Note that both un-prefixed and parent-name-prefixed child names are supported. For the later, the implicit
|
||||
// alias inherited from the parent alias will include replacing the name prefix to match the parent alias name.
|
||||
this.resource1 = new Resource(`${name}-child`, {parent: this});
|
||||
this.resource2 = new Resource("otherchild", {parent: this});
|
||||
}
|
||||
}
|
||||
const comp3 = new ComponentThree("comp3");
|
262
tests/integration/aliases/rename_component/step1/out.txt
Normal file
262
tests/integration/aliases/rename_component/step1/out.txt
Normal file
|
@ -0,0 +1,262 @@
|
|||
I0530 21:53:20.098712 86006 backend.go:698] Stack asdsa being updated to version 3
|
||||
I0530 21:53:20.224958 86006 plugins.go:75] gatherPluginsFromProgram(): gathering plugins from language host
|
||||
I0530 21:53:20.225215 86006 plugins.go:372] GetPluginPath(language, nodejs, <nil>): found on $PATH /usr/local/bin/pulumi-language-nodejs
|
||||
I0530 21:53:20.225264 86006 plugin.go:72] Launching plugin 'nodejs' from '/usr/local/bin/pulumi-language-nodejs' with args: 127.0.0.1:53888
|
||||
I0530 21:53:20.345373 86006 langruntime_plugin.go:169] langhost[nodejs].GetPluginInfo() executing
|
||||
I0530 21:53:20.346666 86006 langruntime_plugin.go:83] langhost[nodejs].GetRequiredPlugins(proj=aliases_rename_component,pwd=/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1,program=.) executing
|
||||
I0530 21:53:20.666724 86006 langruntime_plugin.go:124] langhost[nodejs].GetRequiredPlugins(proj=aliases_rename_component,pwd=/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1,program=.) success: #versions=0
|
||||
I0530 21:53:20.666757 86006 plugins.go:82] gatherPluginsFromProgram(): plugin nodejs <nil> is required by language host
|
||||
I0530 21:53:20.666790 86006 plugins.go:93] gatherPluginsFromSnapshot(): gathering plugins from snapshot
|
||||
I0530 21:53:20.666800 86006 plugins.go:102] gatherPluginsFromSnapshot(): skipping "urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa", not a provider
|
||||
I0530 21:53:20.666814 86006 plugins.go:102] gatherPluginsFromSnapshot(): skipping "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3", not a provider
|
||||
I0530 21:53:20.666823 86006 plugins.go:102] gatherPluginsFromSnapshot(): skipping "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::comp3-child", not a provider
|
||||
I0530 21:53:20.666829 86006 plugins.go:102] gatherPluginsFromSnapshot(): skipping "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild", not a provider
|
||||
I0530 21:53:20.666839 86006 plugins.go:129] ensurePluginsAreInstalled(): beginning
|
||||
I0530 21:53:20.666888 86006 plugins.go:372] GetPluginPath(language, nodejs, <nil>): found on $PATH /usr/local/bin/pulumi-language-nodejs
|
||||
I0530 21:53:20.666898 86006 plugins.go:134] ensurePluginsAreInstalled(): plugin nodejs <nil> already installed
|
||||
I0530 21:53:20.666904 86006 plugins.go:149] ensurePluginsAreInstalled(): completed
|
||||
I0530 21:53:20.666916 86006 plugins.go:214] computeDefaultProviderPlugins(): language host reported empty set of provider plugins, using all plugins
|
||||
I0530 21:53:20.666925 86006 plugins.go:233] computeDefaultProviderPlugins(): considering nodejs
|
||||
I0530 21:53:20.666932 86006 plugins.go:236] computeDefaultProviderPlugins(): skipping nodejs, not a resource provider
|
||||
I0530 21:53:20.666938 86006 plugins.go:268] computeDefaultProviderPlugins(): summary of default plugins:
|
||||
I0530 21:53:20.666968 86006 registry.go:99] provider(urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa):
|
||||
I0530 21:53:20.666976 86006 registry.go:99] provider(urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3):
|
||||
I0530 21:53:20.666983 86006 registry.go:99] provider(urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::comp3-child):
|
||||
I0530 21:53:20.666988 86006 registry.go:99] provider(urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild):
|
||||
I0530 21:53:20.667164 86006 step_generator.go:497] stepGenerator.GeneratePendingDeletes(): scanning previous snapshot for pending deletes
|
||||
I0530 21:53:20.667234 86006 langruntime_plugin.go:135] langhost[nodejs].Run(pwd=/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1,program=.,#args=0,proj=aliases_rename_component,stack=asdsa,#config=0,dryrun=true) executing
|
||||
I0530 21:53:20.667236 86006 plan_executor.go:251] planExecutor.retirePendingDeletes(...): no pending deletions
|
||||
I0530 21:53:20.667325 86006 plan_executor.go:138] planExecutor.Execute(...): waiting for incoming events
|
||||
I0530 21:53:20.667397 86006 step_executor.go:321] StepExecutor worker(-2): worker coming online
|
||||
I0530 21:53:20.667412 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:21.205273 86006 eventsink.go:60] Registering resource: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa, custom=false
|
||||
I0530 21:53:21.205321 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Registering resource: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa, custom=false<{%reset%}>)
|
||||
I0530 21:53:21.210159 86006 eventsink.go:60] RegisterResource RPC prepared: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa
|
||||
I0530 21:53:21.210285 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC prepared: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa<{%reset%}>)
|
||||
I0530 21:53:21.210402 86006 source_eval.go:753] ResourceMonitor.RegisterResource received: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa, custom=false, #props=0, parent=, protect=false, provider=, deps=[], deleteBeforeReplace=false, ignoreChanges=[]
|
||||
I0530 21:53:21.210430 86006 source_eval.go:145] EvalSourceIterator produced a registration: t=pulumi:pulumi:Stack,name=aliases_rename_component-asdsa,#props=0
|
||||
I0530 21:53:21.210462 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:21.210488 86006 plan_executor.go:224] planExecutor.handleSingleEvent(...): received RegisterResourceEvent
|
||||
I0530 21:53:21.210545 86006 step_generator.go:422] Planner decided not to update 'urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa' (same) (inputs=map[])
|
||||
I0530 21:53:21.210565 86006 step_executor.go:321] StepExecutor worker(-2): worker received chain for execution
|
||||
I0530 21:53:21.210575 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:21.210589 86006 step_executor.go:321] StepExecutor worker(0): launching oneshot worker
|
||||
I0530 21:53:21.210654 86006 step_executor.go:321] StepExecutor worker(0): applying step same on urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa (preview true)
|
||||
I0530 21:53:21.210673 86006 step_executor.go:321] StepExecutor worker(0): step same on urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa retired
|
||||
I0530 21:53:21.210722 86006 source_eval.go:787] ResourceMonitor.RegisterResource operation finished: t=pulumi:pulumi:Stack, urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa, stable=true, #stables=0 #outs=0
|
||||
I0530 21:53:21.214334 86006 eventsink.go:60] RegisterResource RPC finished: resource:aliases_rename_component-asdsa[pulumi:pulumi:Stack]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa,,,true,
|
||||
I0530 21:53:21.214407 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC finished: resource:aliases_rename_component-asdsa[pulumi:pulumi:Stack]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa,,,true,<{%reset%}>)
|
||||
I0530 21:53:21.250925 86006 source_eval.go:831] ResourceMonitor.RegisterResourceOutputs received: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa, #outs=0
|
||||
I0530 21:53:21.250969 86006 source_eval.go:150] EvalSourceIterator produced a completion: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa,#outs=0
|
||||
I0530 21:53:21.250984 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:21.250994 86006 plan_executor.go:230] planExecutor.handleSingleEvent(...): received register resource outputs
|
||||
I0530 21:53:21.251004 86006 step_executor.go:321] StepExecutor worker(-1): registered resource outputs urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa: old=#0, new=#0
|
||||
I0530 21:53:21.251052 86006 source_eval.go:855] ResourceMonitor.RegisterResourceOutputs operation finished: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa, #outs=0
|
||||
I0530 21:53:21.251152 86006 eventsink.go:60] Running program '/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1' in pwd '/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1' w/ args:
|
||||
I0530 21:53:21.251205 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Running program '/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1' in pwd '/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1' w/ args: <{%reset%}>)
|
||||
I0530 21:53:21.252364 86006 source_eval.go:753] ResourceMonitor.RegisterResource received: t=my:module:ComponentThree, name=newcomp3, custom=false, #props=0, parent=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa, protect=false, provider=, deps=[], deleteBeforeReplace=false, ignoreChanges=[]
|
||||
I0530 21:53:21.252395 86006 source_eval.go:145] EvalSourceIterator produced a registration: t=my:module:ComponentThree,name=newcomp3,#props=0
|
||||
I0530 21:53:21.252407 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:21.252414 86006 plan_executor.go:224] planExecutor.handleSingleEvent(...): received RegisterResourceEvent
|
||||
I0530 21:53:21.252433 86006 step_generator.go:422] Planner decided not to update 'urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3' (same) (inputs=map[])
|
||||
I0530 21:53:21.252445 86006 step_executor.go:321] StepExecutor worker(-2): worker received chain for execution
|
||||
I0530 21:53:21.252453 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:21.252466 86006 step_executor.go:321] StepExecutor worker(1): launching oneshot worker
|
||||
I0530 21:53:21.252482 86006 step_executor.go:321] StepExecutor worker(1): applying step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3 (preview true)
|
||||
I0530 21:53:21.252508 86006 step_executor.go:321] StepExecutor worker(1): step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3 retired
|
||||
I0530 21:53:21.252521 86006 source_eval.go:787] ResourceMonitor.RegisterResource operation finished: t=my:module:ComponentThree, urn=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3, stable=true, #stables=0 #outs=0
|
||||
I0530 21:53:21.252900 86006 eventsink.go:60] Registering resource: t=my:module:ComponentThree, name=newcomp3, custom=false
|
||||
I0530 21:53:21.252952 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Registering resource: t=my:module:ComponentThree, name=newcomp3, custom=false<{%reset%}>)
|
||||
I0530 21:53:21.255680 86006 source_eval.go:753] ResourceMonitor.RegisterResource received: t=my:module:Resource, name=newcomp3-child, custom=false, #props=0, parent=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3, protect=false, provider=, deps=[], deleteBeforeReplace=false, ignoreChanges=[]
|
||||
I0530 21:53:21.255682 86006 source_eval.go:753] ResourceMonitor.RegisterResource received: t=my:module:Resource, name=otherchild, custom=false, #props=0, parent=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3, protect=false, provider=, deps=[], deleteBeforeReplace=false, ignoreChanges=[]
|
||||
I0530 21:53:21.255743 86006 source_eval.go:145] EvalSourceIterator produced a registration: t=my:module:Resource,name=newcomp3-child,#props=0
|
||||
I0530 21:53:21.255790 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:21.255790 86006 source_eval.go:145] EvalSourceIterator produced a registration: t=my:module:Resource,name=otherchild,#props=0
|
||||
I0530 21:53:21.255806 86006 plan_executor.go:224] planExecutor.handleSingleEvent(...): received RegisterResourceEvent
|
||||
I0530 21:53:21.255915 86006 step_generator.go:422] Planner decided not to update 'urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child' (same) (inputs=map[])
|
||||
I0530 21:53:21.255938 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:21.255949 86006 plan_executor.go:224] planExecutor.handleSingleEvent(...): received RegisterResourceEvent
|
||||
I0530 21:53:21.255969 86006 step_generator.go:422] Planner decided not to update 'urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild' (same) (inputs=map[])
|
||||
I0530 21:53:21.255949 86006 step_executor.go:321] StepExecutor worker(-2): worker received chain for execution
|
||||
I0530 21:53:21.255996 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:21.256011 86006 step_executor.go:321] StepExecutor worker(-2): worker received chain for execution
|
||||
I0530 21:53:21.256015 86006 step_executor.go:321] StepExecutor worker(2): launching oneshot worker
|
||||
I0530 21:53:21.256026 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:21.256036 86006 step_executor.go:321] StepExecutor worker(3): launching oneshot worker
|
||||
I0530 21:53:21.256063 86006 step_executor.go:321] StepExecutor worker(2): applying step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child (preview true)
|
||||
I0530 21:53:21.256138 86006 eventsink.go:60] Registering resource: t=my:module:Resource, name=newcomp3-child, custom=false
|
||||
I0530 21:53:21.256164 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Registering resource: t=my:module:Resource, name=newcomp3-child, custom=false<{%reset%}>)
|
||||
I0530 21:53:21.256114 86006 step_executor.go:321] StepExecutor worker(3): applying step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild (preview true)
|
||||
I0530 21:53:21.256154 86006 step_executor.go:321] StepExecutor worker(2): step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child retired
|
||||
I0530 21:53:21.256258 86006 source_eval.go:787] ResourceMonitor.RegisterResource operation finished: t=my:module:Resource, urn=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child, stable=true, #stables=0 #outs=0
|
||||
I0530 21:53:21.256631 86006 step_executor.go:321] StepExecutor worker(3): step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild retired
|
||||
I0530 21:53:21.256676 86006 source_eval.go:787] ResourceMonitor.RegisterResource operation finished: t=my:module:Resource, urn=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild, stable=true, #stables=0 #outs=0
|
||||
I0530 21:53:21.257628 86006 eventsink.go:60] Registering resource: t=my:module:Resource, name=otherchild, custom=false
|
||||
I0530 21:53:21.257652 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Registering resource: t=my:module:Resource, name=otherchild, custom=false<{%reset%}>)
|
||||
I0530 21:53:21.258329 86006 eventsink.go:60] RegisterResourceOutputs RPC prepared: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa
|
||||
I0530 21:53:21.258387 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResourceOutputs RPC prepared: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa<{%reset%}>)
|
||||
I0530 21:53:21.258875 86006 eventsink.go:60] RegisterResource RPC prepared: t=my:module:ComponentThree, name=newcomp3
|
||||
I0530 21:53:21.258897 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC prepared: t=my:module:ComponentThree, name=newcomp3<{%reset%}>)
|
||||
I0530 21:53:21.259489 86006 eventsink.go:60] RegisterResourceOutputs RPC finished: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa; err: null, resp:
|
||||
I0530 21:53:21.259577 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResourceOutputs RPC finished: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa; err: null, resp: <{%reset%}>)
|
||||
I0530 21:53:21.260163 86006 eventsink.go:60] RegisterResource RPC finished: resource:newcomp3[my:module:ComponentThree]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3,,,true,
|
||||
I0530 21:53:21.260232 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC finished: resource:newcomp3[my:module:ComponentThree]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3,,,true,<{%reset%}>)
|
||||
I0530 21:53:21.260839 86006 eventsink.go:60] RegisterResource RPC prepared: t=my:module:Resource, name=newcomp3-child
|
||||
I0530 21:53:21.260860 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC prepared: t=my:module:Resource, name=newcomp3-child<{%reset%}>)
|
||||
I0530 21:53:21.261402 86006 eventsink.go:60] RegisterResource RPC prepared: t=my:module:Resource, name=otherchild
|
||||
I0530 21:53:21.261432 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC prepared: t=my:module:Resource, name=otherchild<{%reset%}>)
|
||||
I0530 21:53:21.261981 86006 eventsink.go:60] RegisterResource RPC finished: resource:newcomp3-child[my:module:Resource]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child,,,true,
|
||||
I0530 21:53:21.262029 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC finished: resource:newcomp3-child[my:module:Resource]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child,,,true,<{%reset%}>)
|
||||
I0530 21:53:21.262553 86006 eventsink.go:60] RegisterResource RPC finished: resource:otherchild[my:module:Resource]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild,,,true,
|
||||
I0530 21:53:21.262578 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC finished: resource:otherchild[my:module:Resource]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild,,,true,<{%reset%}>)
|
||||
I0530 21:53:21.270199 86006 langruntime_plugin.go:162] langhost[nodejs].RunPlan(pwd=/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1,program=.,...,dryrun=true) success: progerr=
|
||||
I0530 21:53:21.271625 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? true, <nil>)
|
||||
I0530 21:53:21.271654 86006 step_generator.go:551] Planner trusts dependency graph, scheduling deletions in parallel
|
||||
I0530 21:53:21.271675 86006 step_executor.go:321] StepExecutor worker(-1): StepExecutor.waitForCompletion(): waiting for worker threads to exit
|
||||
I0530 21:53:21.271686 86006 step_executor.go:321] StepExecutor worker(-2): worker received nil chain, exiting
|
||||
I0530 21:53:21.271709 86006 step_executor.go:321] StepExecutor worker(-1): StepExecutor.waitForCompletion(): worker threads all exited
|
||||
I0530 21:53:21.271722 86006 plan_executor.go:195] planExecutor.Execute(...): step executor has completed
|
||||
I0530 21:53:21.271752 86006 plan_executor.go:72] planExecutor.Execute(...): exiting provider canceller
|
||||
I0530 21:53:21.271764 86006 ignore.go:44] Explicitly ignoring and discarding error: rpc error: code = Canceled desc = grpc: the client connection is closing
|
||||
I0530 21:53:21.271830 86006 log.go:56] Error closing 'nodejs' language plugin during shutdown; ignoring: 1 error occurred:
|
||||
* operation not permitted
|
||||
|
||||
I0530 21:53:24.020745 86006 backend.go:698] Stack asdsa being updated to version 3
|
||||
I0530 21:53:24.119040 86006 plugins.go:75] gatherPluginsFromProgram(): gathering plugins from language host
|
||||
I0530 21:53:24.119203 86006 plugins.go:372] GetPluginPath(language, nodejs, <nil>): found on $PATH /usr/local/bin/pulumi-language-nodejs
|
||||
I0530 21:53:24.119227 86006 plugin.go:72] Launching plugin 'nodejs' from '/usr/local/bin/pulumi-language-nodejs' with args: 127.0.0.1:53896
|
||||
I0530 21:53:24.202892 86006 langruntime_plugin.go:169] langhost[nodejs].GetPluginInfo() executing
|
||||
I0530 21:53:24.203378 86006 langruntime_plugin.go:83] langhost[nodejs].GetRequiredPlugins(proj=aliases_rename_component,pwd=/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1,program=.) executing
|
||||
I0530 21:53:24.276467 86006 langruntime_plugin.go:124] langhost[nodejs].GetRequiredPlugins(proj=aliases_rename_component,pwd=/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1,program=.) success: #versions=0
|
||||
I0530 21:53:24.276547 86006 plugins.go:82] gatherPluginsFromProgram(): plugin nodejs <nil> is required by language host
|
||||
I0530 21:53:24.276586 86006 plugins.go:93] gatherPluginsFromSnapshot(): gathering plugins from snapshot
|
||||
I0530 21:53:24.276611 86006 plugins.go:102] gatherPluginsFromSnapshot(): skipping "urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa", not a provider
|
||||
I0530 21:53:24.276624 86006 plugins.go:102] gatherPluginsFromSnapshot(): skipping "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3", not a provider
|
||||
I0530 21:53:24.276630 86006 plugins.go:102] gatherPluginsFromSnapshot(): skipping "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::comp3-child", not a provider
|
||||
I0530 21:53:24.276637 86006 plugins.go:102] gatherPluginsFromSnapshot(): skipping "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild", not a provider
|
||||
I0530 21:53:24.276644 86006 plugins.go:129] ensurePluginsAreInstalled(): beginning
|
||||
I0530 21:53:24.276720 86006 plugins.go:372] GetPluginPath(language, nodejs, <nil>): found on $PATH /usr/local/bin/pulumi-language-nodejs
|
||||
I0530 21:53:24.276731 86006 plugins.go:134] ensurePluginsAreInstalled(): plugin nodejs <nil> already installed
|
||||
I0530 21:53:24.276737 86006 plugins.go:149] ensurePluginsAreInstalled(): completed
|
||||
I0530 21:53:24.276745 86006 plugins.go:214] computeDefaultProviderPlugins(): language host reported empty set of provider plugins, using all plugins
|
||||
I0530 21:53:24.276751 86006 plugins.go:233] computeDefaultProviderPlugins(): considering nodejs
|
||||
I0530 21:53:24.276757 86006 plugins.go:236] computeDefaultProviderPlugins(): skipping nodejs, not a resource provider
|
||||
I0530 21:53:24.276762 86006 plugins.go:268] computeDefaultProviderPlugins(): summary of default plugins:
|
||||
I0530 21:53:24.276783 86006 registry.go:99] provider(urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa):
|
||||
I0530 21:53:24.276789 86006 registry.go:99] provider(urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3):
|
||||
I0530 21:53:24.276799 86006 registry.go:99] provider(urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::comp3-child):
|
||||
I0530 21:53:24.276805 86006 registry.go:99] provider(urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild):
|
||||
I0530 21:53:24.276968 86006 step_generator.go:497] stepGenerator.GeneratePendingDeletes(): scanning previous snapshot for pending deletes
|
||||
I0530 21:53:24.276992 86006 plan_executor.go:251] planExecutor.retirePendingDeletes(...): no pending deletions
|
||||
I0530 21:53:24.277006 86006 langruntime_plugin.go:135] langhost[nodejs].Run(pwd=/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1,program=.,#args=0,proj=aliases_rename_component,stack=asdsa,#config=0,dryrun=false) executing
|
||||
I0530 21:53:24.277015 86006 plan_executor.go:138] planExecutor.Execute(...): waiting for incoming events
|
||||
I0530 21:53:24.277038 86006 step_executor.go:321] StepExecutor worker(-2): worker coming online
|
||||
I0530 21:53:24.277111 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:24.647594 86006 eventsink.go:60] Registering resource: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa, custom=false
|
||||
I0530 21:53:24.647646 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Registering resource: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa, custom=false<{%reset%}>)
|
||||
I0530 21:53:24.652598 86006 eventsink.go:60] RegisterResource RPC prepared: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa
|
||||
I0530 21:53:24.652624 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC prepared: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa<{%reset%}>)
|
||||
I0530 21:53:24.652727 86006 source_eval.go:753] ResourceMonitor.RegisterResource received: t=pulumi:pulumi:Stack, name=aliases_rename_component-asdsa, custom=false, #props=0, parent=, protect=false, provider=, deps=[], deleteBeforeReplace=false, ignoreChanges=[]
|
||||
I0530 21:53:24.652764 86006 source_eval.go:145] EvalSourceIterator produced a registration: t=pulumi:pulumi:Stack,name=aliases_rename_component-asdsa,#props=0
|
||||
I0530 21:53:24.652784 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:24.652793 86006 plan_executor.go:224] planExecutor.handleSingleEvent(...): received RegisterResourceEvent
|
||||
I0530 21:53:24.652821 86006 step_generator.go:422] Planner decided not to update 'urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa' (same) (inputs=map[])
|
||||
I0530 21:53:24.652834 86006 step_executor.go:321] StepExecutor worker(-2): worker received chain for execution
|
||||
I0530 21:53:24.652843 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:24.652859 86006 step_executor.go:321] StepExecutor worker(0): launching oneshot worker
|
||||
I0530 21:53:24.652899 86006 snapshot.go:129] SnapshotManager: Beginning mutation for step `same` on resource `urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa`
|
||||
I0530 21:53:24.652910 86006 step_executor.go:321] StepExecutor worker(0): applying step same on urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa (preview false)
|
||||
I0530 21:53:24.652927 86006 snapshot.go:227] SnapshotManager: sameSnapshotMutation.End(..., true)
|
||||
I0530 21:53:24.652951 86006 snapshot.go:430] Marked old state snapshot as done: urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa
|
||||
I0530 21:53:24.652961 86006 snapshot.go:439] Appended new state snapshot to be written: urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa
|
||||
I0530 21:53:24.723405 86006 step_executor.go:321] StepExecutor worker(0): step same on urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa retired
|
||||
I0530 21:53:24.723496 86006 source_eval.go:787] ResourceMonitor.RegisterResource operation finished: t=pulumi:pulumi:Stack, urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa, stable=true, #stables=0 #outs=0
|
||||
I0530 21:53:24.727432 86006 eventsink.go:60] RegisterResource RPC finished: resource:aliases_rename_component-asdsa[pulumi:pulumi:Stack]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa,,,true,
|
||||
I0530 21:53:24.727499 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC finished: resource:aliases_rename_component-asdsa[pulumi:pulumi:Stack]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa,,,true,<{%reset%}>)
|
||||
I0530 21:53:24.766560 86006 source_eval.go:831] ResourceMonitor.RegisterResourceOutputs received: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa, #outs=0
|
||||
I0530 21:53:24.766606 86006 source_eval.go:150] EvalSourceIterator produced a completion: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa,#outs=0
|
||||
I0530 21:53:24.766645 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:24.766655 86006 plan_executor.go:230] planExecutor.handleSingleEvent(...): received register resource outputs
|
||||
I0530 21:53:24.766674 86006 step_executor.go:321] StepExecutor worker(-1): registered resource outputs urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa: old=#0, new=#0
|
||||
I0530 21:53:24.766837 86006 eventsink.go:60] Running program '/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1' in pwd '/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1' w/ args:
|
||||
I0530 21:53:24.766871 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Running program '/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1' in pwd '/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1' w/ args: <{%reset%}>)
|
||||
I0530 21:53:24.768260 86006 source_eval.go:753] ResourceMonitor.RegisterResource received: t=my:module:ComponentThree, name=newcomp3, custom=false, #props=0, parent=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa, protect=false, provider=, deps=[], deleteBeforeReplace=false, ignoreChanges=[]
|
||||
I0530 21:53:24.768299 86006 source_eval.go:145] EvalSourceIterator produced a registration: t=my:module:ComponentThree,name=newcomp3,#props=0
|
||||
I0530 21:53:24.768409 86006 eventsink.go:60] Registering resource: t=my:module:ComponentThree, name=newcomp3, custom=false
|
||||
I0530 21:53:24.768455 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Registering resource: t=my:module:ComponentThree, name=newcomp3, custom=false<{%reset%}>)
|
||||
I0530 21:53:24.768944 86006 eventsink.go:60] Registering resource: t=my:module:Resource, name=newcomp3-child, custom=false
|
||||
I0530 21:53:24.768987 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Registering resource: t=my:module:Resource, name=newcomp3-child, custom=false<{%reset%}>)
|
||||
I0530 21:53:24.769414 86006 eventsink.go:60] Registering resource: t=my:module:Resource, name=otherchild, custom=false
|
||||
I0530 21:53:24.769436 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>Registering resource: t=my:module:Resource, name=otherchild, custom=false<{%reset%}>)
|
||||
I0530 21:53:24.769870 86006 eventsink.go:60] RegisterResourceOutputs RPC prepared: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa
|
||||
I0530 21:53:24.769895 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResourceOutputs RPC prepared: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa<{%reset%}>)
|
||||
I0530 21:53:24.770314 86006 eventsink.go:60] RegisterResource RPC prepared: t=my:module:ComponentThree, name=newcomp3
|
||||
I0530 21:53:24.770334 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC prepared: t=my:module:ComponentThree, name=newcomp3<{%reset%}>)
|
||||
I0530 21:53:24.876070 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:24.876100 86006 source_eval.go:855] ResourceMonitor.RegisterResourceOutputs operation finished: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa, #outs=0
|
||||
I0530 21:53:24.876176 86006 plan_executor.go:224] planExecutor.handleSingleEvent(...): received RegisterResourceEvent
|
||||
I0530 21:53:24.876338 86006 step_generator.go:422] Planner decided not to update 'urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3' (same) (inputs=map[])
|
||||
I0530 21:53:24.876401 86006 step_executor.go:321] StepExecutor worker(-2): worker received chain for execution
|
||||
I0530 21:53:24.876439 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:24.876535 86006 step_executor.go:321] StepExecutor worker(1): launching oneshot worker
|
||||
I0530 21:53:24.876648 86006 snapshot.go:129] SnapshotManager: Beginning mutation for step `same` on resource `urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3`
|
||||
I0530 21:53:24.876700 86006 step_executor.go:321] StepExecutor worker(1): applying step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3 (preview false)
|
||||
I0530 21:53:24.876737 86006 snapshot.go:227] SnapshotManager: sameSnapshotMutation.End(..., true)
|
||||
I0530 21:53:24.876776 86006 snapshot.go:430] Marked old state snapshot as done: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3
|
||||
I0530 21:53:24.876795 86006 snapshot.go:439] Appended new state snapshot to be written: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3
|
||||
I0530 21:53:24.877897 86006 eventsink.go:60] RegisterResourceOutputs RPC finished: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa; err: null, resp:
|
||||
I0530 21:53:24.877942 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResourceOutputs RPC finished: urn=urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa; err: null, resp: <{%reset%}>)
|
||||
I0530 21:53:24.934134 86006 step_executor.go:321] StepExecutor worker(1): step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3 retired
|
||||
I0530 21:53:24.934228 86006 source_eval.go:787] ResourceMonitor.RegisterResource operation finished: t=my:module:ComponentThree, urn=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3, stable=true, #stables=0 #outs=0
|
||||
I0530 21:53:24.938327 86006 eventsink.go:60] RegisterResource RPC finished: resource:newcomp3[my:module:ComponentThree]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3,,,true,
|
||||
I0530 21:53:24.938371 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC finished: resource:newcomp3[my:module:ComponentThree]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3,,,true,<{%reset%}>)
|
||||
I0530 21:53:24.938376 86006 source_eval.go:753] ResourceMonitor.RegisterResource received: t=my:module:Resource, name=newcomp3-child, custom=false, #props=0, parent=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3, protect=false, provider=, deps=[], deleteBeforeReplace=false, ignoreChanges=[]
|
||||
I0530 21:53:24.938434 86006 source_eval.go:145] EvalSourceIterator produced a registration: t=my:module:Resource,name=newcomp3-child,#props=0
|
||||
I0530 21:53:24.938471 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:24.938395 86006 source_eval.go:753] ResourceMonitor.RegisterResource received: t=my:module:Resource, name=otherchild, custom=false, #props=0, parent=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3, protect=false, provider=, deps=[], deleteBeforeReplace=false, ignoreChanges=[]
|
||||
I0530 21:53:24.938486 86006 plan_executor.go:224] planExecutor.handleSingleEvent(...): received RegisterResourceEvent
|
||||
I0530 21:53:24.938524 86006 source_eval.go:145] EvalSourceIterator produced a registration: t=my:module:Resource,name=otherchild,#props=0
|
||||
I0530 21:53:24.938557 86006 step_generator.go:422] Planner decided not to update 'urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child' (same) (inputs=map[])
|
||||
I0530 21:53:24.938580 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? false, <nil>)
|
||||
I0530 21:53:24.938592 86006 plan_executor.go:224] planExecutor.handleSingleEvent(...): received RegisterResourceEvent
|
||||
I0530 21:53:24.938610 86006 step_generator.go:422] Planner decided not to update 'urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild' (same) (inputs=map[])
|
||||
I0530 21:53:24.938624 86006 step_executor.go:321] StepExecutor worker(-2): worker received chain for execution
|
||||
I0530 21:53:24.938669 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:24.938680 86006 step_executor.go:321] StepExecutor worker(-2): worker received chain for execution
|
||||
I0530 21:53:24.938694 86006 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
|
||||
I0530 21:53:24.938695 86006 step_executor.go:321] StepExecutor worker(2): launching oneshot worker
|
||||
I0530 21:53:24.938716 86006 step_executor.go:321] StepExecutor worker(3): launching oneshot worker
|
||||
I0530 21:53:24.938774 86006 snapshot.go:129] SnapshotManager: Beginning mutation for step `same` on resource `urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild`
|
||||
I0530 21:53:24.938804 86006 step_executor.go:321] StepExecutor worker(3): applying step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild (preview false)
|
||||
I0530 21:53:24.938831 86006 snapshot.go:227] SnapshotManager: sameSnapshotMutation.End(..., true)
|
||||
I0530 21:53:24.938740 86006 snapshot.go:129] SnapshotManager: Beginning mutation for step `same` on resource `urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child`
|
||||
I0530 21:53:24.938868 86006 snapshot.go:430] Marked old state snapshot as done: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild
|
||||
I0530 21:53:24.938882 86006 step_executor.go:321] StepExecutor worker(2): applying step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child (preview false)
|
||||
I0530 21:53:24.938885 86006 snapshot.go:439] Appended new state snapshot to be written: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild
|
||||
I0530 21:53:24.938904 86006 snapshot.go:227] SnapshotManager: sameSnapshotMutation.End(..., true)
|
||||
I0530 21:53:24.939073 86006 eventsink.go:60] RegisterResource RPC prepared: t=my:module:Resource, name=newcomp3-child
|
||||
I0530 21:53:24.939106 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC prepared: t=my:module:Resource, name=newcomp3-child<{%reset%}>)
|
||||
I0530 21:53:24.940414 86006 eventsink.go:60] RegisterResource RPC prepared: t=my:module:Resource, name=otherchild
|
||||
I0530 21:53:24.940647 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC prepared: t=my:module:Resource, name=otherchild<{%reset%}>)
|
||||
I0530 21:53:25.006260 86006 snapshot.go:430] Marked old state snapshot as done: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::comp3-child
|
||||
I0530 21:53:25.006345 86006 step_executor.go:321] StepExecutor worker(3): step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild retired
|
||||
I0530 21:53:25.006433 86006 source_eval.go:787] ResourceMonitor.RegisterResource operation finished: t=my:module:Resource, urn=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild, stable=true, #stables=0 #outs=0
|
||||
I0530 21:53:25.006349 86006 snapshot.go:439] Appended new state snapshot to be written: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child
|
||||
I0530 21:53:25.008024 86006 eventsink.go:60] RegisterResource RPC finished: resource:otherchild[my:module:Resource]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild,,,true,
|
||||
I0530 21:53:25.008068 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC finished: resource:otherchild[my:module:Resource]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild,,,true,<{%reset%}>)
|
||||
I0530 21:53:25.104215 86006 step_executor.go:321] StepExecutor worker(2): step same on urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child retired
|
||||
I0530 21:53:25.104358 86006 source_eval.go:787] ResourceMonitor.RegisterResource operation finished: t=my:module:Resource, urn=urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child, stable=true, #stables=0 #outs=0
|
||||
I0530 21:53:25.105927 86006 eventsink.go:60] RegisterResource RPC finished: resource:newcomp3-child[my:module:Resource]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child,,,true,
|
||||
I0530 21:53:25.105972 86006 eventsink.go:63] eventSink::Debug(<{%reset%}>RegisterResource RPC finished: resource:newcomp3-child[my:module:Resource]; err: null, resp: urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child,,,true,<{%reset%}>)
|
||||
I0530 21:53:25.114573 86006 langruntime_plugin.go:162] langhost[nodejs].RunPlan(pwd=/Users/luke/go/src/github.com/pulumi/pulumi/tests/integration/aliases/rename_component/step1,program=.,...,dryrun=false) success: progerr=
|
||||
I0530 21:53:25.115993 86006 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? true, <nil>)
|
||||
I0530 21:53:25.116031 86006 step_generator.go:551] Planner trusts dependency graph, scheduling deletions in parallel
|
||||
I0530 21:53:25.116049 86006 step_executor.go:321] StepExecutor worker(-1): StepExecutor.waitForCompletion(): waiting for worker threads to exit
|
||||
I0530 21:53:25.116072 86006 step_executor.go:321] StepExecutor worker(-2): worker received nil chain, exiting
|
||||
I0530 21:53:25.116100 86006 step_executor.go:321] StepExecutor worker(-1): StepExecutor.waitForCompletion(): worker threads all exited
|
||||
I0530 21:53:25.116111 86006 plan_executor.go:195] planExecutor.Execute(...): step executor has completed
|
||||
I0530 21:53:25.116145 86006 plan_executor.go:72] planExecutor.Execute(...): exiting provider canceller
|
||||
I0530 21:53:25.116156 86006 ignore.go:44] Explicitly ignoring and discarding error: rpc error: code = Canceled desc = grpc: the client connection is closing
|
||||
I0530 21:53:25.116230 86006 log.go:56] Error closing 'nodejs' language plugin during shutdown; ignoring: 1 error occurred:
|
||||
* operation not permitted
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "aliases",
|
||||
"license": "Apache-2.0",
|
||||
"main": "bin/index.js",
|
||||
"typings": "bin/index.d.ts",
|
||||
"devDependencies": {
|
||||
"typescript": "^2.5.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@pulumi/pulumi": "latest"
|
||||
}
|
||||
}
|
47
tests/integration/aliases/rename_component/step1/stack.json
Normal file
47
tests/integration/aliases/rename_component/step1/stack.json
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"version": 3,
|
||||
"deployment": {
|
||||
"manifest": {
|
||||
"time": "2019-05-30T15:54:35.812817-07:00",
|
||||
"magic": "a30fca03706c39813da48bc53fcff973e24eb2deed9b31e72dcc69adc238cfe3",
|
||||
"version": "v0.17.14-dev.1559249133+g96714654.dirty"
|
||||
},
|
||||
"secrets_providers": {
|
||||
"type": "service",
|
||||
"state": {
|
||||
"url": "https://api.pulumi.com",
|
||||
"owner": "lukehoban",
|
||||
"project": "aliases_rename_component",
|
||||
"stack": "foo"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"urn": "urn:pulumi:foo::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-foo",
|
||||
"custom": false,
|
||||
"type": "pulumi:pulumi:Stack"
|
||||
},
|
||||
{
|
||||
"urn": "urn:pulumi:foo::aliases_rename_component::my:module:ComponentThree::newcomp3",
|
||||
"custom": false,
|
||||
"type": "my:module:ComponentThree",
|
||||
"parent": "urn:pulumi:foo::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-foo",
|
||||
"aliases": [
|
||||
"urn:pulumi:foo::aliases_rename_component::my:module:ComponentThree::comp3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"urn": "urn:pulumi:foo::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild",
|
||||
"custom": false,
|
||||
"type": "my:module:Resource",
|
||||
"parent": "urn:pulumi:foo::aliases_rename_component::my:module:ComponentThree::comp3"
|
||||
},
|
||||
{
|
||||
"urn": "urn:pulumi:foo::aliases_rename_component::my:module:ComponentThree$my:module:Resource::comp3-child",
|
||||
"custom": false,
|
||||
"type": "my:module:Resource",
|
||||
"parent": "urn:pulumi:foo::aliases_rename_component::my:module:ComponentThree::comp3"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
53
tests/integration/aliases/rename_component/step1/stack2.json
Normal file
53
tests/integration/aliases/rename_component/step1/stack2.json
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"version": 3,
|
||||
"deployment": {
|
||||
"manifest": {
|
||||
"time": "2019-05-30T21:53:25.006537-07:00",
|
||||
"magic": "e3fda2507d27c54305e184a60e1e88464cb1a3261d30512895fcb0e72ef8b3e0",
|
||||
"version": "v0.17.14-dev.1559253032+g042f9045.dirty"
|
||||
},
|
||||
"secrets_providers": {
|
||||
"type": "service",
|
||||
"state": {
|
||||
"url": "https://api.pulumi.com",
|
||||
"owner": "lukehoban",
|
||||
"project": "aliases_rename_component",
|
||||
"stack": "asdsa"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"urn": "urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa",
|
||||
"custom": false,
|
||||
"type": "pulumi:pulumi:Stack"
|
||||
},
|
||||
{
|
||||
"urn": "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3",
|
||||
"custom": false,
|
||||
"type": "my:module:ComponentThree",
|
||||
"parent": "urn:pulumi:asdsa::aliases_rename_component::pulumi:pulumi:Stack::aliases_rename_component-asdsa",
|
||||
"aliases": [
|
||||
"urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::comp3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"urn": "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild",
|
||||
"custom": false,
|
||||
"type": "my:module:Resource",
|
||||
"parent": "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3",
|
||||
"aliases": [
|
||||
"urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::otherchild"
|
||||
]
|
||||
},
|
||||
{
|
||||
"urn": "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::newcomp3-child",
|
||||
"custom": false,
|
||||
"type": "my:module:Resource",
|
||||
"parent": "urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree::newcomp3",
|
||||
"aliases": [
|
||||
"urn:pulumi:asdsa::aliases_rename_component::my:module:ComponentThree$my:module:Resource::comp3-child"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
27
tests/integration/aliases/rename_component/step2/index.ts
Normal file
27
tests/integration/aliases/rename_component/step2/index.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #3 - rename a component (and all it's children)
|
||||
// No change to the component...
|
||||
class ComponentThree extends pulumi.ComponentResource {
|
||||
resource1: Resource;
|
||||
resource2: Resource;
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:ComponentThree", name, {}, opts);
|
||||
// Note that both un-prefixed and parent-name-prefixed child names are supported. For the later, the implicit
|
||||
// alias inherited from the parent alias will include replacing the name prefix to match the parent alias name.
|
||||
this.resource1 = new Resource(`${name}-child`, { parent: this });
|
||||
this.resource2 = new Resource("otherchild", { parent: this });
|
||||
}
|
||||
}
|
||||
// ...but applying an alias to the instance succesfully renames both the component and the children.
|
||||
const comp3 = new ComponentThree("newcomp3", {
|
||||
aliases: [{ name: "comp3" }],
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
name: aliases_rename_component_and_child
|
||||
description: A program that replaces a resource with a new name and alias.
|
||||
runtime: nodejs
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #5 - composing #1 and #3 and making both changes at the same time
|
||||
class ComponentFive extends pulumi.ComponentResource {
|
||||
resource: Resource;
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:ComponentFive", name, {}, opts);
|
||||
this.resource = new Resource("otherchild", {parent: this});
|
||||
}
|
||||
}
|
||||
const comp5 = new ComponentFive("comp5");
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "aliases",
|
||||
"license": "Apache-2.0",
|
||||
"main": "bin/index.js",
|
||||
"typings": "bin/index.d.ts",
|
||||
"devDependencies": {
|
||||
"typescript": "^2.5.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@pulumi/pulumi": "latest"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #5 - composing #1 and #3
|
||||
class ComponentFive extends pulumi.ComponentResource {
|
||||
resource: Resource;
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:ComponentFive", name, {}, opts);
|
||||
this.resource = new Resource("otherchildrenamed", {
|
||||
parent: this,
|
||||
aliases: [{ name: "otherchild", parent: this }],
|
||||
});
|
||||
}
|
||||
}
|
||||
const comp5 = new ComponentFive("newcomp5", {
|
||||
aliases: [{ name: "comp5" }],
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
name: aliases_retype_component
|
||||
description: A program that replaces a resource with a new name and alias.
|
||||
runtime: nodejs
|
19
tests/integration/aliases/retype_component/step1/index.ts
Normal file
19
tests/integration/aliases/retype_component/step1/index.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #4 - change the type of a component
|
||||
class ComponentFour extends pulumi.ComponentResource {
|
||||
resource: Resource;
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:ComponentFour", name, {}, opts);
|
||||
this.resource = new Resource("otherchild", {parent: this});
|
||||
}
|
||||
}
|
||||
const comp4 = new ComponentFour("comp4");
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "aliases",
|
||||
"license": "Apache-2.0",
|
||||
"main": "bin/index.js",
|
||||
"typings": "bin/index.d.ts",
|
||||
"devDependencies": {
|
||||
"typescript": "^2.5.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@pulumi/pulumi": "latest"
|
||||
}
|
||||
}
|
27
tests/integration/aliases/retype_component/step2/index.ts
Normal file
27
tests/integration/aliases/retype_component/step2/index.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
|
||||
const stackName = pulumi.getStack();
|
||||
const projectName = pulumi.getProject();
|
||||
|
||||
class Resource extends pulumi.ComponentResource {
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
super("my:module:Resource", name, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario #4 - change the type of a component
|
||||
class ComponentFour extends pulumi.ComponentResource {
|
||||
resource: Resource;
|
||||
constructor(name: string, opts?: pulumi.ComponentResourceOptions) {
|
||||
// Add an alias that references the old type of this resource...
|
||||
const aliases = [{ type: "my:module:ComponentFour" }, ...((opts && opts.aliases) || [])];
|
||||
// ..and then make the super call with the new type of this resource and the added alias.
|
||||
super("my:differentmodule:ComponentFourWithADifferentTypeName", name, {}, { ...opts, aliases });
|
||||
// The child resource will also pick up an implicit alias due to the new type of the component it is parented
|
||||
// to.
|
||||
this.resource = new Resource("otherchild", { parent: this });
|
||||
}
|
||||
}
|
||||
const comp4 = new ComponentFour("comp4");
|
Loading…
Reference in a new issue