i'm trying to follow this: <https://www.pulumi.com...
# general
b
i'm trying to follow this: https://www.pulumi.com/docs/reference/programming-model/#dynamic-provider-examples but i can't see how i would expose further properties? I want to generate two related numbers at create time, and then be able to access them in future. how is that done please? the other examples here aren't really helping: https://github.com/pulumi/pulumi/blob/master/examples/dynamic-provider/simple/index.ts
t
b
oh that's far more complete thanks
still struggling to see how to populate the properties for future runs
how / when is e.g. the property on line 269 populated with the value from the state
t
b
i mean on future runs though
t
They will be saved in state
b
e.g. if i add another resource later that depends on that property
yes but when is it populated back from state
t
that should be taken care by pulumi
b
can i spam a super simple example i'm not getting anywhere i think i must be missing something fundamental
t
sure, put it on github or gist
so in my state file I can see the token was created properly and all the outputs are popualted
t
ah, I suspect you need to do one more thing: initialize those props in constructor, see https://github.com/pulumi/examples/blob/master/azure-ts-static-website/staticWebsite.ts#L72
b
ahhhh thanks a lot
yep working now 👌
t
I'm actually not sure why this is required. Might be worth filing an issue
w
I am actually just about to do some updates to these docs today - and will see about making this point clearer.
b
I've upgraded pulumi today - from .16 to .21 and then to .26 and then to .27
and on the .16 to .21 my partnerToken from that gist was reset and regenerated, and it was reset to undefined.undefined from .26 to .27
is this a bug in pulumi or is there a flaw in my dynamic resource?
w
I'm not sure I follow exactly what you saw happen. Was this resource replaced or updated in any of the deployments? If so, what diffs were shown?
Could you open an issue with any details?
b
what i saw in the diffs was that the serialized "_provider" changed
and essentially its acted as if i recreated the resource but i didnt
well, from .16 to .21 it did
but from .26 to .27 it's not recreated it and it's just blanked out the outputs
sorry the .16 to .21 was a mistake on my part - it seems we destroyed the entire stack, but the .26 to .27 is still an issue