core: "az configure -d group=foo" doesn't apply when the group is an optional arg in the command
See original GitHub issueI’ve got three different sites in three different resource groups:
~/.azure$ az appservice web list -o table
DefaultHostName Name ResourceGroup State Location AppServicePlan
------------------------------ ------------ --------------- ------- ---------- -----------------
paluffopizza.azurewebsites.net paluffopizza paluffopizza-rg Running West US WestUSPlan
springqbr.azurewebsites.net SpringQBR QBRDemoRG Running West US thermocloud2-plan
thermocloud2.azurewebsites.net thermocloud2 thermocloud2-rg Running West US thermocloud2-plan
I want to use the new configure --defaults option to default the resource group, so following the docs here: https://docs.microsoft.com/en-us/cli/azure/#configure I did the following
~/.azure$ az configure -d group=paluffopizza-rg
Now my expectation is that whenever I run a command i can omit the resource group and it will default to what I have configured. Instead, I see all of the sites:
~/.azure$ az appservice web list -o table
DefaultHostName Name ResourceGroup State Location AppServicePlan
------------------------------ ------------ --------------- ------- ---------- -----------------
paluffopizza.azurewebsites.net paluffopizza paluffopizza-rg Running West US WestUSPlan
springqbr.azurewebsites.net SpringQBR QBRDemoRG Running West US thermocloud2-plan
thermocloud2.azurewebsites.net thermocloud2 thermocloud2-rg Running West US thermocloud2-plan
What i expect to see is the same thing as running this command:
~/.azure$ az appservice web list -g paluffopizza-rg -o table
DefaultHostName Name ResourceGroup State Location AppServicePlan
------------------------------ ------------ --------------- ------- ---------- ----------------
paluffopizza.azurewebsites.net paluffopizza paluffopizza-rg Running West US WestUSPlan
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (10 by maintainers)
Top Results From Across the Web
Named and Optional Arguments - C# Programming Guide
Named and optional arguments enable you to omit the argument for an optional parameter if you don't want to change the parameter's default ......
Read more >Optional argument in command with click - Stack Overflow
In this case we over ride click.Group.parse_args() and if the first parameter matches a command and the second parameter does not, then we ......
Read more >ONTAP Command Reference
Description. The redo command re-executes a command that has been executed previously in the current CLI session.
Read more >Azure arm - Builders | Packer - HashiCorp Developer
Knowing the resource group and VM name allows one to execute commands to update the VM during a Packer build, e.g. attach a...
Read more >NX Nastran User's Guide - Siemens PLM
In NX Nastran, you can use the SET Case Control command to identify a group of grid points and/or elements as a specific...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You could make the list commands accept
--resource-group *
to list all within the subscription. That wouldn’t require much more logic but still allow you to use the default RG.@chrisdias, Agreed it is a ui gap. The arg description is not correct here.