-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy.json
134 lines (133 loc) · 5.37 KB
/
deploy.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"baseName": {
"defaultValue": "uploadfunction",
"type": "string",
"metadata": {
"description": "Name use as base-template to named the resources to be deployed in Azure."
}
},
"InputContainer": {
"type": "string",
"defaultValue": "inputs",
"metadata": {
"description": "Name of the storage account container to upload the file into."
}
}
},
"variables": {
"suffix": "[substring(toLower(uniqueString(resourceGroup().id, resourceGroup().location)),0,5)]",
"funcAppName": "[toLower(concat(parameters('baseName'), variables('suffix')))]",
"funcStorageAccountName": "[tolower(concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),16)), variables('suffix'), 'stg'))]",
"funcHhostingPlanName": "[concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),14)), variables('suffix'), 'plan')]",
"insightsAppName": "[concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),14)), variables('suffix'), '-meta')]"
},
"resources": [
{
"apiVersion": "2018-11-01",
"name": "[variables('funcAppName')]",
"type": "Microsoft.Web/sites",
"kind": "functionapp,linux",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('microsoft.insights/components/', variables('insightsAppName'))]",
"[concat('Microsoft.Web/serverfarms/', variables('funcHhostingPlanName'))]",
"[concat('Microsoft.Storage/storageAccounts/',variables('funcStorageAccountName'))]"
],
"properties": {
"name": "[variables('funcAppName')]",
"siteConfig": {
"appSettings": [
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~3"
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "node"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "10.14.1"
},
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(concat('microsoft.insights/components/', variables('insightsAppName')), '2015-05-01').InstrumentationKey]"
},
{
"name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"value": "[reference(concat('microsoft.insights/components/', variables('insightsAppName')), '2015-05-01').ConnectionString]"
},
{
"name": "AzureWebJobsStorage",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('funcStorageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts',variables('funcStorageAccountName')), '2019-06-01').keys[0].value,';EndpointSuffix=','core.windows.net')]"
},
{
"name": "InputContainer",
"value": "[parameters('InputContainer')]"
},
{
"name": "BlobStorageQS",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('funcStorageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts',variables('funcStorageAccountName')), '2019-06-01').keys[0].value,';EndpointSuffix=','core.windows.net')]"
},
{
"name": "WEBSITE_RUN_FROM_ZIP",
"value": "https://github.com/SoTrx/function-upload-to-blob/releases/latest/download/default.function-upload-to-blob.zip"
}
],
"use32BitWorkerProcess": false,
"linuxFxVersion": "Node|14"
},
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', variables('funcHhostingPlanName'))]",
"hostingEnvironment": "",
"clientAffinityEnabled": true
},
"resources": []
},
{
"apiVersion": "2019-08-01",
"name": "[variables('funcHhostingPlanName')]",
"type": "Microsoft.Web/serverfarms",
"location": "[resourceGroup().location]",
"kind": "app,linux",
"properties": {
"name": "[variables('funcHhostingPlanName')]",
"computeMode": "Dynamic",
"reserved": true
},
"sku": {
"Tier": "Dynamic",
"Name": "Y1"
}
},
{
"apiVersion": "2015-05-01",
"name": "[variables('insightsAppName')]",
"type": "microsoft.insights/components",
"location": "[resourceGroup().location]",
"kind": "",
"properties": {
"Application_Type": "web",
"ApplicationId": "[variables('funcAppName')]",
"Request_Source": "rest"
}
},
{
"apiVersion": "2019-06-01",
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('funcStorageAccountName')]",
"location": "[resourceGroup().location]",
"tags": {},
"sku": {
"name": "Standard_LRS"
},
"properties": {
"supportsHttpsTrafficOnly": true,
"minimumTlsVersion": "TLS1_2"
}
}
],
"outputs": {}
}