[App Service] az appservice plan create: Add meaningful output for common scenarios#33237
[App Service] az appservice plan create: Add meaningful output for common scenarios#33237
az appservice plan create: Add meaningful output for common scenarios#33237Conversation
️✔️AzureCLI-FullTest
|
|
Hi @Shi1810, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| appservice plan create | cmd appservice plan create update parameter sku: removed property default=B1 |
There was a problem hiding this comment.
Pull request overview
This PR improves the UX around az appservice plan create by changing the default SKU behavior and emitting more actionable output for common “plan already exists” and quota-related failure scenarios.
Changes:
- Default
az appservice plan createSKU toP0V3when--skuis omitted, and update help examples accordingly. - Add warnings when creating a plan that already exists, summarizing what would change (SKU/workers/OS) and pointing to
az appservice plan update. - Rewrite misleading App Service Plan quota errors that reference “VMs” to instead reference App Service Plan workers, with SKU hints.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/appservice/custom.py |
Defaults SKU to P0V3 (when sku=None) and adds “existing plan” warning output during create; expands elastic checks to include PREMIUM0V3. |
src/azure-cli/azure/cli/command_modules/appservice/_validators.py |
Sets default namespace.sku to P0V3 and logs a warning when --sku is omitted. |
src/azure-cli/azure/cli/command_modules/appservice/commands.py |
Adds quota error rewriting for plan-create errors and introduces the rewrite helper + tier→SKU hints map. |
src/azure-cli/azure/cli/command_modules/appservice/_help.py |
Updates appservice plan create examples to reflect the new default SKU and adds an explicit basic-tier example. |
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py |
Adds unit tests covering quota rewrite + polish behavior and “existing plan”/default SKU behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
az appservice plan create : Add meaningful output for common scenariosaz appservice plan create : Add meaningful output for common scenarios
…shikhajha/plancreatefix
az appservice plan create : Add meaningful output for common scenariosaz appservice plan create: Add meaningful output for common scenarios
|
Let's update the PR description, they still include (price) |
Related command
az appservice plan createDescription
This PR makes the following changes:
Default SKU: P0V3 (with warning when --sku is omitted)
Quota error rewriting ("VMs" → "App Service Plan workers")
PREMIUM0V3 tier fix for elastic scale
.format() fix on the WS ValidationError
Updated help examples + unit tests
Testing Guide
We pick up P0V3 as default SKU if user doesn't provide any while creating plan:
Before:
No warning at all — just Creating App Service Plan 'test-plan-dev' (Linux).
Silently defaults to B1 (Basic) — "tier": "Basic", "name": "B1"
User has no idea the default was B1 unless they read the help
After:
Shows: WARNING: No --sku specified. Using default: P0V3 (Premium V3 Extra Small). Other common options: F1 (Free), B1 (Basic)...
Defaults to P0V3 (Premium V3 Extra Small) — "tier": "Premium0V3", "name": "P0v3"
User is informed and knows how to change it
PREMIUM0V3 tier fix for elastic scale:

P0V3 is a Premium V3 SKU but the CLI rejects it because PREMIUM0V3 isn't in the allowed list.
Works correctly - elastic scale is enabled with max 5 workers.
Quota error rewriting ("VMs" → "App Service Plan workers")


Before:
After:
History Notes
az appservice plan create: Make P0V3 as default SKU when --sku is omitted for linux webappaz appservice plan create: Add PREMIUM0V3 tier for elastic scaleThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.