-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.json
99 lines (99 loc) · 3.66 KB
/
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
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"username": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "Admin username"
}
},
"password": {
"type": "securestring",
"metadata": {
"description": "Admin password"
}
},
"resourcePrefix": {
"type": "string",
"metadata": {
"description": "The string that prefixes all resources"
}
}
},
"variables": {
"resourcePrefix": "[if(empty(parameters('resourcePrefix')),concat(resourceGroup().name,'-cloud'),concat(parameters('resourcePrefix'),'-cloud'))]",
"storageAccountName": "[if(greater(length(replace(concat(variables('resourcePrefix'),'-sa'),'-','')),24),substring(replace(concat(variables('resourcePrefix'),'-sa'),'-',''),0,24),replace(concat(variables('resourcePrefix'),'-sa'),'-',''))]"
},
"resources": [
{
"name": "[concat(variables('resourcePrefix'),'-sql')]",
"type": "Microsoft.Sql/servers",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01-preview",
"dependsOn": [],
"tags": {},
"properties": {
"administratorLogin": "[parameters('username')]",
"administratorLoginPassword": "[parameters('password')]"
},
"resources": [
{
"name": "firewall-allow-azure",
"type": "firewallrules",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01-preview",
"dependsOn": [
"[concat(variables('resourcePrefix'),'-sql')]"
],
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "0.0.0.0"
}
}
]
},
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "storage-account"
},
"properties": {
"accountType": "Standard_LRS"
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices",
"apiVersion": "2019-04-01",
"name": "[concat(variables('storageAccountName'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountName'))]"
],
"properties": {
"cors": {
"corsRules": []
},
"deleteRetentionPolicy": {
"enabled": false
}
}
},
{
"name": "[concat(variables('storageAccountName'), '/default/game')]",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2018-07-01",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts',variables('storageAccountName'))]",
"[resourceId('Microsoft.Storage/storageAccounts/blobServices',variables('storageAccountName'), 'default')]"
],
"properties": {
"publicAccess": "Blob"
}
}
],
"outputs": {}
}