Logic App deployment using Azure Devops for workflows and connections

Sarita Singh 0 Reputation points
2024-03-05T11:35:36.0433333+00:00

Hello,

I’m having issues with deploying a Standard Logic App with ARM template.

I have one Logic app created where we have workflows which uses connections to Azure blob, sftp and key vault.

I want to deploy this logic app into an empty logic app using azure devops pipeline…

Please help me with the steps we need to follow to achieve this.

As of now i am attaching one workflow which uses Azure blob connection.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,864 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,151 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. hossein jalilian 7,280 Reputation points
    2024-03-10T00:16:09.68+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    This guide assumes that you already have an existing ARM template for your Logic App.

    1. Azure DevOps Pipeline: Create a new pipeline in Azure DevOps that uses your Git repository as the source.
    2. Add Deployment Task: Add a task to deploy your ARM template. You can use the "Azure Resource Group Deployment" task for this. Configure the task with your Azure subscription and resource group information. Point the Template location to the location of your ARM template in the repository.
    3. Handle Connections: Connections are usually stored as parameters in ARM templates. Make sure your ARM template includes the necessary parameters for connection strings or details. Store sensitive information (like secrets or connection strings) in Azure Key Vault and reference them in your ARM template.
    4. Secure Connection Strings: If your Logic App uses connections to Azure Blob, SFTP, or Key Vault, ensure that sensitive information is stored securely. Use Azure Key Vault to store secrets.
    5. Service Connection: In Azure DevOps, set up a service connection that has the necessary permissions to deploy resources to your Azure subscription.
    6. Pipeline Variables: Define pipeline variables to store sensitive information that your Logic App ARM template uses, such as connection strings.
    7. Use Variable Groups: Consider using Azure DevOps Variable Groups to store and manage variables across multiple pipelines.
    8. Trigger the Pipeline: Configure triggers for your pipeline to run automatically upon changes to the repository.
    9. Test and Monitor: Run the pipeline and monitor the deployment logs for any errors or issues.
    10. Key Vault References: Ensure that the Logic App ARM template references the values stored in Azure Key Vault. You can use Key Vault references like reference(variables('keyVaultName'), '2024-03-01', 'Secret', 'mySecret') in your parameters.
    11. Manage Connections in Logic App Designer: After deployment, open the Logic App in the Azure Portal, go to the Logic App Designer, and verify/update connections as needed.
    12. Parameterize Connections: If your Logic App workflows use connections, parameterize them in the ARM template, and pass the values during deployment.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments

  2. Suwarna S Kale 321 Reputation points
    2024-03-10T01:17:23.4733333+00:00

    Deploying an Azure Logic App using an ARM (Azure Resource Manager) template through an Azure DevOps pipeline is a common scenario. To handle any secrets (such as connection strings, keys, or passwords) securely using Azure Key Vault or other secure methods. Also, consider environment-specific parameters (dev, test, prod) and customize your pipeline accordingly. Below are the steps to achieve this:

    1. Create an ARM Template for Your Logic App: As you mentioned you have the ARM template created, make sure it defines your Logic App, including its workflows, connections, and other resources. The template should include the necessary configuration for your Azure blob connection, SFTP, and Key Vault.
    2. Set Up Your Azure DevOps Pipeline: In your Azure DevOps project, create a new pipeline. Choose the appropriate repository where your ARM template is stored (e.g., Git, Azure Repos, etc.).
    3. Define Your Pipeline Stages: Your pipeline should have at least two stages: Build Stage:
      In this stage, validate your ARM template, generate any necessary parameters files, and package your Logic App workflows.
      
      Use tasks like **`ARM Template Validation`**, **`Copy Files`**, and **`Publish Build Artifacts`**.
      
      Release Stage:
      In this stage, deploy your Logic App using the ARM template.
      
      Use tasks like **`Azure Resource Group Deployment`** or **`Azure PowerShell`**to deploy the template.
      
    4. Configure Service Connections: Set up a service connection in Azure DevOps to authenticate with your Azure subscription. Use either a service principal or managed identity for authentication. The service connection will be used during deployment.
    5. Add the ARM Template Deployment Task: In your release pipeline, add the Azure Resource Group Deployment task. Configure the task with the following information: Azure Subscription: Select the service connection you created. Resource Group: Specify the target resource group where you want to deploy the Logic App. Template Location: Choose the location of your ARM template (e.g., linked artifact or file path). Template Parameters: Provide the necessary parameters for your Logic App (if any).
    6. Trigger the Pipeline: Manually trigger the pipeline or set up a CI/CD trigger based on your requirements. The pipeline will validate, package, and deploy your Logic App using the ARM template.
    7. Monitor and Troubleshoot: Monitor the pipeline execution for any errors or warnings. Check the Azure portal for the deployed Logic App and verify its connections.
    8. Test Your Deployed Logic App: After successful deployment, test your Logic App to ensure that it works as expected. Trigger the workflows and verify that the connections (Azure blob, SFTP, Key Vault) are functioning correctly.

    If the above response help answer your question, please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution. Thanks 😊

    0 comments No comments

  3. Mike Urnun 9,811 Reputation points Microsoft Employee
    2024-03-22T22:38:46.7466667+00:00

    Hello @Sarita Singh - Thanks for reaching out, and engaging the MS Q&A community.

    If you haven't already come across it, I would point you to the following sample: https://github.com/Azure/logicapps/tree/master/azure-devops-sample

    In my own experience, it's often better & simpler to look for a working sample (that matches your scenario) provided by MSFT and build your project off of those samples. That way, you'll save a lot of time by leveraging a working solution with important groundwork configurations already done by folks who formally & officially support those features.

    In order to establish working DevOps for LA Standard on your own, you're looking at navigating Devops configs and building familiarity with the following products at the high level:

    • Logic Apps
    • Azure Functions
    • ARM deployment
    • Azure DevOps

    When we kind of "rush through" without building familiarity, the complexity can get quite gnarly for every error/issue you might hit and it'd require time-consuming troubleshooting work every time.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.