Can Azure Logic Apps be version controlled?

Yes, Azure Logic Apps can be version-controlled using different approaches, ensuring that changes are tracked, managed, and deployed efficiently. Here’s how you can do it:

1. Use Azure Logic Apps Versioning (Built-in)

Azure Logic Apps automatically saves previous versions whenever a change is made.

How to Access Version History :
  1. In the Azure Portal, go to your Logic App.
  2. Click on Versions in the left panel.
  3. You can view, restore, or promote previous versions.
Pros :
  • Simple and built-in.
  • Can restore previous versions easily.
Cons :
  • Limited to Azure Portal, lacks full Git-style branching and merging.

2. Store Logic Apps in Source Control (GitHub, Azure DevOps)

You can export Logic Apps as JSON-based ARM templates or Logic App Standard (Code View) and commit them to a Git repository.

Steps for Version Control in Git :
  1. Download Logic App Code
    • In Azure Portal, navigate to the Logic App and switch to "Code View".
    • Copy the workflow definition (JSON) or export it as an ARM template.
  2. Commit to GitHub / Azure DevOps
    • Store the JSON file in a Git repository.
    • Use Git features like branches, pull requests, and history tracking.
  3. Automate CI/CD (Optional)
    • Use Azure DevOps Pipelines or GitHub Actions to deploy Logic Apps.
    • Automate deployment using ARM templates or bicep.
Pros :
  • Full Git version control.
  • Enables collaboration, branching, and automated deployments.
Cons :
  • Requires additional setup and automation.

3. Use Logic Apps Standard (Code-based Approach)

For Logic Apps (Standard) (instead of the default Consumption plan), you can store the workflow as code in a repository.

Key Features :
  • Logic Apps Standard allows local development using Visual Studio Code.
  • Workflows are stored as YAML/JSON files, making them easy to version control.
  • Supports DevOps practices like pull requests, code reviews, and CI/CD.
Best for :
  • Advanced DevOps users who need strong versioning and CI/CD workflows.

Which Approach to Choose?
Scenario Recommended Approach
Simple versioning in Azure Portal Built-in Version History
Need Git-based version control Store Logic App JSON in GitHub/Azure DevOps
Need full code-based control & DevOps Logic Apps Standard with Visual Studio Code