Skip to content

Instantly share code, notes, and snippets.

@RutgerAlbers
Last active July 8, 2020 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RutgerAlbers/3ffd14e450ca0c75b08f53e4ed35b3a4 to your computer and use it in GitHub Desktop.
Save RutgerAlbers/3ffd14e450ca0c75b08f53e4ed35b3a4 to your computer and use it in GitHub Desktop.
Generic ARM template for Logic App in an Integrated Service Environment
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountResourceName": {
"type": "string",
"minLength": 1
},
"iseName": {
"type": "string",
"minLength": 1
},
"iseResourceGroup": {
"type": "string",
"minLength": 1
}
},
"variables": {
"storageAccountBlobApiConnectionName": "storageAccountBlobApiConnectionName"
},
"resources": [
{
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"location": "[resourceGroup().location]",
"name": "[variables('storageAccountBlobApiConnectionName')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountResourceName'))]"
],
"tags": {
"displayName": "Blob API Connection"
},
"properties": {
"api": {
"id": "[concat(resourceId(parameters('iseResourceGroup'),'Microsoft.Logic/integrationServiceEnvironments/',parameters('iseName')),'/managedApis/azureblob')]"
},
"displayName": "[variables('storageAccountBlobApiConnectionName')]",
"parameterValues": {
"accountName": "[parameters('storageAccountResourceName')]",
"accessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountResourceName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value]"
}
}
}
],
"outputs": {
"storageAccountBlobApiConnectionName": {
"type": "string",
"value": "[variables('storageAccountBlobApiConnectionName')]"
}
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logAnalyticsWorkspaceId": {
"type": "string",
"minLength": 3,
"metadata": {
"description": "Id of the OMS Log Analytics workspace to which the resource should send its loggings."
}
},
"iseName": {
"type": "string",
"minLength": 1
},
"iseResourceGroup": {
"type": "string",
"minLength": 1
}
},
"variables": {
"logicAppResourceName": "LogicAppName"
},
"resources": [
{
"type": "Microsoft.Logic/workflows",
"name": "[variables('logicAppResourceName')]",
"apiVersion": "2017-07-01",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "LogicApp"
},
"properties": {
"state": "Enabled",
"integrationServiceEnvironment": {
"name": "[parameters('iseName')]",
"id": "[resourceId(parameters('iseResourceGroup'),'Microsoft.Logic/integrationServiceEnvironments/',parameters('iseName'))]",
"type": "Microsoft.Logic/integrationServiceEnvironments"
},
"definition": {
},
"parameters": {
"$connections": {
"value": {
}
}
},
"accessControl": {
}
},
"resources": [
{
"type": "providers/diagnosticSettings",
"name": "Microsoft.Insights/service",
"dependsOn": [
"[resourceId('Microsoft.Logic/workflows', variables('logicAppResourceName'))]"
],
"apiVersion": "2015-07-01",
"properties": {
"workspaceId": "[parameters('logAnalyticsWorkspaceId')]",
"logs": [
{
"category": "WorkflowRuntime",
"enabled": true,
"retentionPolicy": {
"days": 0,
"enabled": false
}
}
],
"metrics": [
{
"timeGrain": "PT1M",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
]
}
}
]
}
],
"outputs": {
"resourceName": {
"type": "string",
"value": "[variables('logicAppResourceName')]"
}
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"iseName": {
"type": "string",
"minLength": 1
},
"iseResourceGroup": {
"type": "string",
"minLength": 1
},
"networkAccessList": {
"type": "array",
"minLength": 1
}
},
"variables": {
"storageAccountResourceName": "storageAccountName"
},
"resources": [
{
"name": "[variables('storageAccountResourceName')]",
"type": "Microsoft.Storage/storageAccounts",
"location": "[resourceGroup().location]",
"apiVersion": "2018-07-01",
"dependsOn": [
],
"tags": {
"displayName": "Storage Account"
},
"sku": {
"name": "Standard_LRS"
},
"kind": "StorageV2",
"properties": {
"integrationServiceEnvironment": {
"name": "[parameters('iseName')]",
"id": "[resourceId(parameters('iseResourceGroup'),'Microsoft.Logic/integrationServiceEnvironments/',parameters('iseName'))]",
"type": "Microsoft.Logic/integrationServiceEnvironments"
},
"networkAcls": {
"bypass": "AzureServices",
"copy": [
{
"name": "virtualNetworkRules",
"count": "[length(parameters('networkAccessList'))]",
"input": {
"id": "[parameters('networkAccessList')[copyIndex('virtualNetworkRules')]]",
"action": "Allow",
"state": "Succeeded"
}
}
],
"ipRules": [
],
"defaultAction": "Deny",
"supportsHttpsTrafficOnly": true,
"encryption": {
"services": {
"file": {
"enabled": true
},
"blob": {
"enabled": true
}
},
"keySource": "Microsoft.Storage"
},
"accessTier": "Hot"
}
},
"resources": [
{
"name": "default/exampleContainerName",
"type": "blobServices/containers",
"apiVersion": "2018-03-01-preview",
"properties": {
"publicAccess": "Blob"
},
"dependsOn": [
"[variables('storageAccountResourceName')]"
]
}
]
}
],
"outputs": {
"resourceId": {
"type": "string",
"value": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountResourceName'))]"
},
"resourceName": {
"type": "string",
"value": "[variables('storageAccountResourceName')]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment