Azure / Azure/azure-cli

keyvault network-rule remove expects --ip-address to contain the CIDR mask

Offen
#18,167 3 Kommentare 6 Reaktionen 1 zugewiesene Person Beansprucht von @evelyn-ys Auf GitHub ansehen
act-identity-squad KeyVault Service Attention
Vorherrschende Sprache
Python
Sterne
4.6k
Forks
3.5k
Ø Merge
3 T. 18 Std.
Gemergte PRs (30 T.)
62

Beschreibung

**Describe the bug**
When you remove a network access rule from an AKV using Azure CLI using the `--ip-address` option you must include the CIDR mask on the IP address for the change to actually take effect. If you omit the CIDR mask from the IP address, the command succeeds but the line item is not actually removed from the AKV's network access configuration.

example of command that doesnt work:
`az keyvault network-rule remove --name myVerySecureKeyvault --ip-address 20.37.206.1`
The command will complete successfully. If you then inspect the network access configuration on the key vault you will see the IP address is still present in the config.

example of command that does work:
`az keyvault network-rule remove --name myVerySecureKeyvault --ip-address 20.37.206.1/32`
The command will complete successfully. If you then inspect the network access configuration on the key vault you will see the IP address is no longer present in the config.

**To Reproduce**
* create an Azure Key Vault
* set default access to deny
* add the IP address you want to have access and save the config.
* remove the IP address using the CLI commands above to see the difference in behaviour.

**Expected behavior**
* I expected the IP address to be removed from the configuration.

**Environment summary**
Mac OS 11.3.1 via Brew

**Additional context**
The same command in the `az storage` context behaves as expected.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.