-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazuredeploy.json
106 lines (106 loc) · 4.09 KB
/
azuredeploy.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appName": {
"type": "String",
"defaultValue": "remindersapp",
"metadata": {
"description": "The name of the reminders app that you wish to create."
}
}
},
"variables": {
"location": "[resourceGroup().location]",
"nameSuffix": "[uniqueString(resourceGroup().id)]",
"uniqueAppName": "[if(greater(length(concat(parameters('appName'), variables('nameSuffix'))), 24), substring(concat(parameters('appName'), variables('nameSuffix')), 0, 24), concat(parameters('appName'), variables('nameSuffix')))]",
"functionAppName": "[concat(variables('uniqueAppName'), '-funcapp')]",
"functionAppHostingPlanName": "[if(greater(length(concat(variables('functionAppName'), '-plan')), 40), substring(concat(variables('functionAppName'), '-plan'), 0, 40), concat(variables('functionAppName'), '-plan'))]",
"storageAccountName": "[variables('uniqueAppName')]",
"applicationInsightsName": "[concat(variables('uniqueAppName'), '-appinsights')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2016-12-01",
"name": "[variables('storageAccountName')]",
"location": "[variables('location')]",
"sku": {
"name": "Standard_LRS"
},
"kind": "Storage",
"properties": {
"supportsHttpsTrafficOnly": true
}
},
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2018-02-01",
"name": "[variables('functionAppHostingPlanName')]",
"location": "[variables('location')]",
"sku": {
"name": "Y1",
"tier": "Dynamic"
},
"kind": "linux",
"properties": {
"name": "[variables('functionAppHostingPlanName')]",
"computeMode": "Dynamic",
"reserved": true
}
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2018-11-01",
"name": "[variables('functionAppName')]",
"location": "[variables('location')]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('functionAppHostingPlanName'))]"
],
"kind": "functionapp,linux",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('functionAppHostingPlanName'))]",
"siteConfig": {
"reserved": true
},
"httpsOnly": true
},
"resources": [
{
"type": "config",
"apiVersion": "2019-08-01",
"name": "appsettings",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('functionAppName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
"[resourceId('microsoft.insights/components', variables('applicationInsightsName'))]"
],
"properties": {
"AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')),'2015-05-01-preview').key1)]",
"FUNCTIONS_EXTENSION_VERSION": "~3",
"WEBSITE_NODE_DEFAULT_VERSION": "~12",
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('microsoft.insights/components/', variables('applicationInsightsName')), '2015-05-01').InstrumentationKey]",
"FUNCTIONS_WORKER_RUNTIME": "node"
}
}
]
},
{
"type": "microsoft.insights/components",
"apiVersion": "2018-05-01-preview",
"name": "[variables('applicationInsightsName')]",
"location": "East US",
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', variables('applicationInsightsName'))]": "Resource"
},
"properties": {
"ApplicationId": "[variables('applicationInsightsName')]",
"Request_Source": "IbizaWebAppExtensionCreate"
}
}
],
"outputs": {}
}