Reputation: 71
I am migrating Azure Logic Apps in Consumption model to Standard model. The present logic app json file defines variables
, some examples are given below:
"variables": {
"give_dev_when_test": "[if(equals(parameters('environment'), 't'), 'd', parameters('environment'))]",
"resource_name_prefix": "[concat('abc-', parameters('environment'), '-common')]",
"key_vault_name": "[concat('abc-', variables('give_dev_when_test'), '-common-kv')]"
}
I see in Standard Logic Apps we can define connections in connections.json which can reference parameters from parameters.json such as @parameters('P1')
. Parameters in turn can refer app settings such as @appsetting('S1')
.
Where should I move the variables defined in the existing Logic App to the Logic App Standard? I was thinking of moving them to either parameters or app settings. But in my preliminary experiments I see that parameters cannot refer other parameters within parameters.json and the same is true for app settings. Also both do not support expressions such as @concat(parameters('P1'), parameters('P2'))
. In this scenario what will be the recommended destination for all the variables (there are a lot of them) when migrating to Standard Logic Apps.
I do not want to move all the variables into the workflow itself and build their values there as it would make their code more complex.
Upvotes: 0
Views: 430
Reputation: 8254
AFAIK, this is not possible. Consider if your variable is dynamic and changes for every run, then you must include those variables in your workflow since the scope of the variable is confined to that particular run only. Else, If the variables you are trying to define are static and doesn't change throughout the run, then you can make use of parameters. However, you can only use those values and not update it.
However, if you are trying to migrate logic app from consumption plan to standard plan, then you can directly copy code view of consumption plan to standard plan logic app by adding "kind": "Stateful"
or "kind": "Stateless"
to your standard logic app.
Results:
Upvotes: 1