-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaz_mysql.bicep
72 lines (66 loc) · 1.7 KB
/
az_mysql.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
param administratorLogin string = 'nextcloud_admin'
param serverName string = 'nextcloud-mysqlsrv'
param databaseName string = 'nextcloud_db'
param masterIpAddress string
#disable-next-line secure-secrets-in-params
param administratorLoginPassword string
resource server 'Microsoft.DBforMySQL/flexibleServers@2023-06-30' = {
location: resourceGroup().location
name: serverName
sku: {
name: 'Standard_B1ms'
tier: 'Burstable'
}
properties: {
version: '8.0.21'
administratorLogin: administratorLogin
administratorLoginPassword: administratorLoginPassword
availabilityZone: ''
highAvailability: {
mode: 'Disabled'
standbyAvailabilityZone: ''
}
storage: {
storageSizeGB: 20
iops: 360
autoGrow: 'Disabled'
}
backup: {
backupRetentionDays: 7
geoRedundantBackup: 'Disabled'
}
}
}
resource fwRule1 'Microsoft.DBforMySQL/flexibleServers/firewallRules@2021-12-01-preview' = {
parent: server
name: 'k8s'
properties: {
startIpAddress: '185.4.72.4'
endIpAddress: '185.4.72.4'
}
}
resource fwRule2 'Microsoft.DBforMySQL/flexibleServers/firewallRules@2021-12-01-preview' = {
parent: server
name: 'master'
properties: {
startIpAddress: masterIpAddress
endIpAddress: masterIpAddress
}
}
resource database 'Microsoft.DBforMySQL/flexibleServers/databases@2023-06-30' = {
parent: server
name: databaseName
properties: {
charset: 'utf8'
collation: 'utf8_general_ci'
}
}
resource config 'Microsoft.DBforMySQL/flexibleServers/configurations@2023-06-30' = {
name: 'require_secure_transport'
parent: server
properties: {
currentValue: 'ON'
source: 'user-override'
value: 'OFF'
}
}