I have also found another pretty neat way how to update already existing LA in other resource groups. It might look a little messy, but when you do it for several times, you can do it much way faster than just always cloning LA. When you open LA and click on Code view
you need to notice that each LA structure is like in an example below. You can take all code in LA1 (resource group 1) from top till outputs
and copy paste it to new LA2 (resource group 2), but some changes needs to be done in LA2 the first time you do this:
- SomeActions - this will be copy pasted as is
- $connections - this must be left as is, it's a pointer to LA connection definition
- OtherParameters - this is your parameters that you will be passing to LA, so usually for different resource group you use different parameters, so keep this in mind and change accordingly if this is the case
- SomeTrigger - Usually you should leave it as it was defined in LA2.
- SomeConnection - the most important part is to make sure that in both LA you are using the same connection reference. If not the case, then retrieve the connection reference name from
SomeActions
part, and update the SomeConnection
, but leave connectionId
and connectionName
as it was defined in LA2, so only the connection name matches between both LA.
Next time you want to do an update you just take the code, and copy everything from top till outputs
.
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
...SomeActions
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
},
"OtherParameters": {
"defaultValue": "SomeValue",
"type": "String"
}
},
"triggers": {
"manual": {
"inputs": {
"schema": {
...SomeTrigger
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {
"$connections": {
"value": {
"SomeConnection": {
"connectionId": "SomeId",
"connectionName": "SomeName",
"id": "SomeId"
}
}
}
}
}