Currently, this feature is behind the Feature Flag
AZURE_WEBAPP. Contact Harness Support to enable the feature.The target Azure environment for your Harness Web App deployment is defined in a Harness Environment's Infrastructure Definition.
You simply select the Web App's Subscription and Resource Group.
You can also provision the infrastructure and Web App as part of your Workflow.
Before You Begin
- Azure Web App Deployments Overview
- Make sure that you have connected Harness to your Azure subscription as described in Connect to Azure and Artifact Repo for Your Web App Deployments.
- Add Your Docker Image for Azure Web App Deployment
- Add Non-Containerized Artifacts for Azure Web App Deployment
Supported Platforms and Technologies
Step 1: Create an Environment
In your Harness Application, click Environments.
Click Add Environment.
Enter a name and select an Environment Type for your Environment, and click Submit.
The Environment Type here doesn't relate to the production or non-production slots of your Web App.
A Harness Environment Type is simply a way to organize your work environments.
Step 2: Create an Infrastructure Definition
In the new Environment, click Add Infrastructure Definition.
Enter the following settings:
Provide a name for the Infrastructure Definition. You'll select this name when defining target infrastructures for Workflows and their Phases.
Cloud Provider Type
Select Microsoft Azure.
Select Azure Web Application.
Select the Azure Cloud Provider you set up for your Azure Web App deployment. The Cloud Provider determines which subscriptions and resource groups appear in the other settings.
Select the Azure subscription used by your Web App.
The subscription is located in the Web App Overview section of the Azure portal.
Select the resource group used by your Web App.
The resource group is located in the Web App Overview section of the Azure portal.
Within the same resource group, you can't mix Windows and Linux apps in the same region. See Limitations from Azure.
Option 1: Scope to Specific Services
The Scope to specific Services setting in the Infrastructure Definition enables you to scope this Infrastructure Definition to specific Harness Services.
Option: Dynamically Provision Infrastructure
You can use Terraform scripts to provision the target Azure environment and Web App for your Harness Web App deployment.
See Map an Azure Web App.
Configure As Code
To see how to configure the settings in this topic using YAML, configure the settings in the UI first, and then click the YAML editor button.