Reputation: 113
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?
Upvotes: 0
Views: 560
Reputation: 8234
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:
Upvotes: 1