Parameter settings in Logic Apps

Kevin Bacas
Published by Kevin
Category : Azure / DevOps / Logic Apps VSTS
24/08/2020

The Azure Logic Apps online editor now includes a Parameters button. The aim of this article is to explore some of the possibilities this new feature offers. It can be used to declare parameters directly in the Logic App, which is very helpful for generating Logic Apps releases via release pipelines (including in Azure DevOps). Before this feature was implemented, the only way to make a Logic App configurable was to manually configure (using code) the settings in the ARM. Now you have the option to declare them directly from the Designer.

 

Using parameters

First of all, to declare a parameter, go to the Parameters tab under the relevant Logic App Designer:

 

Click on the tab, and a panel will appear on the right side of the Designer:

 

This will allow you to add as many parameters as you wish.

The parameter types available are:

  • Array
  • Boolean
  • Float
  • Int
  • Object
  • Secure Object
  • Secure String
  • String

 

Secure String and Secure Object can be used to store the values of these parameters in an Azure Key Vault. The following warning will appear if a default value is used for secure parameter types:

 

Logic App Export Template

Unfortunately, the Logic Apps Export Template does not yet handle Logic App parameters:

 

It can be seen here that there is just one parameter for the Logic App name in the ARM, and therefore no way to affect the value of the Logic App parameter via an ARM parameter file.

 

The LogicAppTemplateCreator solution

LogicAppTemplateCreator is a PowerShell module that can be used from the command line to extract the Logic App ARM and include it in a release process.
To install the module, I suggest you read the instructions found in the ReadMe file in the GitHub repository.

Once it is installed, we will export our Logic App:

 

We can now note the presence of two items in our ARM:

  • Parameter definition for the ARM
  • Parameter definition for the Logic App

 

The Logic App parameter is not defined in the same place as the ARM parameter. However, the Logic App parameter is based on the value supplied by the ARM parameters file. We can now affect the value during our release.

 

Conclusion

This new parameters feature of Logic App now means we can include variables that we can give values to at the time of the release. It is a major step forward to help us design compatible technical solutions in multi-environment contexts.