This message was deleted.
# general
s
This message was deleted.
t
b
Thanks, I'll try
It didn't work. I'm using python and tried
pulumi.export("ip", compute.network_interfaces[0]['accessConfigs'][0]['natIp'])
. If the instance was already created (in a previous run) the code works just fine
Ok, now it worked
the correct code is
Copy code
pulumi.export("compute_ext_ip", compute.network_interfaces.apply(lambda a: a[0].get('accessConfigs')[0].get('natIp')))
pulumi.export("compute_int_ip", compute.network_interfaces.apply(lambda a: a[0].get('networkIp')))