1
1
{
2
- "$schema" : " https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#" ,
3
- "contentVersion" : " 1.0.0.0" ,
4
- "parameters" : {
5
- "serverName" : {
6
- "type" : " string" ,
7
- "defaultValue" : " [concat('nsc-sqlsrv-', resourceGroup().location, '-acbc')]" ,
8
- "metadata" : {
9
- "description" : " The name of the SQL logical server."
10
- }
11
- },
12
- "location" : {
13
- "type" : " string" ,
14
- "defaultValue" : " westus2" ,
15
- "metadata" : {
16
- "description" : " Location for all resources."
17
- }
18
- },
19
- "administratorLogin" : {
20
- "type" : " string" ,
21
- "metadata" : {
22
- "description" : " The administrator username of the SQL logical server."
23
- }
24
- },
25
- "administratorLoginPassword" : {
26
- "type" : " securestring" ,
27
- "metadata" : {
28
- "description" : " The administrator password of the SQL logical server."
29
- }
30
- },
31
- "allowAzureIPs" : {
32
- "defaultValue" : true ,
33
- "type" : " bool" ,
34
- "metadata" : {
35
- "description" : " Allow Azure services to access server."
36
- }
37
- }
38
- },
39
- "variables" : {},
40
- "resources" : [
41
- {
42
- "type" : " Microsoft.Sql/servers" ,
43
- "apiVersion" : " 2020-02-02-preview" ,
44
- "name" : " [parameters('serverName')]" ,
45
- "location" : " [parameters('location')]" ,
46
- "properties" : {
47
- "administratorLogin" : " [parameters('administratorLogin')]" ,
48
- "administratorLoginPassword" : " [parameters('administratorLoginPassword')]" ,
49
- "version" : " 12.0" ,
50
- "publicNetworkAccess" : " Enabled"
51
- }
52
- },
2
+ "$schema" : " https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#" ,
3
+ "contentVersion" : " 1.0.0.0" ,
4
+ "parameters" : {
5
+ "serverName" : {
6
+ "type" : " string" ,
7
+ "defaultValue" : " [concat('nsc-sqlsrv-dev-', resourceGroup().location, '-thursday')]" ,
8
+ "metadata" : {
9
+ "description" : " The name of the SQL logical server."
10
+ }
11
+ },
12
+ "location" : {
13
+ "type" : " string" ,
14
+ "defaultValue" : " westus2" ,
15
+ "metadata" : {
16
+ "description" : " Location for all resources."
17
+ }
18
+ },
19
+ "administratorLogin" : {
20
+ "type" : " string" ,
21
+ "metadata" : {
22
+ "description" : " The administrator username of the SQL logical server."
23
+ }
24
+ },
25
+ "administratorLoginPassword" : {
26
+ "type" : " securestring" ,
27
+ "metadata" : {
28
+ "description" : " The administrator password of the SQL logical server."
29
+ }
30
+ },
31
+ "allowAzureIPs" : {
32
+ "defaultValue" : true ,
33
+ "type" : " bool" ,
34
+ "metadata" : {
35
+ "description" : " Allow Azure services to access server."
36
+ }
37
+ },
38
+ "sqlDBName" : {
39
+ "type" : " string" ,
40
+ "defaultValue" : " [concat('nsc-sqldb-dev-', resourceGroup().location, '-thursday')]" ,
41
+ "metadata" : {
42
+ "description" : " The name of the SQL Database."
43
+ }
44
+ },
45
+ "createdBy" : {
46
+ "type" : " string" ,
47
+ "metadata" : {
48
+ "description" : " Indicate who is creating the resource."
49
+ }
50
+ },
51
+ "creatorsEmail" : {
52
+ "type" : " string" ,
53
+ "metadata" : {
54
+ "description" : " Indicate creator's email address."
55
+ }
56
+ },
57
+ "resourceTags" : {
58
+ "type" : " object" ,
59
+ "defaultValue" : {
60
+ "NCSYear" : 2021 ,
61
+ "NSCCohort" : " Thursday" ,
62
+ "Owner" : " [parameters('createdBy')]" ,
63
+ "OwnerEmail" : " [parameters('creatorsEmail')]"
64
+ }
65
+ }
66
+ },
67
+ "variables" : {},
68
+ "resources" : [
53
69
{
54
- "type" : " Microsoft.Sql/servers/auditingPolicies " ,
55
- "apiVersion" : " 2014-04-01 " ,
56
- "name" : " [concat( parameters('serverName'), '/Default ')]" ,
70
+ "type" : " Microsoft.Sql/servers" ,
71
+ "apiVersion" : " 2020-02-02-preview " ,
72
+ "name" : " [parameters('serverName')]" ,
57
73
"location" : " [parameters('location')]" ,
58
- "dependsOn" : [
59
- " [resourceId('Microsoft.Sql/servers', parameters('serverName'))]"
60
- ],
74
+ "tags" : " [parameters('resourceTags')]" ,
61
75
"properties" : {
62
- "auditingState" : " Disabled"
76
+ "administratorLogin" : " [parameters('administratorLogin')]" ,
77
+ "administratorLoginPassword" : " [parameters('administratorLoginPassword')]" ,
78
+ "version" : " 12.0" ,
79
+ "publicNetworkAccess" : " Enabled"
63
80
}
64
81
},
65
82
{
66
- "type" : " Microsoft.Sql/servers/firewallRules" ,
67
- "condition" : " [parameters('allowAzureIPs')]" ,
68
- "apiVersion" : " 2015-05-01-preview" ,
69
- "name" : " [concat(parameters('serverName'), '/AllowAllWindowsAzureIps')]" ,
83
+ "type" : " Microsoft.Sql/servers/databases" ,
84
+ "apiVersion" : " 2020-08-01-preview" ,
85
+ "name" : " [concat(parameters('serverName'), '/', parameters('sqlDBName'))]" ,
86
+ "location" : " [parameters('location')]" ,
87
+ "sku" : {
88
+ "name" : " Standard" ,
89
+ "tier" : " Standard"
90
+ },
91
+ "tags" : " [parameters('resourceTags')]" ,
70
92
"dependsOn" : [
71
93
" [resourceId('Microsoft.Sql/servers', parameters('serverName'))]"
72
- ],
73
- "properties" : {
74
- "startIpAddress" : " 0.0.0.0" ,
75
- "endIpAddress" : " 0.0.0.0"
76
- }
94
+ ]
77
95
},
78
96
{
79
- "type" : " Microsoft.Sql/servers/securityAlertPolicies " ,
80
- "apiVersion" : " 2020-02-02-preview " ,
97
+ "type" : " Microsoft.Sql/servers/auditingPolicies " ,
98
+ "apiVersion" : " 2014-04-01 " ,
81
99
"name" : " [concat(parameters('serverName'), '/Default')]" ,
100
+ "location" : " [parameters('location')]" ,
82
101
"dependsOn" : [
83
102
" [resourceId('Microsoft.Sql/servers', parameters('serverName'))]"
84
103
],
104
+ "tags" : " [parameters('resourceTags')]" ,
85
105
"properties" : {
86
- "state " : " Enabled "
106
+ "auditingState " : " Disabled "
87
107
}
88
- }
89
- ]
90
- }
108
+ },
109
+ {
110
+ "type" : " Microsoft.Sql/servers/firewallRules" ,
111
+ "condition" : " [parameters('allowAzureIPs')]" ,
112
+ "apiVersion" : " 2015-05-01-preview" ,
113
+ "name" : " [concat(parameters('serverName'), '/AllowAllWindowsAzureIps')]" ,
114
+ "dependsOn" : [
115
+ " [resourceId('Microsoft.Sql/servers', parameters('serverName'))]"
116
+ ],
117
+ "tags" : " [parameters('resourceTags')]" ,
118
+ "properties" : {
119
+ "startIpAddress" : " 0.0.0.0" ,
120
+ "endIpAddress" : " 0.0.0.0"
121
+ }
122
+ },
123
+ {
124
+ "type" : " Microsoft.Sql/servers/securityAlertPolicies" ,
125
+ "apiVersion" : " 2020-02-02-preview" ,
126
+ "name" : " [concat(parameters('serverName'), '/Default')]" ,
127
+ "dependsOn" : [
128
+ " [resourceId('Microsoft.Sql/servers', parameters('serverName'))]"
129
+ ],
130
+ "tags" : " [parameters('resourceTags')]" ,
131
+ "properties" : {
132
+ "state" : " Enabled"
133
+ }
134
+ }
135
+ ]
136
+ }
0 commit comments