Gallery › Maps › Azure built-in policies
Maps account should not process data globally.
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
This policy restricts the data processing locations you can add to your Azure Maps accounts. Use to enforce your geo-compliance requirements.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONBlockGlobalDataProcessing_Deny.json · 65 lines
{
"properties": {
"displayName": "Maps account should not process data globally.",
"policyType": "BuiltIn",
"description": "This policy restricts the data processing locations you can add to your Azure Maps accounts. Use to enforce your geo-compliance requirements.",
"mode": "Indexed",
"metadata": {
"version": "1.0.0",
"category": "Maps"
},
"version": "1.0.0",
"parameters": {
"listOfAllowedLocations": {
"type": "Array",
"defaultValue": [],
"metadata": {
"displayName": "Allowed locations",
"description": "The list of extended locations that can be specified when deploying Azure Maps accounts.",
"strongType": "location"
}
},
"effect": {
"type": "String",
"defaultValue": "Deny",
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "The effect determines what happens when the policy rule is evaluated to match."
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Maps/accounts"
},
{
"count": {
"field": "Microsoft.Maps/accounts/locations[*]",
"where": {
"value": "[replace(toLower(current('Microsoft.Maps/accounts/locations[*].locationName')), ' ', '')]",
"notIn": "[parameters('listOfAllowedLocations')]"
}
},
"greater": 0
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/c707daa0-b93b-454d-9e1e-8ac59866316c",
"name": "c707daa0-b93b-454d-9e1e-8ac59866316c"
}Bylawc707daa0-b93b-454d-9e1e-8ac59866316c.bylaw.ps1 · 37 lines
# Converted from BlockGlobalDataProcessing_Deny.json by ConvertTo-Bylaw.
Policy 'c707daa0-b93b-454d-9e1e-8ac59866316c' {
Properties @{
DisplayName = 'Maps account should not process data globally.'
Description = 'This policy restricts the data processing locations you can add to your Azure Maps accounts. Use to enforce your geo-compliance requirements.'
Version = '1.0.0'
Category = 'Maps'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter ListOfAllowedLocations @{
Type = 'Array'
Default = @()
DisplayName = 'Allowed locations'
Description = 'The list of extended locations that can be specified when deploying Azure Maps accounts.'
Metadata = [ordered]@{ strongType = 'location' }
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
DisplayName = 'Effect'
Description = 'The effect determines what happens when the policy rule is evaluated to match.'
}
Resource 'Microsoft.Maps/accounts' {
Require 'locations is as required' {
Count 'locations[*]' -Where {
Arm '[replace(toLower(current(''Microsoft.Maps/accounts/locations[*].locationName'')), '' '', '''')]' | Must -Not -BeIn (Param ListOfAllowedLocations)
} | Must -Be 0
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Maps/BlockGlobalDataProcessing_Deny.json in Azure/azure-policy, under the MIT licence.
Bylaw