Highlight

Exporting workflows is a most natural step for logic app developers. But what to use, and what NOT to use?

Intro

Almost anyone starting with logic app workflows will sooner or later export their workflow. This is because

  1. You started developing in Azure Portal
  2. You’ve build logic apps in consumption, but need to move to standard SKU workflows
  3. You need to move your development to local environment with Visual Studio Code
  4. You need to move your workflows accross environments, be it manually or via CICD

So, how do you do it? Here’s how…

Options

In order to export logic apps you can use one of the following

  1. Azure Portal Code Designer - copy-paste the code into another logic app
  2. Azure Portal Export ARM template - export entire logic app as an ARM template
  3. Jeff Holan’s Logic App Template Creator - as above, exports logic app as an ARM template
  4. Visual Studio Code Logic App Export Utility - exports entire logic app as an ARM template

Which one to use?

Azure Portal Code Designer

This one is bad. While initially I’ve seen some people do it this way, it is a flawed approach by design because

  1. Doesn’t export API connection objects
  2. Code references API connections of logic apps with hardcoded resoruce IDs so you need to create new connections or update resoruce IDs manually
    • Updating connections manually might also lead to many orphaned API connections because creating new connection, creates an entirely new Azure resource
  3. It’s very error prone
  4. Misses a lot of external settings, just moves workflow logic
  5. Time consuming

In short don’t use this method.

Azure Portal Export ARM template

This is a one of these “one step forward, two steps back” thing. While it does export logic apps and their setting as it’s still a flawed approach because

  1. Exported API connections have incorrect parameters in the ARM template, you will need to look these up yourself and update ARM template every time manually
  2. Exported Logic Apps code is not very readable, there is a lot more exported that you need which makes updating the ARM templates a hassle
  3. Exported template lacks proper parametrization

In short don’t use this method.

Jeff Holan’s Logic App Template Creator

This one I’ve found by googling around a bit. And surprisingly became my staple method for exporting Logic Apps in Consumption Tier

Jeff Hollan’s Github Project can be found here https://github.com/jeffhollan/LogicAppTemplateCreator

There are three very very cool things about this

  1. It is an open-source project so you can not only use and review it freely, but you can also contribute to it
  2. It’s available to be complied into .exe file so you can run it anywhere, including linux sicne it uses .NET core
  3. There is a powershell command available which can be imported into your local machine or devops to perform CICD

There is only one disadvantage to this

  1. It doesn’t work with Logic Apps Standard SKU

In short use this method for consumption logic apps manual exports & CICD.

Visual Studio Code Logic App Export Utility

Recently Microsoft added a support for Logic Apps Extensions for exporting logic apps.

This is great for many reasons like

  1. It works out of the box after installing Logic Apps extensions in VS Code
  2. No extra setup required
  3. Works with consumption and standard logic apps

But there is one drawback here

  1. It doesn’t work for CICD since it’s just local VS Code extension, so you can’t use it for your CICD

In short use this method for consumption logic apps manual exports.

What if I need CICD for Logic Apps Standard SKU?

Don’t worry, just check my post how I approach this. Link

Summary

Which is the method that you use? did you try and disagree, or maybe you’ve found a better way to approach logic apps exports? If so, let me know!

Adam Marczak

Programmer, architect, trainer, blogger, evangelist are just a few of my titles. What I really am, is a passionate technology enthusiast. I take great pleasure in learning new technologies and finding ways in which this can aid people every day. My latest passion is running an Azure 4 Everyone YouTube channel, where I show that Azure really is for everyone!

Did you enjoy the article?

Share it!

More tagged posts