-
Notifications
You must be signed in to change notification settings - Fork 293
/
windows-webapp-template.json
169 lines (169 loc) · 6.94 KB
/
windows-webapp-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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webAppName": {
"type": "string"
},
"hostingPlanName": {
"type": "string"
},
"appInsightsLocation": {
"type": "string"
},
"databaseAccountId": {
"type": "string"
},
"databaseAccountLocation": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.Web/sites",
"name": "[parameters('webAppName')]",
"apiVersion": "2016-08-01",
"location": "[resourceGroup().location]",
"tags": {
"[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty"
},
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections', parameters('databaseAccountId'), 'sampledatabase', 'samplecollection')]"
],
"resources": [
{
"type": "siteextensions",
"name": "Microsoft.ApplicationInsights.AzureWebSites",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('webAppName'))]"
],
"properties": {
}
}
],
"properties": {
"siteConfig": {
"appSettings": [
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(resourceId('microsoft.insights/components/', parameters('webAppName')), '2015-05-01').InstrumentationKey]"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "14.16.0"
}
],
"phpVersion": "7.1"
},
"name": "[parameters('webAppName')]",
"serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"hostingEnvironment": ""
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"[resourceId('microsoft.insights/components/', parameters('webAppName'))]"
]
},
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2018-02-01",
"name": "[parameters('hostingPlanName')]",
"location": "[resourceGroup().location]",
"sku": {
"name": "P2v3",
"tier": "PremiumV3",
"size": "P2v3",
"family": "Pv3",
"capacity": 1
},
"kind": "app",
"properties": {
"perSiteScaling": false,
"maximumElasticWorkerCount": 1,
"isSpot": false,
"reserved": false,
"isXenon": false,
"hyperV": false,
"targetWorkerCount": 0,
"targetWorkerSizeId": 0
}
},
{
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases",
"apiVersion": "2020-06-01-preview",
"name": "[concat(parameters('databaseAccountId'), '/sampledatabase')]",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountId'))]"
],
"properties": {
"resource": {
"id": "sampledatabase"
},
"options": {}
}
},
{
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections",
"apiVersion": "2020-06-01-preview",
"name": "[concat(parameters('databaseAccountId'), '/sampledatabase/samplecollection')]",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/mongodbDatabases', parameters('databaseAccountId'), 'sampledatabase')]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountId'))]"
],
"properties": {
"resource": {
"id": "samplecollection",
"indexes": [
]
},
"options": {}
}
},
{
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings",
"apiVersion": "2020-06-01-preview",
"name": "[concat(parameters('databaseAccountId'), '/sampledatabase/samplecollection/default')]",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections', parameters('databaseAccountId'), 'sampledatabase', 'samplecollection')]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts/mongodbDatabases', parameters('databaseAccountId'), 'sampledatabase')]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountId'))]"
],
"properties": {
"resource": {
"throughput": 400
}
}
},
{
"type": "Microsoft.Insights/components",
"name": "[parameters('webAppName')]",
"apiVersion": "2014-04-01",
"location": "[parameters('appInsightsLocation')]",
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('webAppName'))]": "Resource"
},
"properties": {
"applicationId": "[parameters('webAppName')]",
"Request_Source": "AzureTfsExtensionAzureProject"
}
},
{
"apiVersion": "2015-04-08",
"kind": "MongoDB",
"type": "Microsoft.DocumentDb/databaseAccounts",
"name": "[parameters('databaseAccountId')]",
"location": "[parameters('databaseAccountLocation')]",
"properties": {
"databaseAccountOfferType": "Standard",
"name": "[parameters('databaseAccountId')]"
}
}
],
"outputs": {
"azureCosmosDBAccountKeys": {
"value": "[listConnectionStrings(concat('Microsoft.DocumentDb/databaseAccounts/', parameters('databaseAccountId')), '2015-04-08').connectionStrings[0].connectionString]",
"type": "string"
}
}
}