Set a default value for resource group prompt - #7044
Conversation
There was a problem hiding this comment.
Pull request overview
This PR sets a default value for the resource group selection prompt when DefaultName is provided and creating a new resource group is allowed. This enables --no-prompt mode to work correctly for resource-group-scoped deployments when AZURE_RESOURCE_GROUP is set but the resource group doesn't yet exist—the CLI will automatically select "Create a new resource group" and use the default name rather than failing with "no default response for prompt."
Changes:
- When
canCreateNeResourceGroupis true andDefaultNameis non-empty, theSelectprompt'sDefaultValueis set to the "Create a new resource group" option, enabling automatic selection in--no-promptmode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Set a default value for resource group prompt
This allows resource-group deployment with
AZURE_RESOURCE_GROUPset inno-promptmode to continue. If the resource group already exists, the prompt is skipped. If the resource group does not exist, we create it.Contributes to #6586