|
| 1 | +--- |
| 2 | +title: Quickstart - Create Consumption logic app workflow with Bicep |
| 3 | +description: How to create and deploy a Consumption logic app workflow with Bicep. |
| 4 | +author: schaffererin |
| 5 | +services: logic-apps |
| 6 | +ms.suite: integration |
| 7 | +ms.topic: quickstart |
| 8 | +ms.author: v-eschaffer |
| 9 | +ms.custom: mvc, subject-armqs, devx-track-azurepowershell, mode-arm |
| 10 | +ms.date: 04/07/2022 |
| 11 | +#Customer intent: As a developer, I want to create and deploy an automated workflow in multi-tenant Azure Logic Apps with Bicep. |
| 12 | +--- |
| 13 | + |
| 14 | +# Quickstart: Create and deploy a Consumption logic app workflow in multi-tenant Azure Logic Apps with Bicep |
| 15 | + |
| 16 | +[Azure Logic Apps](logic-apps-overview.md) 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](/connectors/connector-reference/connector-reference-logicapps-connectors). This quickstart focuses on the process for deploying a Bicep file to create a basic [Consumption logic app workflow](logic-apps-overview.md#resource-environment-differences) that checks the status for Azure on an hourly schedule and runs in [multi-tenant Azure Logic Apps](logic-apps-overview.md#resource-environment-differences). |
| 17 | + |
| 18 | +[!INCLUDE [About Bicep](../../includes/resource-manager-quickstart-bicep-introduction.md)] |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +If you don't have an Azure subscription, create a [free Azure account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you start. |
| 23 | + |
| 24 | +## Review the Bicep file |
| 25 | + |
| 26 | +The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.logic/logic-app-create/main.bicep). |
| 27 | + |
| 28 | +The quickstart template creates a Consumption logic app workflow that uses the [*built-in*](../connectors/built-in.md) 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. |
| 29 | + |
| 30 | +This Bicep file creates the following Azure resource: |
| 31 | + |
| 32 | +* [**Microsoft.Logic/workflows**](/azure/templates/microsoft.logic/workflows), which creates the workflow for a logic app. |
| 33 | + |
| 34 | +:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.logic/logic-app-create/main.bicep"::: |
| 35 | + |
| 36 | +## Deploy the Bicep file |
| 37 | + |
| 38 | +1. Save the Bicep file as **main.bicep** to your local computer. |
| 39 | +1. Deploy the Bicep file using either Azure CLI or Azure PowerShell. |
| 40 | + |
| 41 | + # [CLI](#tab/CLI) |
| 42 | + |
| 43 | + ```azurecli |
| 44 | + az group create --name exampleRG --location eastus |
| 45 | + az deployment group create --resource-group exampleRG --template-file main.bicep --parameters logicAppName=<logic-name> |
| 46 | + ``` |
| 47 | + |
| 48 | + # [PowerShell](#tab/PowerShell) |
| 49 | + |
| 50 | + ```azurepowershell |
| 51 | + New-AzResourceGroup -Name exampleRG -Location eastus |
| 52 | + New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -logicAppName "<logic-name>" |
| 53 | + ``` |
| 54 | + |
| 55 | + --- |
| 56 | + |
| 57 | + > [!NOTE] |
| 58 | + > Replace **\<logic-name\>** with the name of the logic app to create. |
| 59 | +
|
| 60 | + When the deployment finishes, you should see a message indicating the deployment succeeded. |
| 61 | + |
| 62 | +## Review deployed resources |
| 63 | + |
| 64 | +Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group. |
| 65 | + |
| 66 | +# [CLI](#tab/CLI) |
| 67 | + |
| 68 | +```azurecli-interactive |
| 69 | +az resource list --resource-group exampleRG |
| 70 | +``` |
| 71 | + |
| 72 | +# [PowerShell](#tab/PowerShell) |
| 73 | + |
| 74 | +```azurepowershell-interactive |
| 75 | +Get-AzResource -ResourceGroupName exampleRG |
| 76 | +``` |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## Clean up resources |
| 81 | + |
| 82 | +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. |
| 83 | + |
| 84 | +# [CLI](#tab/CLI) |
| 85 | + |
| 86 | +```azurecli-interactive |
| 87 | +az group delete --name exampleRG |
| 88 | +``` |
| 89 | + |
| 90 | +# [PowerShell](#tab/PowerShell) |
| 91 | + |
| 92 | +```azurepowershell-interactive |
| 93 | +Remove-AzResourceGroup -Name exampleRG |
| 94 | +``` |
| 95 | + |
| 96 | +--- |
| 97 | + |
| 98 | +## Next steps |
| 99 | + |
| 100 | +> [!div class="nextstepaction"] |
| 101 | +> [Quickstart: Create Bicep files with Visual Studio Code](../azure-resource-manager/bicep/quickstart-create-bicep-use-visual-studio-code.md) |
0 commit comments