From 1b3443ede13e474caa2740ae61d1abd204798b7a Mon Sep 17 00:00:00 2001 From: Levi Harrison Date: Thu, 10 Feb 2022 18:31:18 -0500 Subject: [PATCH] Azure: Fix panic when IP Address isn't set (#10280) --- discovery/azure/azure.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discovery/azure/azure.go b/discovery/azure/azure.go index 3e7cd4e122..4a70416bba 100644 --- a/discovery/azure/azure.go +++ b/discovery/azure/azure.go @@ -361,7 +361,7 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) { if *networkInterface.Primary { for _, ip := range *networkInterface.IPConfigurations { - if ip.PublicIPAddress != nil && ip.PublicIPAddress.PublicIPAddressPropertiesFormat != nil { + if ip.PublicIPAddress != nil && ip.PublicIPAddress.IPAddress != nil { labels[azureLabelMachinePublicIP] = model.LabelValue(*ip.PublicIPAddress.IPAddress) } if ip.PrivateIPAddress != nil {