Deploy Azure Logic App using Bicep Language
    • Dark
    • PDF

    Deploy Azure Logic App using Bicep Language

    • Dark
    • PDF

    Article Summary

    #ServerlessTips - Azure Bicep
    Author: Dave Rendon Microsoft MVP

    The purpose of this article is to help you deploy an Azure Logic App in your environment using Infrastructure-as-Code with Azure Bicep.

    Azure Bicep is a domain-specific language (DSL) that uses a declarative syntax to deploy Azure resources.

    Bicep is an abstraction on top of Azure Resource Manager (ARM) templates to define Azure resources using declarative Infrastructure as Code.

    This article will show how you can deploy an Azure Logic App using Azure Bicep, a Domain Specific Language (DSL) for deploying Azure resources declaratively.


    • An Active Azure account: You can create an account for free.
    Azure Bicep is installed on your local machine.
    • Azure PowerShell. See: Install Azure PowerShell.
    • A resource group in your Azure subscription

    Let’s get started!

    Solution Overview

    We will author a Bicep template that creates an Azure Logic App.

    The solution will include the following files:
    • 📄 main.bicep: This is the Bicep template
    • 📄 azuredeploy.parameters.json: This parameter file contains the values to use for deploying your Bicep template.

    2. Azure Bicep Template — parameters

    Create a new file in your working directory and name it main.bicep . We will define the following parameters:

    @description('The name of the logic app to create.')
    param logicAppName string
    @description('A test URI')
    param testUri string = ''
    @description('Location for all resources.')
    param location string = resourceGroup().location
    1. Azure Bicep Template — variables
      We will define the following variables:
    var frequency = 'Hour'
    var interval = '1'
    var type = 'recurrence'
    var actionType = 'http'
    var method = 'GET'
    var workflowSchema = ''

    4. Azure Bicep Template — resources

    We will define the following resource:

    resource logicApp 'Microsoft.Logic/workflows@2019-05-01' = {
      name: logicAppName
      location: location
      tags: {
        displayName: logicAppName
      properties: {
        definition: {
          '$schema': workflowSchema
          contentVersion: ''
          parameters: {
            testUri: {
              type: 'string'
              defaultValue: testUri
          triggers: {
            recurrence: {
              type: type
              recurrence: {
                frequency: frequency
                interval: interval
          actions: {
            actionType: {
              type: actionType
              inputs: {
                method: method
                uri: testUri

    5. Parameters file

    Create a new file named azuredeploy.parameters.json. The code below shows the definition of the parameters file:

        "$schema": "",
        "contentVersion": "",
        "parameters": {
            "logicAppName": {
                "value": "azinsider-logicapp"

    6. Azure Bicep Template — Deployment

    We will use the command below to deploy our Bicep template:

    $date = Get-Date -Format "MM-dd-yyyy"
    $rand = Get-Random -Maximum 1000
    $deploymentName = "AzInsiderDeployment-"+"$date"+"-"+"$rand"
    New-AzResourceGroupDeployment -Name $deploymentName -ResourceGroupName azinsider_demo -TemplateFile .\main.bicep -TemplateParameterFile .\azuredeploy.parameters.json -c

    The image below shows the preview of the deployment:


    Then we will execute the deployment. The image below shows the deployment output:


    You can also verify the deployment using the Azure Portal:


    Source Code

    You can find the code of this solution in the following URL, feel free to contribute!

    Was this article helpful?