I'm currently working on a project where I need to implement Infrastructure as Code (IaC) for an Azure Standard Logic App, specifically its workflow. I've designed the workflow using the Logic App Designer and downloaded the `workflow.json`. However, I find myself struggling to deploy this effectively as IaC. I've attempted using the ARM/Bicep export option, but the generated templates often lead to errors when run.
I'm looking for trustworthy methods to deploy Standard Logic App workflows in an IaC pipeline, whether it's through ARM, Bicep, or Terraform. Ideally, I'd like this process to be reusable and version-controlled. Any best practices or tools you can recommend would be super helpful!
4 Answers
You might want to try using Visual Studio Code with GitHub Copilot to generate your deployment files. Just specify whether you want to use ARM, Bicep, or Terraform, and the Azure extension will tailor it to your tenant. It could save you heaps of time!
In our setup, we treat Logic App workflow deployment like deploying a Web App. We use Azure DevOps tasks for this: first, we archive the files, then use Azure PowerShell to deploy the Logic App. In the PowerShell task, we implement `Publish-AzWebApp`. It works quite smoothly!
If you want to deploy using Terraform, consider separating your infrastructure and Logic App workflows into distinct pipelines. It keeps things organized and easier to manage. Just think of it like deploying to an App Service, keeping them in separate steps.
I found a useful readme for converting an exported Logic App template into an ARM template that you can reuse. It includes a PowerShell script and some manual instructions. Personally, I automated this with a Python script that has a few tweaks. You might want to check it out [here](https://github.com/Azure/Azure-Sentinel/blob/master/Playbooks/ReadMe.md).
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String