Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Separation of Concerns: Logic App from ARM Template
$subscriptionId = "[SUBSCRIPTION_ID]"
$resourceGroup = "[RESOURCE_GROUP]"
$resourceName = "[RESOURCE_NAME]"
$connectorName = "[CONNECTOR_NAME]"
$apiVersion = "2016-06-01"
# Read parameters.json, replace values, and convert it to PSObject
$param = (Get-Content parameters.json -Encoding UTF8 -Raw) `
-replace "{subscriptionId}", $subscriptionId `
-replace "{resourceGroup}", $resourceGroup `
-replace "{connectorName}", $connectorName `
-replace "{apiVersion}", $apiVersion | `
# Read definition.json and convert it to PSObject
$definition = Get-Content definition.json -Encoding UTF8 -Raw | `
# Get Logic App
$resource = Get-AzureRmResource `
-ResourceGroupName $resourceGroup `
-ResourceName $resourceName `
-ResourceType Microsoft.Logic/workflows
# Update Logic App
$resource.Properties.parameters = $param
$resource.Properties.definition = $definition
$resource | Set-AzureRmResource -Verbose -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.