-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.bicep
51 lines (43 loc) · 1.17 KB
/
main.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
40
41
42
43
44
45
46
47
48
49
50
51
param sqlAdministratorLogin string
@secure()
param sqlAdministratorLoginPassword string
@allowed([
'Enabled'
'Disabled'
])
param transparentDataEncryption string = 'Enabled'
param location string = resourceGroup().location
var databaseName = 'sample-db-with-tde'
var databaseEdition = 'Basic'
var databaseCollation = 'SQL_Latin1_General_CP1_CI_AS'
var databaseServiceObjectiveName = 'Basic'
var sqlServerName = 'sqlserver${uniqueString(resourceGroup().id)}'
resource sqlServer 'Microsoft.Sql/servers@2020-02-02-preview' = {
name: sqlServerName
location: location
properties: {
administratorLogin: sqlAdministratorLogin
administratorLoginPassword: sqlAdministratorLoginPassword
version: '12.0'
}
}
resource db 'Microsoft.Sql/servers/databases@2020-02-02-preview' = {
parent: sqlServer
name: databaseName
location: location
sku: {
name: databaseServiceObjectiveName
tier: databaseEdition
}
properties: {
collation: databaseCollation
}
}
// very long type...
resource tde 'Microsoft.Sql/servers/databases/transparentDataEncryption@2020-08-01-preview' = {
parent: db
name: 'current'
properties: {
state: transparentDataEncryption
}
}