question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Network] Public IP addresses should be easier to retrieve for LB and NIC resources

See original GitHub issue

Is there any way to use the az network lb command group to retrieve the public IP address associated with a load balancer instance? Neither az network lb show nor az network lb frontend-ip list seem to actually provide this data. The only way I can figure out how to find this is via az network public-ip commands, which makes sense, but seems kind of non-ideal, since I may have auto-created the public IP as part of creating the load balancer, and therefore, am logically managing the LB, not a separate public IP resource.

Oddly enough, if you look at the JSON output of either the network lb show or network lb frontend-ip list commands, there seems to be a property for the public IP address, but it doesn’t seem to ever be populated in my experience (is that a bug?). So in my tests, neither of the following queries ever return anything:

az network lb show -g foo -n foo --query "frontendIpConfigurations[].publicIpAddress.ipAddress"

az network lb frontend-ip list -g foo --lb-name foo --query "[].publicIpAddress.ipAddress"

And therefore, I have to retrieve the name of the public IP associated with the LB, and then run the following instead:

az network public-ip show -g foo -n PublicIPfoo --query "ipAddress"

Am I doing something wrong in the first example? Or is it expected that you’d need to use az network public-ip commands to get the IP address?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
tjprescottcommented, Nov 30, 2018

Reopening this with the help wanted tag in case the community would like to take this up. If it doesn’t progress after a time, we will close.

2reactions
lostintangentcommented, Jan 9, 2017

Would it be worth considering an az network lb list-ip-addresses command that functioned similar to the az vm list-ip-addresses command? The scenario of retrieving an LB’s public IP seems common enough to potentially justify it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Backend Pool Management - Azure Load Balancer
In this article. Configure backend pool by IP address and virtual network; Next steps. The backend pool is a critical component of the...
Read more >
Deploying Ops Manager on Azure | VMware Tanzu Docs
This topic describes how to deploy BOSH and Ops Manager on Azure by using individual commands to create resources. Pivotal recommends this ...
Read more >
Get current IP addresses associated with an Azure ARM VM's ...
I use this code to get all my ARM VMs, their private IP address and allocation method, it works across resource groups. $vms...
Read more >
Reserve a static external IP address - Google Cloud
You can reserve static external IP addresses for your virtual machine (VM) ... A regional IPv4 address that can be used by VMs...
Read more >
Public IP Addresses - Oracle Help Center
A public IP address is an IPv4 address that is reachable from the internet. If a resource in your tenancy needs to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found