-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.bicep
43 lines (39 loc) · 919 Bytes
/
database.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
param location string = resourceGroup().location
param uniqueId string = uniqueString(resourceGroup().id)
@secure()
param dbPass string
param subnetId string
resource server 'Microsoft.DBforMySQL/flexibleServers@2021-05-01' = {
name: 'demo-db-${uniqueId}'
location: location
sku: {
name: 'Standard_B2s'
tier: 'Burstable'
}
properties: {
version: '8.0.21'
administratorLogin: 'malliina'
administratorLoginPassword: dbPass
storage: {
autoGrow: 'Enabled'
storageSizeGB: 64
iops: 720
}
backup: {
geoRedundantBackup: 'Disabled'
backupRetentionDays: 7
}
network: {
delegatedSubnetResourceId: subnetId
}
}
resource database 'databases' = {
name: 'demo'
properties: {
charset: 'utf8'
collation: 'utf8_general_ci'
}
}
}
output serverName string = server.name
output dbName string = server::database.name