Created
September 27, 2021 18:55
-
-
Save azMantas/29b08bcedeea6a5db8beeb15389c40f4 to your computer and use it in GitHub Desktop.
Azure Policy definition - modify - st_allowCrossTenantReplication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "st_allowCrossTenantReplication", | |
"properties": { | |
"DisplayName": "Storage account should disallow cross tenant blob replication", | |
"mode": "All", | |
"metadata": { | |
"category": "Storage" | |
}, | |
"parameters": { | |
"effect": { | |
"type": "String", | |
"allowedValues": [ | |
"Deny", | |
"Modify", | |
"Disabled" | |
], | |
"defaultValue": "Modify" | |
} | |
}, | |
"policyRule": { | |
"if": { | |
"allOf": [ | |
{ | |
"field": "type", | |
"equals": "Microsoft.Storage/storageAccounts" | |
}, | |
{ | |
"not": { | |
"field": "Microsoft.Storage/storageAccounts/allowCrossTenantReplication", | |
"equals": "false" | |
} | |
} | |
] | |
}, | |
"then": { | |
"effect": "[parameters('effect')]", | |
"details": { | |
"roleDefinitionIds": [ | |
"/providers/microsoft.authorization/roleDefinitions/17d1049b-9a84-46fb-8f53-869881c3d3ab" | |
], | |
"conflictEffect": "audit", | |
"operations": [ | |
{ | |
"operation": "addOrReplace", | |
"field": "Microsoft.Storage/storageAccounts/allowCrossTenantReplication", | |
"value": false | |
} | |
] | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment