Gallery › Azure Data Explorer › Azure built-in policies
Configure Azure Data Explorer to disable public network access
Converted Policy Disabled Modify Mode Indexed Version 1.0.0
Disabling the public network access property shuts down public connectivity such that Azure Data Explorer can only be accessed from a private endpoint. This configuration disables the public network access for all Azure Data Explorer clusters .
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONADX_DisablePublicAccess_Modify.json · 62 lines
{
"properties": {
"displayName": "Configure Azure Data Explorer to disable public network access",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Disabling the public network access property shuts down public connectivity such that Azure Data Explorer can only be accessed from a private endpoint. This configuration disables the public network access for all Azure Data Explorer clusters .",
"metadata": {
"category": "Azure Data Explorer",
"version": "1.0.0"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Modify",
"Disabled"
],
"defaultValue": "Modify"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Kusto/clusters"
},
{
"field": "Microsoft.Kusto/clusters/publicNetworkAccess",
"notEquals": "Disabled"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"conflictEffect": "audit",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/6d8ee4ec-f05a-4a1d-8b00-a9b17e38b437"
],
"operations": [
{
"operation": "addOrReplace",
"field": "Microsoft.Kusto/clusters/publicNetworkAccess",
"value": "Disabled"
}
]
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/7b32f193-cb28-4e15-9a98-b9556db0bafa",
"name": "7b32f193-cb28-4e15-9a98-b9556db0bafa"
}Bylaw7b32f193-cb28-4e15-9a98-b9556db0bafa.bylaw.ps1 · 30 lines
# Converted from ADX_DisablePublicAccess_Modify.json by ConvertTo-Bylaw.
Policy '7b32f193-cb28-4e15-9a98-b9556db0bafa' {
Properties @{
DisplayName = 'Configure Azure Data Explorer to disable public network access'
Description = 'Disabling the public network access property shuts down public connectivity such that Azure Data Explorer can only be accessed from a private endpoint. This configuration disables the public network access for all Azure Data Explorer clusters .'
Category = 'Azure Data Explorer'
Version = '1.0.0'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Modify', 'Disabled')
Default = 'Modify'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Kusto/clusters' {
Require 'publicNetworkAccess is Disabled' {
Field publicNetworkAccess | Must -Be 'Disabled'
}
}
Modify -Role 'SQL Server Contributor' -ConflictEffect Audit -Effect (Param Effect) {
Field publicNetworkAccess | AddOrReplace 'Disabled'
}
}Source: built-in-policies/policyDefinitions/Azure Data Explorer/ADX_DisablePublicAccess_Modify.json in Azure/azure-policy, under the MIT licence.
Bylaw