Skip to content

Commit

Permalink
node: fix local IP detection on Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmouchet committed Aug 10, 2021
1 parent cf793ad commit 00f4de7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func getIPv4(platform string) (net.IP, net.IP) {
case platforms.Azure:
// The NIC public IP is not available through Azure metadata...
// https://docs.microsoft.com/en-us/answers/questions/7932/public-ip-not-available-via-metadata.html
localIP := net.ParseIP(platforms.AzureGetMetadata("network/interfaces/0/ipv4/ipAddress/0/privateIpAddress"))
localIP := net.ParseIP(platforms.AzureGetMetadata("network/interface/0/ipv4/ipAddress/0/privateIpAddress"))
publicIP := network.PublicIPv4()
return localIP, publicIP
case platforms.EC2:
Expand Down

0 comments on commit 00f4de7

Please sign in to comment.