Set up DevOps deployment for single-tenant Azure Logic Apps

This article shows how to deploy a single-tenant based logic app project from Visual Studio Code to your infrastructure by using DevOps tools and processes. Based on whether you prefer GitHub or Azure DevOps for deployment, choose the path and tools that work best for your scenario. You can use the included samples that contain example logic app projects plus examples for Azure deployment using either GitHub or Azure DevOps. For more information about DevOps for single-tenant, review DevOps deployment overview for single-tenant Azure Logic Apps.

Prerequisites

Deploy infrastructure resources

If you haven't already set up a logic app project or infrastructure, you can use the following sample projects to deploy an example app and infrastructure, based on the source and deployment options you prefer to use:

Both samples include the following resources that a logic app uses to run.

Resource name Required Description
Logic App (Standard) Yes This Azure resource contains the workflows that run in single-tenant Azure Logic Apps.
Functions Premium or App Service hosting plan Yes This Azure resource specifies the hosting resources to use for running your logic app, such as compute, processing, storage, networking, and so on.

Important: In the current experience, the Logic App (Standard) resource requires the Workflow Standard hosting plan, which is based on the Functions Premium hosting plan.

Azure storage account Yes, for both stateful and stateless workflows This Azure resource stores the metadata, keys for access control, state, inputs, outputs, run history, and other information about your workflows.
Application Insights Optional This Azure resource provides monitoring capabilities for your workflows.
API connections Optional, if none exist These Azure resources define any managed API connections that your workflows use to run managed connector operations, such as Office 365, SharePoint, and so on.

Important: In your logic app project, the connections.json file contains metadata, endpoints, and keys for any managed API connections and Azure functions that your workflows use. To use different connections and functions in each environment, make sure that you parameterize the connections.json file and update the endpoints.

For more information, review API connection resources and access policies.

Azure Resource Manager (ARM) template Optional This Azure resource defines a baseline infrastructure deployment that you can reuse or export. The template also includes the required access policies, for example, to use managed API connections.

Important: Exporting the ARM template won't include all the related parameters for any API connection resources that your workflows use. For more information, review Find API connection parameters.

API connection resources and access policies

In single-tenant Azure Logic Apps, every managed or API connection resource in your workflows requires an associated access policy. This policy needs your logic app's identity to provide the correct permissions for accessing the managed connector infrastructure. The included sample projects include an ARM template that includes all the necessary infrastructure resources, including these access policies.

The following diagram shows the dependencies between your logic app project and infrastructure resources:

Conceptual diagram showing infrastructure dependencies for a logic app project in the single-tenant Azure Logic Apps model.

Find API connection parameters

If your workflows use managed API connections, using the export template capability won't include all related parameters. In an ARM template, every API connection resource definition has the following general format:

{
   "type": "Microsoft.Web/connections",
   "apiVersion": "2016–06–01",
   "location": "[parameters('location')]",
   "name": "[parameters('connectionName')]",
   "properties": {}
}

To find the values that you need to use in the properties object for completing the connection resource definition, you can use the following API for a specific connector:

GET https://management.azure.com/subscriptions/{subscription-ID}/providers/Microsoft.Web/locations/{location}/managedApis/{connector-name}?api-version=2016-06-01

In the response, find the connectionParameters object, which contains all the information necessary for you to complete resource definition for that specific connector. The following example shows an example resource definition for a SQL managed connection:

{
   "type": "Microsoft.Web/connections",
   "apiVersion": "2016–06–01",
   "location": "[parameters('location')]",
   "name": "[parameters('connectionName')]",
   "properties": {
      "displayName": "sqltestconnector",
      "api": {
         "id": "/subscriptions/{subscription-ID}/providers/Microsoft.Web/locations/{location}/managedApis/sql"
      },
      "parameterValues": {
         "authType": "windows", 
         "database": "TestDB",
         "password": "TestPassword",
         "server": "TestServer",
         "username": "TestUserName"
      }
   }
}

As an alternative, you can review the network trace for when you create a connection in the Logic Apps designer. Find the PUT call to the managed API for the connector as previously described, and review the request body for all the information you need.

Deploy logic app resources (zip deploy)

After you push your logic app project to your source repository, you can set up build and release pipelines that deploy logic apps to infrastructure inside or outside Azure.

Build your project

To set up a build pipeline based on your logic app project type, complete the corresponding actions listed in the following table:

Project type Description and steps
Nuget-based The NuGet-based project structure is based on the .NET Framework. To build these projects, make sure to follow the build steps for .NET Standard. For more information, review the Create a NuGet package using MSBuild documentation.
Bundle-based The extension bundle-based project isn't language-specific and doesn't require any language-specific build steps. You can use any method to zip your project files.

Important: Make sure that your .zip file contains the actual build artifacts, including all workflow folders, configuration files such as host.json, connections.json, and any other related files.

Release to Azure

To set up a release pipeline that deploys to Azure, choose the associated option for GitHub, Azure DevOps, or Azure CLI.

Note

Azure Logic Apps currently doesn't support Azure deployment slots.

For GitHub deployments, you can deploy your logic app by using GitHub Actions, for example, the GitHub Action in Azure Functions. This action requires that you pass through the following information:

  • The logic app name to use for deployment
  • The zip file that contains your actual build artifacts, including all workflow folders, configuration files such as host.json, connections.json, and any other related files.
  • Your publish profile, which is used for authentication
- name: 'Run Azure Functions Action'
  uses: Azure/functions-action@v1
  id: fa
  with:
   app-name: 'MyLogicAppName'
   package: 'MyBuildArtifact.zip'
   publish-profile: 'MyLogicAppPublishProfile'

For more information, review the Continuous delivery by using GitHub Action documentation.

Release to containers

If you containerize your logic app, deployment works mostly the same as any other container you deploy and manage.

For examples that show how to implement an end-to-end container build and deployment pipeline, review CI/CD for Containers.

Next steps

We'd like to hear about your experiences with the single-tenant Azure Logic Apps!