skip to Main Content

I have an Azure Logic App (Consumption). I have Dev version and I would like to deploy it to test and then to production.

So far I’ve been able to:

  • export the template from the portal
  • decompile it with bicep
  • add a parameter that changes some text in the logic app based on the deployment being test or dev
  • deploy to test

I was also able to connect with Visual Studio Code and change the code of the Logic App.

Where I’m stuck is on the template export part. How can I:

  • update the dev app
  • export the updated template from the dev app without going through the portal (e.g. being able to do it in visual studio)
  • decompile with bicep
  • deploy to test by keeping the condition on the text in the app based on the parameter (dev app VS test app).

Thank you.

2

Answers


  1. The command you are looking for is:

    az group export --name <resource-group-name>
    

    This will export everything in your specific resource group as a template.

    However this approach is not recommended for deploying resources into Azure. Using the export template feature is not a reliable way to turn pre-existing resources into templates that can be used in other environments.

    Ideally, you would create the bicep file from scratch and use that as your deployment into the dev environment. You would then use the same process that you are using above (have separate parameters for test) to deploy to higher environments using the original bicep file that you created.

    Login or Signup to reply.
  2. I highly suggest using this powershell module:

    https://github.com/jeffhollan/LogicAppTemplateCreator

    It gives you everything you need parameterized and its very easy to change values that differ from your environments (dev,test,prod etc)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search