From bcfb1633eaa86b8c9cd9975cdea02a9919fa9d21 Mon Sep 17 00:00:00 2001 From: Jordan Selig Date: Thu, 26 Mar 2026 10:45:57 -0400 Subject: [PATCH] [App Service] Fix #30336, #29761: Improve --scope and --linux-fx-version help text and examples - Add --scope example to webapp create help showing managed identity assignment - Update --linux-fx-version help with RUNTIME|VERSION format and current runtime examples - Add --linux-fx-version examples to webapp config set help for Python, Node, .NET Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure/cli/command_modules/appservice/_help.py | 12 ++++++++++++ .../azure/cli/command_modules/appservice/_params.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_help.py b/src/azure-cli/azure/cli/command_modules/appservice/_help.py index e0dad92e98c..d4804803abf 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_help.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_help.py @@ -1665,6 +1665,15 @@ - name: set configuration through a JSON file called params.json text: > az webapp config set -g MyResourceGroup -n MyUniqueApp --generic-configurations "@.\\params.json" + - name: Set the linux runtime stack to Python 3.11 (format is RUNTIME|VERSION). + text: > + az webapp config set -g MyResourceGroup -n MyUniqueApp --linux-fx-version "PYTHON|3.11" + - name: Set the linux runtime stack to Node.js 18 LTS. + text: > + az webapp config set -g MyResourceGroup -n MyUniqueApp --linux-fx-version "NODE|18-lts" + - name: Set the linux runtime stack to .NET 8.0. + text: > + az webapp config set -g MyResourceGroup -n MyUniqueApp --linux-fx-version "DOTNETCORE|8.0" """ @@ -1910,6 +1919,9 @@ - name: Create a web app with end-to-end encryption enabled and minimum TLS version 1.2 text: > az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --end-to-end-encryption-enabled true --min-tls-version 1.2 + - name: Create a web app with a system-assigned managed identity and grant it access to a storage account. + text: > + az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --assign-identity [system] --scope /subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Storage/storageAccounts/{storageAccount} --role Contributor """ helps['webapp create-remote-connection'] = """ diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index bd4dc0b7ea5..ad0f48442d0 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -581,7 +581,7 @@ def load_arguments(self, _): c.argument('power_shell_version', help='The version used to run your function app if using PowerShell, e.g., 7.2', options_list=['--powershell-version']) c.argument('python_version', help='The version used to run your web app if using Python, e.g., 2.7, 3.4') c.argument('net_framework_version', help="The version used to run your web app if using .NET Framework, e.g., 'v4.0' for .NET 4.6 and 'v3.0' for .NET 3.5") - c.argument('linux_fx_version', help="The runtime stack used for your linux-based webapp, e.g., \"RUBY|2.5.5\", \"NODE|12LTS\", \"PHP|7.2\", \"DOTNETCORE|2.1\". See https://aka.ms/linux-stacks for more info.") + c.argument('linux_fx_version', help="The runtime stack used for your linux-based webapp, in the format 'RUNTIME|VERSION'. Common examples: \"PYTHON|3.11\", \"NODE|18-lts\", \"DOTNETCORE|8.0\", \"JAVA|17-java17\", \"PHP|8.2\". Use `az webapp list-runtimes --os linux` to see all supported values. See https://aka.ms/linux-stacks for more info.") c.argument('windows_fx_version', help="A docker image name used for your windows container web app, e.g., microsoft/nanoserver:ltsc2016") if scope == 'functionapp': c.ignore('windows_fx_version')