-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebapp-sql-template.json
146 lines (146 loc) · 4.61 KB
/
webapp-sql-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
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webAppName": {
"type": "string"
},
"hostingPlanName": {
"type": "string"
},
"sku": {
"type": "string",
"defaultValue": "Standard S1"
},
"databaseServerName": {
"type": "string"
},
"databaseUsername": {
"type": "string"
},
"databasePassword": {
"type": "securestring"
},
"databaseName": {
"type": "string"
},
"databaseEdition": {
"type": "string",
"defaultValue": "Basic"
}
},
"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"
},
"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": "6.9.1"
}
],
"phpVersion": "7.1"
},
"name": "[parameters('webAppName')]",
"serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"hostingEnvironment": ""
},
"dependsOn": [
"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"[resourceId('microsoft.insights/components/', parameters('webAppName'))]"
]
},
{
"type": "Microsoft.Web/serverfarms",
"sku": {
"Tier": "[first(skip(split(parameters('sku'), ' '), 1))]",
"Name": "[first(split(parameters('sku'), ' '))]"
},
"name": "[parameters('hostingPlanName')]",
"apiVersion": "2015-08-01",
"location": "[resourceGroup().location]",
"properties": {
"name": "[parameters('hostingPlanName')]",
"workerSizeId": "0",
"reserved": false,
"numberOfWorkers": "1",
"hostingEnvironment": ""
}
},
{
"type": "Microsoft.Insights/components",
"name": "[parameters('webAppName')]",
"apiVersion": "2014-04-01",
"location": "[resourceGroup().location]",
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('webAppName'))]": "Resource"
},
"properties": {
"applicationId": "[parameters('webAppName')]",
"Request_Source": "AzureTfsExtensionAzureProject"
}
},
{
"type": "Microsoft.Sql/servers",
"name": "[parameters('databaseServerName')]",
"apiVersion": "2014-04-01-preview",
"location": "[resourceGroup().location]",
"properties": {
"administratorLogin": "[parameters('databaseUsername')]",
"administratorLoginPassword": "[parameters('databasePassword')]",
"version": "12.0"
},
"resources": [
{
"type": "databases",
"name": "[parameters('databaseName')]",
"apiVersion": "2014-04-01-preview",
"location": "[parameters('databaseLocation')]",
"properties": {
"edition": "[parameters('databaseEdition')]",
"collation": "SQL_Latin1_General_CP1_CI_AS"
},
"dependsOn": [
"[concat('Microsoft.Sql/servers/', parameters('databaseServerName'))]"
]
},
{
"type": "firewallrules",
"name": "AllowAllWindowsAzureIps",
"apiVersion": "2014-04-01-preview",
"location": "[resourceGroup().location]",
"properties": {
"endIpAddress": "0.0.0.0",
"startIpAddress": "0.0.0.0"
},
"dependsOn": [
"[concat('Microsoft.Sql/servers/', parameters('databaseServerName'))]"
]
}
]
}
]
}