-
Notifications
You must be signed in to change notification settings - Fork 4
/
arm-template.json
132 lines (132 loc) · 4.22 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appNamePrefix": {
"type": "string",
"minLength": 1,
"defaultValue": "node-linux"
},
"skuName": {
"type": "string",
"defaultValue": "S1",
"allowedValues": [
"D1",
"F1",
"B1",
"B2",
"B3",
"S1",
"S2",
"S3",
"P1",
"P2",
"P3",
"P1V2",
"P2V2",
"P3V2",
"I1",
"I2",
"I3",
"Y1",
"EP1",
"EP2",
"EP3"
],
"metadata": {
"description": "Describes plan's pricing tier and capacity. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/"
}
},
"skuTier": {
"type": "string",
"defaultValue": "Standard",
"metadata": {
"description": "Sku-tier. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/"
}
}
},
"variables": {
"hostingPlanName": "[concat('HostingPlan-', parameters('appNamePrefix'))]",
"webSiteName": "[concat('App-', parameters('appNamePrefix'))]",
"appInsightsName": "[concat('AppInsights-', parameters('appNamePrefix'))]",
"linuxFxVersion": "NODE|14-lts",
"appStartCommand": "npm run start"
},
"resources": [
{
"apiVersion": "2016-08-01",
"name": "[variables('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"kind": "linux",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]",
"[resourceId('microsoft.insights/components/', variables('appInsightsName'))]"
],
"properties": {
"name": "[variables('webSiteName')]",
"serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('hostingPlanName'))]",
"clientAffinityEnabled": false,
"siteConfig": {
"linuxFxVersion": "[variables('linuxFxVersion')]",
"alwaysOn": false,
"appCommandLine": "[variables('appStartCommand')]",
"appSettings": [
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(concat('microsoft.insights/components/', variables('appInsightsName')), '2015-05-01').InstrumentationKey]"
},
{
"name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"value": "[reference(concat('microsoft.insights/components/', variables('appInsightsName')), '2015-05-01').InstrumentationKey]"
},
{
"name": "ApplicationInsightsAgent_EXTENSION_VERSION",
"value": "~3"
}
]
}
}
},
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2016-09-01",
"name": "[variables('hostingPlanName')]",
"location": "[resourceGroup().location]",
"sku": {
"Tier": "[parameters('skuTier')]",
"Name": "[parameters('skuName')]"
},
"kind": "linux",
"properties": {
"name": "[variables('hostingPlanName')]",
"reserved": true,
"workerSizeId": 1,
"numberOfWorkers": "1"
}
},
{
"type": "microsoft.insights/components",
"apiVersion": "2015-05-01",
"name": "[variables('appInsightsName')]",
"location": "[resourceGroup().location]",
"kind": "web",
"properties": {
"ApplicationId": "[variables('webSiteName')]",
"Application_Type": "web"
}
},
{
"type": "Microsoft.Web/sites/slots",
"apiVersion": "2018-02-01",
"name": "[concat(variables('webSiteName'), '/staging')]",
"location": "[resourceGroup().location]",
"kind": "app",
"dependsOn": ["[resourceId('Microsoft.Web/sites/', variables('webSiteName'))]"],
"properties": {
"enabled": true,
"serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', variables('hostingPlanName'))]"
}
}
]
}