This message was deleted.
# python
s
This message was deleted.
w
When you say
initiate the stack
and then
when some instance is finally created
are you referring to the preview part of a
pulumi up
as that first bit and the actual deployment as the second bit? If so, pulumi preview is not able to show actual values for resource properties since it doesn’t know them yet. Once you let it deploy then it’s able to show the properties. Regardless, if you use outputs from one resource as inputs to another resource, Pulumi will manage the dependencies.
b
Well, the problem is that the preview throws the error that ‘networkIp’ key is not found.
w
Oh, sorry I see what you’re saying now. Have you tried using
.apply()
to essentially tell Pulumi the answer is coming later: https://www.pulumi.com/docs/intro/concepts/programming-model/#outputs
b
Yeah, I did. I tried something I do very often in my projects: Output.all(dbs_instance_pulumi_objects).apply(lambda x: x[0].network_interfaces[0][“networkIp”]), but it doesn’t work in this case, that’s why I brought up this topic. Sorry that I do not have a proper formatting, I am on my phone now.
For someone who has encountered the same issue:
Copy code
backend_instance_pulumi_objects[item].network_interfaces.apply(
                lambda x: x[0].get('networkIp')
            ),
The Code snippet above worked for me in the end
For someone who has encountered the same issue:
Copy code
backend_instance_pulumi_objects[item].network_interfaces.apply(
                lambda x: x[0].get('networkIp')
            ),
The Code snippet above worked for me in the end