forked from Azure-Samples/DotNet47WinContainerModernize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sqlServer.bicep
39 lines (32 loc) · 1.09 KB
/
sqlServer.bicep
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
@description('The name of the SQL logical server.')
param serverName string = 'sql-${sqlDBName}-${uniqueString('sql', resourceGroup().id)}'
@description('The name of the SQL Database.')
param sqlDBName string = 'Microsoft.eShopOnContainers.Services.CatalogDb'
@description('Location for all resources.')
param location string = resourceGroup().location
@description('The administrator username of the SQL logical server.')
param administratorLogin string
@description('The administrator password of the SQL logical server.')
@secure()
param administratorLoginPassword string
resource sqlServer 'Microsoft.Sql/servers@2022-02-01-preview' = {
name: serverName
location: location
properties: {
administratorLogin: administratorLogin
administratorLoginPassword: administratorLoginPassword
publicNetworkAccess: 'Enabled'
}
resource fwRules 'firewallRules' = {
name: 'AllowAllWindowsAzureIps'
}
}
resource sqlDB 'Microsoft.Sql/servers/databases@2022-02-01-preview' = {
parent: sqlServer
name: sqlDBName
location: location
sku: {
name: 'Standard'
tier: 'Standard'
}
}