https://pulumi.com logo
#azure
Title
# azure
h

hundreds-gpu-71155

03/12/2024, 11:43 PM
how do I get the IP address(es) of a
pulumi_azure_native.compute.VirtualMachine
? I was thinking I had to pass
VirtualMachine.network_profile.network_interfaces
to
...network.get_network_interface_output()
, but azure doesn't seem to like that
t

tall-librarian-49374

03/13/2024, 7:54 AM
h

hundreds-gpu-71155

03/13/2024, 3:22 PM
ah, i had missed
get_public_ip_output()
, thanks!
oh, no, excuse me, I don't need the the IP for a
PublicIP
(it seems to work just fine to feed that into DNS stuff). I need the private IP of a
VirtualMachine
on a
VirtualNetwork
to give to load balancers
https://www.pulumi.com/ai/answers/51UmBbD1HsUNcZkrwbuMMP/azure-vm-ip-mapping-with-private-dns suggests using an explicit
NetworkInterface
instead of an implicit one, and using
NetworkInterface.ipConfigurations[0].privateIPAddress
.
I might see about passing
VirtualMachine.network_profile.network_interfaces
to
get_network_interface()
good news: that works bad news: Properly unwrapping the apparently nested Outputs is proving to be a challenge
i did it, but I think this is a demonic incantation https://pulumi-community.slack.com/archives/CDE799L1M/p1710348840225889