-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathparams.policyDefinition.Deny-PostgreSql-StorageProfile.json
More file actions
83 lines (83 loc) · 3.08 KB
/
params.policyDefinition.Deny-PostgreSql-StorageProfile.json
File metadata and controls
83 lines (83 loc) · 3.08 KB
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
73
74
75
76
77
78
79
80
81
82
83
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"policyName": {
"value": "Deny-PostgreSql-StorageProfile"
},
"policyDescription": {
"value": "Enforces geo-redundant database backup with minimum retention time in days."
},
"policyMode": {
"value": "Indexed"
},
"policyParameters": {
"value": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Deny"
},
"minBackupRetentionDays": {
"type": "Integer",
"metadata": {
"displayName": "Minimum Backup Retention in Days",
"description": "Specifies the minimum backup retention in days"
},
"defaultValue": 7
}
}
},
"policyDefinition": {
"value": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.DBforPostgreSQL/servers"
},
{
"anyOf": [
{
"field": "Microsoft.DBforPostgreSQL/servers/storageProfile.geoRedundantBackup",
"exists": false
},
{
"field": "Microsoft.DBforPostgreSQL/servers/storageProfile.geoRedundantBackup",
"notEquals": "Enabled"
},
{
"field": "Microsoft.DBforPostgreSQL/servers/storageProfile.backupRetentionDays",
"exists": false
},
{
"field": "Microsoft.DBforPostgreSQL/servers/storageProfile.backupRetentionDays",
"less": "[parameters('minBackupRetentionDays')]"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}
},
"policyMetadata": {
"value": {
"version": "1.0.0",
"category": "SQL",
"preview": false,
"deprecated": false
}
}
}
}