How to pass multiple protocol values using Azure CLI while creating nsg rule.
RG="Test-RG"
az network nsg create --name "${RG}-nsg" --location "eastus" -g $RG
az network nsg rule create -g ${RG} --nsg-name "${RG}-nsg" -n ${RG}-nsg-rule1 --priority 100
--source-address-prefixes '' --source-port-ranges '' --destination-address-prefixes ''
--destination-port-ranges '' --access Allow --protocol Tcp --description "Allowing All Traffic"
For protocol parameter I am trying to pass multiple values like Icmp Udp
--protocol {Tcp,Icmp}
--protocol [Tcp, Icmp}
I have tried both ways not working
NSG rules allow these protocols *, Ah, Esp, Icmp, Tcp, Udp
While creating NSG rule you can use only one protocols not multiple.
The parameter protocol can accepts only string you cannot pass more than one protocol. You can use Wildcard character (*) to match all.