Dynamic Provider question: where does the dynamic ...
# typescript
m
Dynamic Provider question: where does the dynamic Resource object get populated from the state store? If my Input has
{name: string}
and Output has
{name: string, code: string}
... when I try to later use
object.code
(so: the "extra" data element on the Output not present in the Input) it is undefined, event though the value exists in the state store (running
pulumi stack export > stack.txt
shows the object with a populated
code
field under outputs). I would also be looking for code examples of dynamic providers, specifically where the Output has more data elements than the Input. (All of the examples provided by Pulumi themselves have the Input === Output.)
l
Hi Andrew. I might be wrong but you might be falling foul of a bit of Pulumi footgun here, where some SDK classes need you to "predeclare" outputs "as inputs" so that class instances are able to rehydrate correctly.
m
Ah... I was planning to try that next but got distracted. Thanks.
l
I think this is related (unfortunately it's an issue with all resources, not just dynamic)