'Azure Logic App not updated in destination Resource Group (PowerShell)
I am trying to deploy an existing Logic App from a source Resource Group to a destination Resource Group via PowerShell:
New-AzResourceGroupDeployment -ResourceGroupName <DestinationResourceGroup> -TemplateFile <TemplateFile> -TemplateParameterFile <ParametersFile>
The deployment is "sucessful" but the destination LogicApp is not getting updated
Is there any way to update the Logic App in the destination Resource Group? Do I have to delete and create it again every time?
Solution 1:[1]
Here are a few workarounds that you can try
WAY-1 To use Set-AzLogicApp which modifies a logic app in a resource group.
Set-AzLogicApp -ResourceGroupName <YOURRESOURCEGROUP> -Name <YOURLOGICAPP> -DefinitionFilePath <PATHOFYOURDEFINITIONFILE> -ParameterFilePath <PATHOFYOURPARAMETERFILE>
WAY-2
You can store the ARM template in a variable and use in Set-AzLogicApp
$json = '{
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {}
}'
Set-AzLogicApp -ResourceGroupName <YOURRESOURCEGROUPNAME> -ResourceName <YOURLOGICAPPNAME> -Definition $json
WAY-3 Just copy and paste your code view everytime after successful run.
REFERENCES:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | SwethaKandikonda-MT |
