Jorge
Jorge

Reputation: 113

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?

Upvotes: 0

Views: 560

Answers (1)

SwethaKandikonda
SwethaKandikonda

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:

  1. Set-AzLogicApp
  2. How to set azure logic app definition using powershell

Upvotes: 1

Related Questions