Azure / azure-cli

Azure Command-Line Interface
MIT License
3.96k stars 2.94k forks source link

az vm repair create needs option to deploy repair VM without public IP silently #29442

Open mmcelreath opened 1 month ago

mmcelreath commented 1 month ago

Related command az vm repair create

Is your feature request related to a problem? Please describe. When trying to create a repair Virtual Machine using az vm repair create, the user is prompted with "Does repair vm requires public ip? (y/n)". This manual intervention makes scripting this difficult. The two parameters "--associate-public-ip" and "--yes" appear to do the same thing, bypass the prompt and deploy a VM with a Public IP. There should be a parameter that would create the repair VM without a public IP so that the user doesn't get prompted for manual input, allowing for more functionality when scripting the command. Without the manual intervention, the output of the command could be stored in a variable.

Describe the solution you'd like A good solution would be if you could run something like this:

az vm repair create -g MyResourceGroup -n MyVMName --associate-public-ip false

Currently that command would throw the following error: "unrecognized arguments: false"

Describe alternatives you've considered After looking through documentation it doesn't look like there is an equivalent command in the AZ PowerShell Module.

yonzhan commented 1 month ago

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

yanzhudd commented 1 month ago

This module is owned by service team instead of Azure CLI team. Hi @qwuae1 could you please help take a look at this issue?

microsoft-github-policy-service[bot] commented 1 month ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @TravisCragg-MSFT, @nikhilpatel909, @sandeepraichura, @hilaryw29, @GabstaMSFT, @ramankumarlive, @ushnaarshadkhan.

jimurrito commented 1 month ago

@mmcelreath I created a PR to fix this. It adds --no to bypass the creation of the PIP during no-tty mode. https://github.com/Azure/azure-cli-extensions/pull/7866