I cannot figure out how to define workflows within the arm template that successfully deploys a Logic App Standard of resource type/kind:
- "type": "Microsoft.Web/sites",
- "kind": "functionapp,workflowapp"
Logic App Standard requires an existing app service plan and a storage account as opposed to Consumption Logic App. I cannot find any reference or documentation on how define workflows to be created within the Logic App Standard. I have provided the logic app resource code snippet from the arm template below.
"resources": [
{
"apiVersion": "2019-08-01",
"name": "[parameters('logicAppName')]",
"type": "Microsoft.Web/sites",
"kind": "functionapp,workflowapp",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
"dependsOn": [],
"properties": {
"name": "[parameters('logicAppName')]",
"siteConfig": {
"appSettings": [
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~4"
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "node"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "~18"
},
{
"name": "AzureWebJobsStorage",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountName'),';AccountKey=',listKeys(resourceId(parameters('subscriptionId'),parameters('resourceGroup'),'Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2019-06-01').keys[0].value,';EndpointSuffix=','core.windows.net')]"
},
{
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountName'),';AccountKey=',listKeys(resourceId(parameters('subscriptionId'),parameters('resourceGroup'),'Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2019-06-01').keys[0].value,';EndpointSuffix=','core.windows.net')]"
},
{
"name": "WEBSITE_CONTENTSHARE",
"value": "clmslogicapp876a"
},
{
"name": "AzureFunctionsJobHost__extensionBundle__id",
"value": "Microsoft.Azure.Functions.ExtensionBundle.Workflows"
},
{
"name": "AzureFunctionsJobHost__extensionBundle__version",
"value": "[1.*, 2.0.0)"
},
{
"name": "APP_KIND",
"value": "workflowApp"
}
],
"cors": {},
"use32BitWorkerProcess": false,
"ftpsState": "FtpsOnly",
"netFrameworkVersion": "v6.0"
},
"clientAffinityEnabled": false,
"virtualNetworkSubnetId": "[variables('subnetForInjectionID')]",
"publicNetworkAccess": "Disabled",
"httpsOnly": true,
"serverFarmId": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('resourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
},
"identity": {
"type": "SystemAssigned"
}
}
]
All resources and sample templates refer to Consumption Logic Apps of resource type which I am not trying to deploy:
- "type" : "Microsoft.Logic/workflows"
Workflow definitions can be found in the azure portal as json under the </> Code tab. I have tried adding this .json workflow definitions within the Logic App Standard properties in a resources array and the arm template successfully deploys but there are no workflows in the logic app. With definitions of the workflows and a successful deploy I would expect there to be additional resources in the logic app once it is provisioned but the logic app deploys fine, and the workflow tab is empty.
Microsoft.Logic/workflowsis mainly suitable for consumption logic apps. There is no direct way to deploy a workflow inside a logic app standard using ARM templates. One way is to use deployment scripts available in ARM and the other approach is using bicep post deployment scripts.Your code should be modified similar to below by using ARM deployment PowerShell scripts:
Firstly, created a logic app standard resource first and then adding a workflow with the
Set-AzLogicappPowerShell command in the deployment scripts resource as shown below.Reference: Lekman's blog