Skip to content

[App Service] az appservice plan create: Add meaningful output for common scenarios#33237

Open
Shi1810 wants to merge 7 commits intoAzure:devfrom
Shi1810:user/shikhajha/plancreatefix
Open

[App Service] az appservice plan create: Add meaningful output for common scenarios#33237
Shi1810 wants to merge 7 commits intoAzure:devfrom
Shi1810:user/shikhajha/plancreatefix

Conversation

@Shi1810
Copy link
Copy Markdown
Contributor

@Shi1810 Shi1810 commented Apr 21, 2026

Related command
az appservice plan create

Description
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

image

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

image

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.
image

Works correctly - elastic scale is enabled with max 5 workers.

image

Quota error rewriting ("VMs" → "App Service Plan workers")
Before:
image
After:
image

History Notes

az appservice plan create: Make P0V3 as default SKU when --sku is omitted for linux webapp
az appservice plan create: Add PREMIUM0V3 tier for elastic scale


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings April 21, 2026 13:46
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 21, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @Shi1810,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 21, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 21, 2026

⚠️AzureCLI-BreakingChangeTest
⚠️appservice
rule cmd_name rule_message suggest_message
⚠️ 1009 - ParaPropRemove appservice plan create cmd appservice plan create update parameter sku: removed property default=B1

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 create SKU to P0V3 when --sku is 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.

Comment thread src/azure-cli/azure/cli/command_modules/appservice/custom.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/appservice/custom.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/appservice/_validators.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/appservice/commands.py Outdated
@Shi1810 Shi1810 changed the title az appservice plan create : Add meaningful output for common scenarios [App Service] az appservice plan create : Add meaningful output for common scenarios Apr 23, 2026
@Shi1810 Shi1810 changed the title [App Service] az appservice plan create : Add meaningful output for common scenarios [App Service] az appservice plan create: Add meaningful output for common scenarios Apr 23, 2026
Comment thread src/azure-cli/azure/cli/command_modules/appservice/_validators.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/appservice/commands.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/appservice/commands.py Outdated
@surenderssm
Copy link
Copy Markdown
Member

Let's update the PR description, they still include (price)

Comment thread src/azure-cli/azure/cli/command_modules/appservice/_help.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/appservice/_validators.py
Comment thread src/azure-cli/azure/cli/command_modules/appservice/_validators.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants