Gallery › Data Lake › Azure built-in policies
Require encryption on Data Lake Store accounts
Converted Policy Deny Mode Indexed Version 1.0.0
This policy ensures encryption is enabled on all Data Lake Store accounts
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONStoreEncryption_Deny.json · 36 lines
{
"properties": {
"displayName": "Require encryption on Data Lake Store accounts",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "This policy ensures encryption is enabled on all Data Lake Store accounts",
"metadata": {
"version": "1.0.0",
"category": "Data Lake"
},
"version": "1.0.0",
"parameters": {},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.DataLakeStore/accounts"
},
{
"field": "Microsoft.DataLakeStore/accounts/encryptionState",
"equals": "Disabled"
}
]
},
"then": {
"effect": "deny"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/a7ff3161-0087-490a-9ad9-ad6217f4f43a",
"name": "a7ff3161-0087-490a-9ad9-ad6217f4f43a"
}Bylawa7ff3161-0087-490a-9ad9-ad6217f4f43a.bylaw.ps1 · 21 lines
# Converted from StoreEncryption_Deny.json by ConvertTo-Bylaw.
Policy 'a7ff3161-0087-490a-9ad9-ad6217f4f43a' {
Properties @{
DisplayName = 'Require encryption on Data Lake Store accounts'
Description = 'This policy ensures encryption is enabled on all Data Lake Store accounts'
Version = '1.0.0'
Category = 'Data Lake'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Resource 'Microsoft.DataLakeStore/accounts' {
Require 'encryptionState is not Disabled' {
Field encryptionState | Must -Not -Be 'Disabled' -IfPresent
}
}
Effect Deny
}Source: built-in-policies/policyDefinitions/Data Lake/StoreEncryption_Deny.json in Azure/azure-policy, under the MIT licence.
Bylaw