Quickstart: Create and deploy a Consumption logic app workflow in multi-tenant Azure Logic Apps with an ARM template
Grein
Applies to: Azure Logic Apps (Consumption)
Azure Logic Apps is a cloud service that helps you create and run automated workflows that integrate data, apps, cloud-based services, and on-premises systems by choosing from hundreds of connectors. This quickstart focuses on the process for deploying an Azure Resource Manager template (ARM template) to create a basic Consumption logic app workflow that checks the status for Azure on an hourly schedule and runs in multi-tenant Azure Logic Apps.
An Azure Resource Manager template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. The template uses declarative syntax. You describe your intended deployment without writing the sequence of programming commands to create the deployment.
If your environment meets the prerequisites, and you're familiar with using ARM templates, select the Deploy to Azure button. The template will open in the Azure portal.
Prerequisites
If you don't have an Azure subscription, create a free Azure account before you start.
The quickstart template creates a Consumption logic app workflow that uses the built-in Recurrence trigger, which is set to run every hour, and a built-in HTTP action, which calls a URL that returns the status for Azure. Built-in operations run natively on Azure Logic Apps platform.
This template creates the following Azure resource:
If your Azure environment meets the prerequisites, and you're familiar with using ARM templates, these steps help you sign in directly to Azure and open the quickstart template in the Azure portal. For more information, see Deploy resources with ARM templates and Azure portal.
The Azure CLI provides a command-line experience for creating and managing Azure resources. To run these commands, you need Azure CLI version 2.6 or later. To check your CLI version, enter az --version. For more information, see the following documentation:
Azure PowerShell provides a set of cmdlets that use the Azure Resource Manager model for managing your Azure resources. For more information, see the following documentation:
Azure provides Representational State Transfer (REST) APIs, which are service endpoints that support HTTP operations (methods) that you use to create, retrieve, update, or delete access to service resources. For more information, see Get started with Azure REST API.
The Azure region to use for all resources, if different from the default value. This example uses the default value, [resourceGroup().location], which is the resource group location.
The following example shows how the page looks with sample values:
read -p "Enter a project name to use for generating resource names:" projectName &&
read -p "Enter the location, such as 'westus':" location &&
templateUri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.logic/logic-app-create/azuredeploy.json" &&
resourceGroupName="${projectName}rg" &&
az group create --name $resourceGroupName --location "$location" &&
az deployment group create --resource-group $resourceGroupName --template-uri $templateUri &&
echo "Press [ENTER] to continue ..." &&
read
For more information, see the following documentation:
If you don't want to use an existing Azure resource group, create a new resource group by following this syntax for the request that you send to the Resource Management REST API:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}?api-version=2019-10-01
Value
Description
<subscriptionId>
The GUID for the Azure subscription that you want to use
<resourceGroupName>
The name for the Azure resource group to create. This example uses Check-Azure-Status-RG.
For example:
PUT https://management.azure.com/subscriptions/xxxxXXXXxxxxXXXXX/resourcegroups/Check-Azure-Status-RG?api-version=2019-10-01
For more information, see the following documentation:
To deploy the quickstart template to your resource group, follow this syntax for the request that you send to the Resource Management REST API:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}?api-version=2019-10-01
Value
Description
<subscriptionId>
The GUID for the Azure subscription that you want to use
<resourceGroupName>
The name for the Azure resource group to use. This example uses Check-Azure-Status-RG.
<deploymentName>
The name to use for your deployment. This example uses Check-Azure-Status-LA.
For example:
PUT https://management.azure.com/subscriptions/xxxxXXXXxxxxXXXXX/resourcegroups/Check-Azure-Status-RG/providers/Microsoft.Resources/deployments/Check-Azure-Status-LA?api-version=2019-10-01
To provide the values to use for the deployment, such as the Azure region and links to the quickstart template and parameter file, which contains the values for the quickstart template to use at deployment, follow this syntax for the request body that you send to the Resource Management REST API:
Run either an incremental update or complete update. This example uses Incremental, which is the default value. For more information, see Azure Resource Manager deployment modes.
To view the logic app workflow, you can use the Azure portal, run a script that you create with Azure CLI or Azure PowerShell, or use the Logic App REST API.
In the Azure portal search box, enter your logic app's name, which is Check-Azure-Status-LA in this example. From the results list, select your logic app.
In the Azure portal, find and select your logic app, which is Check-Azure-Status-RG in this example.
When the workflow designer opens, review the logic app workflow created by the quickstart template.
To test the logic app, on the designer toolbar, select Run.
echo "Enter your logic app name:" &&
read logicAppName &&
az logic workflow show --resource-group $resourceGroupName --name $logicAppName &&
echo "Press [ENTER] to continue ..."
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}?api-version=2016-06-01
Value
Description
subscriptionId
The GUID for the Azure subscription where you deployed the quickstart template.
resourceGroupName
The name for the Azure resource group where you deployed the quickstart template. This example uses Check-Azure-Status-RG.
workflowName
The name for the logic app that you deployed. This example uses Check-Azure-Status-LA.
For example:
GET https://management.azure.com/subscriptions/xxxxXXXXxxxxXXXXX/resourceGroups/Check-Azure-Status-RG/providers/Microsoft.Logic/workflows/Check-Azure-Status-LA?api-version=2016-06-01
If you plan to continue working with subsequent quickstarts and tutorials, you might want to keep these resources. When you no longer need the logic app, delete the resource group by using either the Azure portal, Azure CLI, Azure PowerShell, or Resource Management REST API.