Azure / azure-cli

Azure Command-Line Interface
MIT License
3.99k stars 2.96k forks source link

Add protocol parameter to "application-gateway http-listener" and "application-gateway listener" Commands #29208

Open gdhillon24 opened 3 months ago

gdhillon24 commented 3 months ago

Describe the bug

Add protocol parameter to "application-gateway http-listener" and "application-gateway listener" Commands Currently "az network application-gateway http-listener create" and "az network application-gateway listener create" do not have protocol parameter and if --ssl-cert parameter is mentioned it implicitly creates a HTTPS or TLS listener. And this is confusing for the customers.

Example cmdlet having protocol parameter : az network application-gateway http-settings create

Important Notes: 1) Please make sure it does become a breaking change and should not impact existing customers. It should be an optional parameter. 2) Could you please update the Documentation description for these commands, if the protocol and ssl cert parameter is not set then by default it creates Http Listener and if ssl cert parameter is set it creates Https Listener. Similarly for application-gateway listener commands. Please contact me in case you need additional information

Related command

az network application-gateway http-listener create az network application-gateway listener create az network application-gateway http-listener update az network application-gateway listener update

Errors

commands do not support protocol parameter

Issue script & Debug output

commands do not support protocol parameter

Expected behavior

commands should have protocol parameter

Environment Summary

azure-cli 2.39.0 *

core 2.39.0 telemetry 1.0.6

Extensions: azure-devops 0.23.0

Dependencies: msal 1.18.0b1 azure-mgmt-resource 21.1.0b1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory 'C:\Users\gdhillon.azure\cliextensions'

Python (Windows) 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 15:58:59) [MSC v.1929 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

Please make sure it does become a breaking change and should not impact existing customers.

azure-client-tools-bot-prd[bot] commented 3 months ago

Hi @gdhillon24,

2.39.0 is not the latest Azure CLI(2.61.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

yonzhan commented 3 months ago

Thank you for opening this issue, we will look into it.

gdhillon24 commented 3 months ago

Hi @gdhillon24,

2.39.0 is not the latest Azure CLI(2.61.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

Hey I have verified with the latest version as well --protocol parameter is not supported

PS C:\tenant\Networking-AppGW> az network application-gateway http-listener create --gateway-name "wafv2appgw" --resource-group "guruMig" --name "httpsLis4" --frontend-ip "appGwPublicFrontendIpIPv4" --frontend-port "port446" --ssl-cert "cert1" --host-name "hostname2" --protocol Https unrecognized arguments: --protocol Https

Examples from AI knowledge base: https://aka.ms/cli_ref Read more about the command in reference docs PS C:\tenant\Networking-AppGW> az version { "azure-cli": "2.61.0", "azure-cli-core": "2.61.0", "azure-cli-telemetry": "1.1.0", "extensions": { "azure-devops": "0.23.0" } }

gdhillon24 commented 3 months ago

Hi @yonzhan

I have updated the description of the bug (included important notes )and the related commands section