-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathSqlManagedInstance_BlockGrsBackupRedundancy_Deny.json
More file actions
93 lines (93 loc) · 2.9 KB
/
Copy pathSqlManagedInstance_BlockGrsBackupRedundancy_Deny.json
File metadata and controls
93 lines (93 loc) · 2.9 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
84
85
86
87
88
89
90
91
92
93
{
"properties": {
"displayName": "SQL Managed Instances should avoid using GRS backup redundancy",
"description": "Managed Instances should avoid using the default geo-redundant storage for backups, if data residency rules require data to stay within a specific region. Note: Azure Policy is not enforced when creating a database using T-SQL. If not explicitly specified, database with geo-redundant backup storage is created via T-SQL.",
"mode": "Indexed",
"policyType": "BuiltIn",
"metadata": {
"version": "2.0.0",
"category": "SQL"
},
"version": "2.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Deny",
"Disabled"
],
"defaultValue": "Deny"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Sql/managedInstances"
},
{
"anyOf": [
{
"allOf": [
{
"value": "[requestContext().apiVersion]",
"lessOrEquals": "2021-02-01-preview"
},
{
"not": {
"anyOf": [
{
"field": "Microsoft.Sql/managedInstances/storageAccountType",
"equals": "LRS"
},
{
"field": "Microsoft.Sql/managedInstances/storageAccountType",
"equals": "ZRS"
}
]
}
}
]
},
{
"allOf": [
{
"value": "[requestContext().apiVersion]",
"greater": "2021-02-01-preview"
},
{
"not": {
"anyOf": [
{
"field": "Microsoft.Sql/managedInstances/requestedBackupStorageRedundancy",
"equals": "Local"
},
{
"field": "Microsoft.Sql/managedInstances/requestedBackupStorageRedundancy",
"equals": "Zone"
}
]
}
}
]
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"2.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/a9934fd7-29f2-4e6d-ab3d-607ea38e9079",
"name": "a9934fd7-29f2-4e6d-ab3d-607ea38e9079"
}