Regression: pulumi:pulumi:getResource
no longer returning resource references
#11380
Labels
area/component-packages
aka multi-language components
area/engine
Pulumi engine
area/sdks
Pulumi language SDKs
impact/regression
Something that used to work, but is now broken
kind/bug
Some behavior is incorrect or out of spec
resolution/fixed
This issue was fixed
Milestone
The
pulumi:pulumi:getResource
builtin is used to get a resource's state, primarily when deserializing a resource reference.If the resource's state itself contains resource references, we used to always keep those resource references when marshaling the state, but unfortunately this regressed in #9323 back in April: https://github.com/pulumi/pulumi/pull/9323/files#diff-984b3279d61b588030474831898bb76d093d863ca2d0015bb081d842602a9ab7R671
Current implementation:
pulumi/pkg/resource/deploy/source_eval.go
Lines 713 to 718 in 6f21c0d
The problem is that none of the language SDKs are setting
acceptResources
when invokingpulumi:pulumi:getResource
, so the returned state no longer contains resource references, but just the ids/urns of the resources (the fallback behavior).This mostly impacts multi-lang components that have resources in their state that should be "rehydrated" back into associated resource instances when the component itself is rehydrated. This is impacting our EKS component.
We can fix the language SDKs to set
acceptResources
on the request (and then have EKS depend on the new version of the SDK), but I think we should consider reverting back to the old behavior of always accepting resources, regardless ofacceptResources
, or perhaps always accepting resources only forpulumi:pulumi:getResource
.The text was updated successfully, but these errors were encountered: