Found by the pulumi v3.256.0 conformance suite's provider-alias-component test (added in pulumi/pulumi testing/pulumi-test-language/tests/provider_alias_component.go): re-parenting a component while giving it an aliases option should preserve the component and everything inside it (the second run expects exactly one create — the new parent). With an HCL-served component, the component's child resources are deleted and recreated instead.
Cause
constructResourceMonitor.RegisterResource (pkg/server/provider.go) forwards the component's own aliases onto the component registration, but child registrations carry no aliases at all. When the component's URN changes (re-parenting), every child's URN changes with it (the parent chain is part of the URN), and with no alias pointing at the old URN the engine sees brand-new resources. SDK-side components handle this by deriving each child's aliases from its parent's aliases; the construct monitor has no equivalent.
Observed: run 2 of the conformance test produces 3 creates (parent + recreated component + recreated child) where 1 is expected, with matching deletes for the old component and child.
The test is parked in expectedFailures in cmd/pulumi-language-hcl/language_test.go until this is fixed.
Found by the pulumi v3.256.0 conformance suite's
provider-alias-componenttest (added in pulumi/pulumitesting/pulumi-test-language/tests/provider_alias_component.go): re-parenting a component while giving it analiasesoption should preserve the component and everything inside it (the second run expects exactly one create — the new parent). With an HCL-served component, the component's child resources are deleted and recreated instead.Cause
constructResourceMonitor.RegisterResource(pkg/server/provider.go) forwards the component's own aliases onto the component registration, but child registrations carry no aliases at all. When the component's URN changes (re-parenting), every child's URN changes with it (the parent chain is part of the URN), and with no alias pointing at the old URN the engine sees brand-new resources. SDK-side components handle this by deriving each child's aliases from its parent's aliases; the construct monitor has no equivalent.Observed: run 2 of the conformance test produces 3 creates (parent + recreated component + recreated child) where 1 is expected, with matching deletes for the old component and child.
The test is parked in
expectedFailuresincmd/pulumi-language-hcl/language_test.gountil this is fixed.