Azure / Azure/azure-cli

Using `--resource-group` listing public addresses gives empty sets

Open
#14,482 4 comments 0 reactions 1 assignee Assigned to @allegradomel View on GitHub
act-quality-productivity-squad customer-reported Network - Load Balancer Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug

Using `--resource-group` listing public addresses gives empty sets

**Command Name**
`az network public-ip list`

**Errors:**
Produces an empty list when explicitly requesting a resource group. It apparently only happens during a few minutes just after creating the resource, although I've not made extensive research on this.

## To Reproduce:

JME_FILTER="[?(tags.owner=='kubernetes' && tags.type=='aks-slb-managed-outbound-ip')]"
az network public-ip list --query "${JME_FILTER}.[name,ipAddress,resourceGroup,ipConfiguration.resourceGroup]" -o json
```
[
[
"***",
"0.0.0.0",
"MC_devops8-rg_devops8-k8s_westeurope",
"MC_devops8-rg_devops8-k8s_westeurope"
],
...
]
```
az network public-ip list --resource-group MC_devops8-rg_devops8-k8s_westeurope --query "${JME_FILTER}.[name,ipAddress,resourceGroup,ipConfiguration.resourceGroup]" -o json
```
[]
```

## Expected Behavior

Return the element belonging to the requested resource group

## Environment Summary
```
Linux-5.4.0-42-generic-x86_64-with-glibc2.29
Python 3.8.2
Shell: bash

azure-cli 2.0.81 *

Extensions:
azure-devops 0.17.0

```
## Additional Context
As stated in the description, I've only seen this after creating the resource (AKS cluster in this case). The context is a script wich spins up a complete infrastructure, and this particular item arises when trying to setup firewal rulles from k8s cluster to database.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.