Skip to content

Commit c7d0d39

Browse files
committed
make connection between App services and SQL DB
1 parent 901a461 commit c7d0d39

File tree

1 file changed

+31
-23
lines changed

1 file changed

+31
-23
lines changed

cloudbread_deploy_without_notiHub.json

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
33
"contentVersion": "1.0.0.0",
44
"parameters": {
5+
"administratorLogin": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "The admin user of the SQL Server"
9+
}
10+
},
11+
"administratorLoginPassword": {
12+
"type": "securestring",
13+
"metadata": {
14+
"description": "The password of the admin user of the SQL Server"
15+
}
16+
},
17+
"databaseName": {
18+
"type": "string",
19+
"metadata": {
20+
"description": "The name of the new database to create."
21+
}
22+
},
23+
"storageName": {
24+
"type": "string",
25+
"metadata": {
26+
"description": "The name of the new database to create."
27+
}
28+
},
529
"skuName": {
630
"type": "string",
731
"defaultValue": "F1",
@@ -31,24 +55,6 @@
3155
"description": "Describes plan's instance count"
3256
}
3357
},
34-
"administratorLogin": {
35-
"type": "string",
36-
"metadata": {
37-
"description": "The admin user of the SQL Server"
38-
}
39-
},
40-
"administratorLoginPassword": {
41-
"type": "securestring",
42-
"metadata": {
43-
"description": "The password of the admin user of the SQL Server"
44-
}
45-
},
46-
"databaseName": {
47-
"type": "string",
48-
"metadata": {
49-
"description": "The name of the new database to create."
50-
}
51-
},
5258
"collation": {
5359
"type": "string",
5460
"defaultValue": "SQL_Latin1_General_CP1_CI_AS",
@@ -135,8 +141,8 @@
135141
"sqlserverName": "[concat('sqlserver-', uniqueString(resourceGroup().id))]",
136142
"cacheName": "[concat('cache-', uniqueString(resourceGroup().id))]",
137143
"adminWebName": "[concat('CBAdminWeb-', uniqueString(resourceGroup().id))]",
138-
"storageName": "[concat('STORAGE_', uniqueString(resourceGroup().id))]",
139-
"socketName": "[concat('CBSocket-', uniqueString(resourceGroup().id))]"
144+
"socketName": "[concat('CBSocket-', uniqueString(resourceGroup().id))]",
145+
"storageAccountId": "[concat(resourceGroup().id,'/providers/Microsoft.Storage/storageAccounts/', parameters('storageName'))]"
140146
},
141147
"resources": [
142148
{ // SQL Server
@@ -235,7 +241,7 @@
235241
"type": "SQLServer"
236242
},
237243
"CloudBreadStorageConString": {
238-
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)",
244+
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageName'),';AccountKey=',concat(listKeys(variables('storageAccountId'),'2015-05-01-preview').key1))]",
239245
"type": "Custom"
240246
}
241247
}
@@ -249,7 +255,9 @@
249255
"[concat('Microsoft.Cache/Redis/', variables('cacheName'))]"
250256
],
251257
"properties": {
252-
"CacheConnection": "[concat(variables('cacheName'),'.redis.cache.windows.net,abortConnect=false,ssl=true,password=', listKeys(resourceId('Microsoft.Cache/Redis', variables('cacheName')), '2015-08-01').primaryKey)]"
258+
"CloudBreadSocketRedisServer": "[concat(variables('cacheName'),'.redis.cache.windows.net,abortConnect=false,ssl=true,password=', listKeys(resourceId('Microsoft.Cache/Redis', variables('cacheName')), '2015-08-01').primaryKey)]",
259+
"CloudBreadRankRedisServer":"[concat(variables('cacheName'),'.redis.cache.windows.net,abortConnect=false,ssl=true,password=', listKeys(resourceId('Microsoft.Cache/Redis', variables('cacheName')), '2015-08-01').primaryKey)]",
260+
"CloudBreadGameLogRedisServer":"[concat(variables('cacheName'),'.redis.cache.windows.net,abortConnect=false,ssl=true,password=', listKeys(resourceId('Microsoft.Cache/Redis', variables('cacheName')), '2015-08-01').primaryKey)]"
253261
}
254262
}
255263
]
@@ -292,7 +300,7 @@
292300
"resources": []
293301
},
294302
{ // Storage Accounts
295-
"name": "[variables('storageName')]",
303+
"name": "[parameters('storageName')]",
296304
"type": "Microsoft.Storage/storageAccounts",
297305
"location": "[resourceGroup().location]",
298306
"apiVersion": "2015-06-15",

0 commit comments

Comments
 (0)