Skip to main content
Version: Deploy Next

Azure App Service

The Azure plugin supports deploying and managing Azure App Service resources including Web Apps, Static Web Apps, and associated configurations such as deployment slots, logging, and site extensions.

Prerequisites

Before you begin, ensure you have:

  • Set up an Azure Cloud connection.
  • A Resource Group (azure.ResourceGroup) provisioned in your environment CI.

Create an App Service Plan

An App Service Plan (azure.AppServicePlan) defines the compute resources and pricing tier for Web Apps and Function Apps hosted within it.

  1. In the side navigation bar, click Explorer.

  2. Under Applications, expand your application and provisioning package.

  3. Click Context menu, then select New > azure > AppServicePlanSpec.

  4. Specify the following properties:

    PropertyRequiredDescription
    Service Plan NameNoName of the App Service Plan. Defaults to the CI name if not specified.
    LocationYesAzure region where the plan is hosted (for example, westus).
    SKU NameNoPricing tier name. Default: S1.
    SKU TierNoPricing tier level. Default: Basic.
    SKU SizeNoInstance size. Default: 1.
    SKU FamilyNoPricing family. Default: S.
    SKU CapacityNoNumber of worker instances. Default: 0.
    OS TypeNoWindows (default) or Linux.
  5. Click Save and close.

Deploy a Web App

An azure.WebApp creates an Azure Web App in a Resource Group, bound to an App Service Plan. Use this for code-based deployments without an artifact at provision time.

  1. Under your provisioning package, click Context menu, then select New > azure > WebAppSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    App NameNoName of the Web App. Defaults to the CI name.
    Service Plan NameYesName of the App Service Plan to use.
    LocationYesAzure region (for example, westus).
    Linux Fx VersionNoLinux framework and version (for example, `TOMCAT
    Windows Fx VersionNoWindows framework and version.
    Startup CommandNoOptional startup command run during container startup.
    App SettingsNoKey-value pairs for application settings.
    App TagsNoTags to associate with the Web App.
    SQL Database Connection StringsNoConnection strings for Azure SQL Database.
    SQL Server Connection StringsNoConnection strings for SQL Server.
    Custom Connection StringsNoCustom connection string key-value pairs.
    Add System Assigned IdentityNoIf true, adds a system-assigned managed identity to the Web App.
    User Assigned IdentitiesNoList of user-assigned managed identity resource IDs. To specify an identity from a different resource group, provide its full resource ID.
  3. Click Save and close and deploy.

Deploy Code to a Web App

Use azure.WebAppCode to deploy a file artifact (WAR, JAR, ZIP, and so on) to an existing Web App.

  1. Under your application package, click Context menu, then select New > azure > WebAppCodeSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    Web App NameYesName of the target Web App.
    Artifact TypeNoType of artifact: war, jar, ear, lib, startup, static, or zip.
    Clean Target SpaceNoIf true, cleans the deployment space before deploying. Caution: this removes existing deployed files. Default: false.
    Target PathNoAbsolute deployment path on the Web App.
    Deployment SlotNoDeployment slot to target (if using slots).
  3. Attach the artifact file to the CI.

  4. Click Save and close and deploy.

Deploy a Web App as a Container

Use azure.WebAppContainer to deploy a containerized Web App from a Docker registry or Azure Container Registry (ACR).

  1. Under your provisioning package, click Context menu, then select New > azure > WebAppContainerSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    App NameNoName of the Web App. Defaults to the CI name.
    Service Plan NameYesName of the App Service Plan to use.
    LocationYesAzure region.
    OS TypeYesLinux (default) or Windows.
    Image NameYesDocker image name and tag (for example, myregistry.azurecr.io/myapp:latest).
    Registry URLYesACR or Docker registry URL.
    Registry UsernameNoRegistry username for authentication.
    Registry PasswordNoRegistry password.
    Startup CommandNoOptional startup command.
    Expose PortNoPort to expose. Default: 0.
    App SettingsNoApplication settings key-value pairs.
    SQL Database Connection StringsNoConnection strings for Azure SQL Database.
    SQL Server Connection StringsNoSQL Server connection strings.
    Custom Connection StringsNoCustom connection strings.
    App TagsNoTags for the Web App.
    Add System Assigned IdentityNoAdds a system-assigned managed identity.
    User Assigned IdentitiesNoList of user-assigned managed identity resource IDs.
  3. Click Save and close and deploy.

Deploy a Static Web App

Use azure.StaticWebApp to create an Azure Static Web App with optional GitHub repository integration for continuous deployment.

  1. Under your provisioning package, click Context menu, then select New > azure > StaticWebAppSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    App NameNoName of the Static Web App. Defaults to the CI name.
    LocationYesAzure region.
    Hosting PlanYesFree (default) or Standard.
    Repository URLNoGitHub repository URL for the static site.
    BranchNoTarget branch in the repository.
    Repository TokenNoGitHub personal access token to set up the GitHub Actions workflow and API secrets.
    App LocationNoPath to the app source code in the repository.
    API LocationNoPath to the API source code in the repository.
    App Artifact LocationNoBuild output path for app artifacts.
    App TagsNoTags to associate with the Static Web App.
    App SettingsNoApplication settings key-value pairs.
    Add System Assigned IdentityNoAdds a system-assigned managed identity.
    User Assigned IdentitiesNoList of user-assigned managed identity resource IDs.
  3. Click Save and close and deploy.

Create a Web App Deployment Slot

Use azure.WebAppSlot to create a deployment slot on an existing Web App. Deployment slots allow staged deployments and slot-swap workflows.

  1. Under your provisioning package, click Context menu, then select New > azure > WebAppSlotSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    Web App NameYesName of the Web App to add the slot to.
    Slot NameYesName of the new deployment slot.
    Clone Settings FromYesChoose Clone configuration from WebApp, Clone configuration from Deployment slot, or Do not clone settings.
    Clone From Web AppNoName of the Web App whose configuration to clone. Required if cloning from a Web App.
    Clone From Deployment SlotNoName of the deployment slot to clone configuration from. Required if cloning from a slot.
  3. Click Save and close and deploy.

Configure Web App Logging

Use azure.WebAppLogging to configure diagnostic logging settings for a Web App.

  1. Under your provisioning package, click Context menu, then select New > azure > WebAppLoggingSpec.

  2. Specify the following properties:

    PropertyDescription
    Web App NameName of the Web App to configure logging for.
    Application Logging (FileSystem)On or Off. Enables file system application logging.
    Log Level (FileSystem)Error, Warning, Information, or Verbose. Required when file system logging is enabled.
    Application Logging (Blob)On or Off. Enables blob storage application logging.
    Log Level (Blob)Log level for blob logging. Required when blob logging is enabled.
    Storage Account URL (Blob)SAS URL of an Azure blob container for application logs. Requires read/write/list/delete permissions.
    Retention Period (Blob)Days to retain blob logs. 0 means no retention.
    Web Server LoggingOff, FileSystem, or Storage.
    Quota (MB)Max size in MB for HTTP log files when using FileSystem (25–100 MB, default: 35). Old log files are removed when the quota is reached.
    Retention Period (FileSystem)Days to retain HTTP log files. 0 means no retention.
    Storage Account URL (Storage)SAS URL for web server log storage.
    Retention Period (Storage)Days to retain web server logs stored in blob storage.
    Detailed Error MessagesOn or Off.
    Failed Requests TracingOn or Off.
  3. Click Save and close and deploy.

Add a Web App Extension

Use azure.WebAppExtension to install a site extension on a Web App.

  1. Under your provisioning package, click Context menu, then select New > azure > WebAppExtensionSpec.

  2. Specify the following properties:

    PropertyRequiredDescription
    Web App NameYesName of the Web App to add the extension to.
    Site Extension IDYesIdentifier of the site extension to install (for example, Raygun.AzureAppService.Extension for .Net Raygun APM).
  3. Click Save and close and deploy.