Skip to content

appservice plan create defaults to Linux but Windows examples omit --is-linux false #33821

Description

@btardif

Describe the bug

az appservice plan create defaults to a Linux plan when --is-linux is omitted, but examples in the same command help state that omitting the flag creates a Windows plan. This silently creates an App Service plan with the opposite OS from the documented examples. An existing plan cannot be converted between Windows and Linux.

Related command

az appservice plan create `
  --name <plan-name> `
  --resource-group <resource-group> `
  --location eastus2euap `
  --sku B1

az appservice plan show `
  --name <plan-name> `
  --resource-group <resource-group> `
  --query '{name:name,kind:kind}'

Errors

No error is emitted. The create command exits 0, but the resulting plan is Linux:

{
  "kind": "linux",
  "name": "<plan-name>"
}

The raw ARM resource also reports properties.reserved=true.

Issue script & Debug output

Relevant output from az appservice plan create --help:

--is-linux: Host web app on Linux worker. Defaults to true unless
            --hyper-v is specified. Use "--is-linux false" to create a
            Windows plan.

Examples from the same help output:

Create a Windows app service plan.
    az appservice plan create -g MyResourceGroup -n MyPlan

Create a Windows app service plan with a specific SKU.
    az appservice plan create -g MyResourceGroup -n MyPlan --sku B1

The issue is the contradiction between the implemented default and these generated examples. No credentials or resource identifiers are needed to observe the help inconsistency.

Expected behavior

The default behavior and examples should agree. One of the following would avoid silently selecting the wrong OS:

  1. Preserve the Windows default when --is-linux is omitted.
  2. Require an explicit OS selection.
  3. Update all Windows examples to pass --is-linux false and clearly document the changed default.

Environment Summary

azure-cli                         2.88.0
core                              2.88.0
telemetry                          1.1.0

Extensions:
azure-devops                       1.0.6
kusto                              0.5.0
resource-graph                     2.1.1

Dependencies:
msal                              1.36.0
azure-mgmt-resource               24.0.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Python (Windows) 3.14.5 [MSC v.1944 64 bit (AMD64)]
PowerShell 7.6.4
Windows 10.0.26200

Additional context

Workaround:

az appservice plan create ... --is-linux false # Windows
az appservice plan create ... --is-linux true  # Linux

A repository search found #33180, but that issue concerns az functionapp plan create ignoring an explicit --is-linux false; this report concerns the contradictory default and examples for az appservice plan create.

Suggested assignee: Jordan Selig (@seligj95)

Activity

  1. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Jul 31, 2026
  2. yonzhan commented on Jul 31, 2026

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  3. btardif commented on Aug 1, 2026

    @btardif
    MemberAuthor

    We should keep linux as default just fix the help samples

  4. x-engineering-agent commented on Aug 1, 2026

    @x-engineering-agent
    Contributor

    Bug Analysis

    Command: az appservice plan create
    Module: appservice
    Issue: The help text examples claim omitting --is-linux creates a Windows plan, but the actual default is Linux (--is-linux defaults to true). An App Service plan OS cannot be changed after creation, so users silently get the wrong OS.

    Root cause: The _help.py examples for appservice plan create were written when the Windows plan was the default, but the default was later changed to Linux. The examples were not updated to reflect this.

    Fix required (as confirmed by the issue author):

    • Keep Linux as the default (preserve --is-linux defaulting to true)
    • Update the help examples in src/azure-cli/azure/cli/command_modules/appservice/_help.py so that Windows examples explicitly pass --is-linux false

    For example, change:

    az appservice plan create -g MyResourceGroup -n MyPlan
    

    to:

    az appservice plan create -g MyResourceGroup -n MyPlan --is-linux false
    

    Also update the example description text from "Create a Windows app service plan." to reflect that --is-linux false is required for Windows, or relabel the examples as Linux examples.

    Use this EXACT PR title: [AppService] Fix #33821: az appservice plan create: fix Windows examples to include --is-linux false

    PR title & description format (required)

    This repo enforces a PR format (guide). Please author the PR exactly as follows or CI's Check the Format of Pull Request Title and Content will fail.

    Use this EXACT PR title (copy verbatim, do not reword):

    [AppService] Fix #33821: `az appservice plan create`: fix Windows examples to include --is-linux false
    

    Keep the backticks around the command and the Fix #33821: prefix. You may only adjust the wording after the command (the final summary) if the fix changes; the [AppService] prefix, issue link, and backticked command must stay.

    Description — follow the PR template and fill in:

    • Link the issue — start the Description with a closing keyword so the PR auto-links and closes it: Fixes #33821.
    • Related command — the az ... command this affects.
    • Description (mandatory) — why the bug happens, what you changed, and the resulting behavior.
    • Testing Guide — example command(s) showing the fix works.
    • History Notes — leave the title to drive the history note, or add extra lines in the same format (component in brackets + the command in backticks), e.g. [AppService] `az <command>`: <note>.
    • Keep the template checklist and tick the items you've satisfied.

    Posted by agent-assist (autonomous bug-fix pipeline).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions