Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 a Bicep file 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.
Bicep is a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources. It provides concise syntax, reliable type safety, and support for code reuse. Bicep offers the best authoring experience for your infrastructure-as-code solutions in Azure.
If you don't have an Azure subscription, sign up for a trial Azure subscription before you start.
The Bicep file used in this quickstart is from Azure Quickstart Templates.
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 Bicep file creates the following Azure resource:
Microsoft.Logic/workflows, which creates the workflow for a logic app.
@description('The name of the logic app to create.') param logicAppName string @description('A test URI') param testUri string = 'https://status.azure.com/en-us/status/' @description('Location for all resources.') param location string = resourceGroup().location var frequency = 'Hour' var interval = '1' var type = 'recurrence' var actionType = 'http' var method = 'GET' var workflowSchema = 'https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#' resource stg 'Microsoft.Logic/workflows@2019-05-01' = { name: logicAppName location: location tags: { displayName: logicAppName } properties: { definition: { '$schema': workflowSchema contentVersion: '1.0.0.0' parameters: { testUri: { type: 'string' defaultValue: testUri } } triggers: { recurrence: { type: type recurrence: { frequency: frequency interval: interval } } } actions: { actionType: { type: actionType inputs: { method: method uri: testUri } } } } } }
Save the Bicep file as main.bicep to your local computer.
Deploy the Bicep file using either Azure CLI or Azure PowerShell.
az group create --name exampleRG --location chinaeast az deployment group create --resource-group exampleRG --template-file main.bicep --parameters logicAppName=<logic-name>
Note
Replace <logic-name> with the name of the logic app to create.
When the deployment finishes, you should see a message indicating the deployment succeeded.
Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.
az resource list --resource-group exampleRG
When you no longer need the logic app, use the Azure portal, Azure CLI, or Azure PowerShell to delete the resource group and its resources.
az group delete --name exampleRG