Describe the bug
We tried to create via az cli a new load balancer L4 with an already present public IP in basic SKU but we received an error when we specify the option "--public-ip-address" with the ID retrieved by "az network public-ip show" command.
The command used and the results are:
az network lb create --name <namelb> --resource-group <namerg> --vnet-name <vnetfullid> --subnet <subnetfullid> --private-ip-address <privateip> --public-ip-address <publicipfullid> --frontend-ip-name <frontendpool> --backend-pool-name <backendpool> --sku basic
usage: az network lb create [-h] [--verbose] [--debug]
[--output {tsv,table,json,jsonc}]
[--query JMESPATH] [--no-wait]
[--subnet-type SUBNET_TYPE]
[--public-ip-address-type PUBLIC_IP_ADDRESS_TYPE]
[--public-ip-zone {1,2,3}] [--subnet SUBNET]
--name NAME [--location LOCATION]
[--public-ip-dns-name PUBLIC_IP_DNS_NAME]
[--sku {Basic,Standard}]
[--public-ip-address PUBLIC_IP_ADDRESS]
[--tags [TAGS [TAGS ...]]] [--vnet-name NAME]
[--validate] [--frontend-ip-zone {1,2,3}]
[--subnet-address-prefix SUBNET_ADDRESS_PREFIX]
--resource-group RESOURCE_GROUP_NAME
[--backend-pool-name BACKEND_POOL_NAME]
[--public-ip-address-allocation {Dynamic,Static}]
[--frontend-ip-name FRONTEND_IP_NAME]
[--vnet-address-prefix VNET_ADDRESS_PREFIX]
[--private-ip-address PRIVATE_IP_ADDRESS]
az network lb create: error: incorrect usage: --subnet NAME --vnet-name NAME | --subnet ID | --public-ip NAME_OR_ID
To Reproduce
We execute the command reported in the paragraph before.
Expected behavior
We expect to have the LB configured with the public IP specified
Environment summary
[ansible@test ~]$ az --version
azure-cli (2.0.29)
acr (2.0.22)
acs (2.0.28)
advisor (0.5.0)
appservice (0.1.29)
backup (1.0.7)
batch (3.1.11)
batchai (0.1.6)
billing (0.1.7)
cdn (0.0.13)
cloud (2.0.12)
cognitiveservices (0.1.11)
command-modules-nspkg (2.0.1)
configure (2.0.14)
consumption (0.2.2)
container (0.1.19)
core (2.0.29)
cosmosdb (0.1.19)
dla (0.0.18)
dls (0.0.19)
eventgrid (0.1.11)
eventhubs (0.1.0)
extension (0.0.10)
feedback (2.1.0)
find (0.2.8)
interactive (0.3.17)
iot (0.1.18)
keyvault (2.0.20)
lab (0.0.17)
monitor (0.1.3)
network (2.0.25)
nspkg (3.0.2)
profile (2.0.20)
rdbms (0.1.0)
redis (0.2.11)
reservations (0.1.1)
resource (2.0.25)
role (2.0.20)
servicebus (0.1.0)
servicefabric (0.0.11)
sql (2.0.23)
storage (2.0.27)
vm (2.0.28)
Python location '/usr/lib64/az/bin/python'
Extensions directory '/home/ansible/.azure/cliextensions'
Python (Linux) 2.7.5 (default, May 3 2017, 07:55:04)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
Legal docs and information: aka.ms/AzureCliLegal
[ansible@test~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
[ansible@test~]$ bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Additional context
Add any other context about the problem here.
Describe the bug
We tried to create via az cli a new load balancer L4 with an already present public IP in basic SKU but we received an error when we specify the option "--public-ip-address" with the ID retrieved by "az network public-ip show" command.
The command used and the results are:
To Reproduce
We execute the command reported in the paragraph before.
Expected behavior
We expect to have the LB configured with the public IP specified
Environment summary
Additional context
Add any other context about the problem here.