-
Notifications
You must be signed in to change notification settings - Fork 178
Expand file tree
/
Copy pathdb-mssql.json
More file actions
124 lines (124 loc) · 5.02 KB
/
db-mssql.json
File metadata and controls
124 lines (124 loc) · 5.02 KB
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
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"moodleCommon": {
"metadata": {
"description": "Common Moodle values"
},
"type": "object"
},
"lbPubIp": {
"metadata": {
"description": "Public IP address of the deployed load balancer"
},
"type": "string"
},
"lbOut001PubIp": {
"metadata": {
"description": "Outgoing Public IP address of the deployed load balancer"
},
"type": "string"
},
"lbOut002PubIp": {
"metadata": {
"description": "Outgoing Public IP address of the deployed load balancer"
},
"type": "string"
},
"ctlrPubIp": {
"metadata": {
"description": "Public IP address of the deployed controller VM"
},
"type": "string"
},
"subnetIdDb": {
"metadata": {
"description": "Azure resource ID of the subnet where the Db is to be deployed.(if deployed in vnet)"
},
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.Sql/servers",
"apiVersion": "2015-05-01-preview",
"kind": "",
"location": "[parameters('moodleCommon').location]",
"name": "[parameters('moodleCommon').serverName]",
"properties": {
"administratorLogin": "[parameters('moodleCommon').dbLogin]",
"administratorLoginPassword": "[parameters('moodleCommon').dbLoginPassword]",
"version": "[parameters('moodleCommon').mssqlVersion]"
},
"resources": [
{
"apiVersion": "2014-04-01",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', parameters('moodleCommon').serverName)]"
],
"location": "[parameters('moodleCommon').location]",
"name": "mssql-firewall-allow-lb",
"properties": {
"startIpAddress": "[parameters('lbPubIp')]",
"endIpAddress": "[parameters('lbPubIp')]"
},
"type": "firewallRules"
},
{
"apiVersion": "2014-04-01",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', parameters('moodleCommon').serverName)]"
],
"location": "[parameters('moodleCommon').location]",
"name": "mssql-firewall-allow-lb-out001",
"properties": {
"startIpAddress": "[parameters('lbOut001PubIp')]",
"endIpAddress": "[parameters('lbOut001PubIp')]"
},
"type": "firewallRules"
},
{
"apiVersion": "2014-04-01",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', parameters('moodleCommon').serverName)]"
],
"location": "[parameters('moodleCommon').location]",
"name": "mssql-firewall-allow-lb-out002",
"properties": {
"startIpAddress": "[parameters('lbOut002PubIp')]",
"endIpAddress": "[parameters('lbOut002PubIp')]"
},
"type": "firewallRules"
},
{
"apiVersion": "2014-04-01",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', parameters('moodleCommon').serverName)]"
],
"location": "[parameters('moodleCommon').location]",
"name": "mssql-firewall-allow-ctlr",
"properties": {
"startIpAddress": "[parameters('ctlrPubIp')]",
"endIpAddress": "[parameters('ctlrPubIp')]"
},
"type": "firewallRules"
}
]
}
],
"outputs": {
"dbFQDN": {
"type": "string",
"value": "[reference(parameters('moodleCommon').serverName).fullyQualifiedDomainName]"
}
},
"variables": {
"documentation1": "This sub-template creates a mssql server. It expects certain values in the 'common' datastructure.",
"documentation10": " serverName - Mssql server name",
"documentation11": " mssqlVersion - Mssql version",
"documentation2": " administratorLogin - Mssql admin username",
"documentation3": " administratorLoginPassword - Mssql admin password",
"documentation4": " location - Mssql server location"
}
}