az-webapp
Manage Azure App Service web apps
TLDR
List available runtimes for a web application
Create a web application
List all web applications
Delete a specific web application
SYNOPSIS
az webapp <SUBCOMMAND> [<OPTIONS>]
Common Subcommands:
create: Create an Azure web app.
list: List web apps.
deploy: Deploy content or images to a web app.
config: Manage web app configurations.
browse: Launch the web app in a browser.
PARAMETERS
--help | -h
Show help message and exit.
--resource-group | -g
Name of the resource group containing the web app.
--name | -n
Name of the web app.
--plan | -p
Name or ID of the App Service plan associated with the web app.
--runtime
The runtime stack for the web app (e.g., 'NODE|18-lts', 'PYTHON|3.9', 'DOTNETCORE|6.0').
--os-type
The OS type of the web app (e.g., 'Linux'). Usually inferred from the plan or runtime.
--deployment-local-git
Enable Git deployment from a local Git repository. Returns the Git repository URL.
--deployment-container-image-name
Container image name for Docker deployments (e.g., 'myacr.azurecr.io/myimage:latest').
--slot
The name of the deployment slot. Defaults to 'production'.
--settings
Space-separated application settings in 'KEY=VALUE' format.
--startup-file
Command or file to launch the app (for Linux custom containers).
DESCRIPTION
The `az webapp` command is a core component of the Azure CLI, specifically designed for managing web applications hosted on Azure App Service. While it supports both Windows and Linux, for Linux web apps, it facilitates the creation, deployment, configuration, and scaling of applications built with runtimes like Node.js, Python, Java, PHP, .NET Core, or custom Docker containers. It provides a powerful and scriptable interface, enabling automation of DevOps workflows, continuous integration, and continuous deployment (CI/CD) pipelines. This command group offers granular control over various aspects of your web app, from environment variables and connection strings to scaling rules and deployment slots, making it indispensable for cloud application management.
CAVEATS
The `az webapp` command is part of the Azure CLI, a cross-platform command-line tool, and is not a native Linux command like `ls` or `grep`. It requires an active Azure subscription and the Azure CLI to be installed and authenticated. Many parameters are context-sensitive to specific subcommands; always refer to `az webapp
DEPLOYMENT METHODS
az webapp
supports various deployment strategies, including Git deployment (local or remote), Zip deploy, WebDeploy, and direct container image deployments from Docker Hub or Azure Container Registry, offering flexibility for different development workflows.
SCALING AND MONITORING
Beyond deployment, the command facilitates scaling operations (manual or auto-scale) and integrates with Azure Monitor for comprehensive logging, metrics collection, and alerting, essential for maintaining application health and performance.
CUSTOM DOMAINS AND SSL
Users can easily configure custom domain names and bind SSL/TLS certificates to their web apps directly through `az webapp` commands, ensuring secure and professional web presence.
HISTORY
The `az` command is the successor to the deprecated 'azure' CLI. `az webapp` was introduced as part of the modular, Python-based Azure CLI, designed for improved consistency, scriptability, and better integration with cloud-native practices. Its capabilities have steadily expanded to encompass new features of Azure App Service, with particular emphasis on enhanced support for Linux-based applications, custom containers, and various language runtimes, aligning with modern DevOps and containerization trends.
SEE ALSO
az group(1): Manage Azure resource groups., az appservice plan(1): Manage Azure App Service plans., az functionapp(1): Manage Azure Function Apps., az containerapp(1): Manage Azure Container Apps., az acr(1): Manage Azure Container Registry.