top of page

Configuring Arm Templates (Deploying to different environments)

When developing around Azure, more specifically with Azure Logic Apps, Azure Functions, Azure API Management, and with almost no experience or none experience at all a good starting point it is using the browser.

This allows us to start doing our tasks, practising, testing and then deploying to a different environment.

I read many articles with different views of how to achieve this. Usually in any IT Company when we are developing we all need to use a source control tool, in this case it only applies to Microsoft Devops, and for some artifacts I think we need to be using Premium account.

I started the same way, I went to Azure Portal and created few Logic Apps to become proficient with the technology. Not to getting in here with a long story, I will cut things short now and if you need anything, comment in here or contact us.

Using Visual Studio and installing Azure extensions allowed me to start using my Visual Studio in conjunction with my TFS Online (Git in my case).

The reason of this post is more to have in mind a way to automate(not the focus of this post, but helps in terms of configuration) the deployment of the Resources to Azure.

Assumptions here:

  1. Use Visual Studio

  2. A resource group in Azure means an “Environment”

  3. Full automation of Deployment trough Azure Dev Ops

High level steps below:

  1. Created a Visual Studio ‘Azure Resource Group’ and used a Logic App template

  2. Created 2 files

  3. LogicApp.json

  4. LogicApp.parameters.json

  5. I changed the naming convention of the parameters file and created another file

  6. LogicApp.parameters.dev.json

  7. LogicApp.parameters.uat.json

  8. Opened the LogicApp.json design mode

  9. Configured with recurrence trigger

  10. Added an artifact ‘Initialize variable’ and set value to ‘Hello World’

  11. Opened the LogicApp.json as json file and configured the following:

  12. Inside the parameters node:

  13. “Environment”: { “type”: “string”, “defaultValue”: “Dev” }

  14. “LogicAppName”: { “type”: “string”, “defaultValue”: “[concat(‘MyLogicAPp-‘, parameters(‘Environment’))]” }

  15. In the LogicApp.parameters.dev.json inside the parameters node:

  16. “Environment”: { “type”: “string”, “value”: “Dev” }

  17. In the LogicApp.parameters.uat.json inside the parameters node:

  18. “Environment”: { “type”: “string”, “value”: “Uat” }

This is a personal option of deploying to different environments, but as i saw there are many ways of doing the same. Hope it is clear.

The result in terms of naming convention would be something like:

  1. Azure Resource Groups

  2. Dev

  3. Logic Apps

  4. MyLogicApp-Dev

  5. Uat

  6. Logic Apps

  7. MyLogicApp-Uat

Why this option? Because if you use Azure Dev Ops, you know for instance that navigating for example to Logic Apps area:

Without doing this naming convention the result would be something like.

Doing this naming convention the result would be something like.

If you have one or two logic apps that’s probably fine doing without appending the environment to the name, but honestly I found that working in larger projects using Azure this is actually beneficial.

Any additional information or help please don’t hesitate in contacting us.

Hope it helps.

0 views0 comments

Recent Posts

See All

CRM 365 - Customer field only show Accounts

On a customer field, if the requirement is to only show Accounts, please add this line to the OnLoad of the form: //Show only Account records when selecting the Customer formContext.getControl("cu

Execute Workflow Request on CRM 365 Cloud

Please find below an example of calling the Execute method to run a workflow on CRM 365 Cloud. let Id = formContext.data.entity.getId().replace('{', '').replace('}', ''); let request =

bottom of page