Skip to content

[App Service]az appservice plan create: Add default OS as Linux#33395

Open
Shi1810 wants to merge 3 commits into
Azure:devfrom
Shi1810:user/shikhajha/defaultlinux
Open

[App Service]az appservice plan create: Add default OS as Linux#33395
Shi1810 wants to merge 3 commits into
Azure:devfrom
Shi1810:user/shikhajha/defaultlinux

Conversation

@Shi1810
Copy link
Copy Markdown
Contributor

@Shi1810 Shi1810 commented May 19, 2026

Related command
az appservice plan create

Description
Changes the default OS for az appservice plan create from Windows to Linux.

Linux is the dominant platform for Python and Node.js workloads on App Service, which represent the majority of CLI usage. This aligns the default with what most users expect and reduces friction for the most common scenarios. For .NET users, Windows remains available via --is-linux false.

When --hyper-v is specified, we Keep the default OS as Windows only.

Testing Guide
az appservice plan create -g rg-islinux-test -n plan-default-test --sku B1

image

az appservice plan create -g rg-islinux-test -n plan-windows-test --is-linux false --sku B1

image

az appservice plan create -g rg-islinux-test -n plan-hyperv-test --hyper-v --sku P1V3

image

az appservice plan create -g rg-islinux-test -n plan-explicit-linux --is-linux true --sku B1
image

image

History Notes
[App Service] az appservice plan create: Make default OS as Linux when --hyper-v is not specified explicitly
[App Service] az appservice plan create: Use --is-linux false to create a Windows app service plan

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

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

azure-client-tools-bot-prd Bot commented May 19, 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.

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

azure-client-tools-bot-prd Bot commented May 19, 2026

⚠️AzureCLI-BreakingChangeTest
⚠️appservice
rule cmd_name rule_message suggest_message
⚠️ 1008 - ParaPropAdd appservice plan create cmd appservice plan create update parameter is_linux: added property choices=['false', 'true']
⚠️ 1008 - ParaPropAdd appservice plan create cmd appservice plan create update parameter is_linux: added property nargs=?

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 19, 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>

@Shi1810 Shi1810 changed the title default linux for plan create az appservice plan create: Added default OS as Linux May 20, 2026
@Shi1810 Shi1810 changed the title az appservice plan create: Added default OS as Linux az appservice plan create: Add default OS as Linux May 20, 2026
@Shi1810 Shi1810 marked this pull request as ready for review May 20, 2026 09:34
@Shi1810 Shi1810 requested a review from NoriZC as a code owner May 20, 2026 09:34
Copilot AI review requested due to automatic review settings May 20, 2026 09:34
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 changes the default behavior of az appservice plan create so that, when --is-linux is not specified, plans default to Linux instead of Windows, while aiming to keep --hyper-v scenarios Windows-only.

Changes:

  • Updated --is-linux to a three-state flag and set its default to true, enabling --is-linux false for Windows plans.
  • Added validation logic to force is_linux=False when --hyper-v is specified.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/azure-cli/azure/cli/command_modules/appservice/_validators.py Forces is_linux=False when --hyper-v is set before SKU defaulting/validation.
src/azure-cli/azure/cli/command_modules/appservice/_params.py Changes --is-linux to a three-state flag with default true, and updates help text to mention --is-linux false.
Comments suppressed due to low confidence (2)

src/azure-cli/azure/cli/command_modules/appservice/_params.py:131

  • Changing --is-linux to default true will flip the default plan OS for many existing scenario tests that call appservice plan create without --is-linux (e.g., tests that later create Windows webapps/functions on that plan). Please add/update tests to explicitly set --is-linux false where Windows is expected and add coverage for the new default + --hyper-v behavior.
        c.argument('is_linux', arg_type=get_three_state_flag(), default=True, required=False,
                   help='Host web app on Linux worker. Defaults to true. Use "--is-linux false" to create a Windows plan.')
        c.argument('hyper_v', action='store_true', required=False, help='Host Windows Container Web App on Hyper-V worker.')

src/azure-cli/azure/cli/command_modules/appservice/_params.py:130

  • The updated help text for --is-linux still says "Host web app on Linux worker", but this argument applies to the App Service plan. Consider rewording to refer to the plan (and keep capitalization consistent with other help strings).
        c.argument('is_linux', arg_type=get_three_state_flag(), default=True, required=False,
                   help='Host web app on Linux worker. Defaults to true. Use "--is-linux false" to create a Windows plan.')

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/azure-cli/azure/cli/command_modules/appservice/_validators.py Outdated
Comment on lines +129 to +130
c.argument('is_linux', arg_type=get_three_state_flag(), default=True, required=False,
help='Host web app on Linux worker. Defaults to true. Use "--is-linux false" to create a Windows plan.')
@Shi1810 Shi1810 changed the title az appservice plan create: Add default OS as Linux [App Service]az appservice plan create: Add default OS as Linux May 20, 2026
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.

4 participants