-
Notifications
You must be signed in to change notification settings - Fork 0
/
arm-template.json
117 lines (117 loc) · 4.45 KB
/
arm-template.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
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environment": {
"type": "string"
},
"location": {
"type": "string"
},
"pricingTier": {
"type": "string"
}
},
"variables": {
"environment": "[toLower(parameters('environment'))]",
"prefix": "[concat('safe-', variables('environment'))]",
"appServicePlan": "[concat(variables('prefix'), '-web-host')]",
"web": "[concat(variables('prefix'), '-web')]",
"storage": "[concat('safe', variables('environment'), 'storage')]",
"insights": "[concat(variables('prefix'), '-insights')]"
},
"resources": [
{
"type": "Microsoft.Insights/components",
"kind": "web",
"name": "[variables('insights')]",
"location": "[parameters('location')]",
"apiVersion": "2014-04-01",
"scale": null,
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', variables('web'))]": "Resource",
"displayName": "AppInsightsComponent"
},
"properties": {
"name": "[variables('insights')]"
}
},
{
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "Storage",
"name": "[variables('storage')]",
"apiVersion": "2017-10-01",
"location": "[parameters('location')]",
"tags": {}
},
{
"type": "Microsoft.Web/serverfarms",
"sku": {
"name": "[parameters('pricingTier')]"
},
"name": "[variables('appServicePlan')]",
"apiVersion": "2016-09-01",
"location": "[parameters('location')]",
"properties": {
"name": "[variables('appserviceplan')]",
"perSiteScaling": false,
"reserved": false
}
},
{
"type": "Microsoft.Web/sites",
"name": "[variables('web')]",
"apiVersion": "2016-08-01",
"location": "[parameters('location')]",
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlan'))]",
"siteConfig": {
"appSettings": [
{
"name": "public_path",
"value": "./public"
},
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(concat('Microsoft.Insights/components/', variables('insights'))).InstrumentationKey]"
},
{
"name": "STORAGE_CONNECTIONSTRING",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts/', variables('storage')), '2017-10-01').keys[0].value)]"
}
]
}
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('appServicePlan'))]",
"[resourceId('Microsoft.Storage/storageAccounts/', variables('storage'))]",
"[resourceId('Microsoft.Insights/components/', variables('insights'))]"
],
"resources": [
{
"apiVersion": "2016-08-01",
"name": "Microsoft.ApplicationInsights.AzureWebSites",
"type": "siteextensions",
"dependsOn": [
"[resourceId('Microsoft.Web/sites/', variables('web'))]"
],
"properties": {}
}
]
}
],
"outputs": {
"webAppName": {
"type": "string",
"value": "[variables('web')]"
},
"webAppPassword": {
"type": "string",
"value": "[list(resourceId('Microsoft.Web/sites/config', variables('web'), 'publishingcredentials'), '2014-06-01').properties.publishingPassword]"
}
}
}