Gallery › App Configuration › Azure built-in policies
App Configuration should disable public network access
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
Disabling public network access improves security by ensuring that the resource isn't exposed on the public internet. You can limit exposure of your resources by creating private endpoints instead. Learn more at: https://aka.ms/appconfig/private-endpoint.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONPrivateLink_PublicNetworkAccess_Audit.json · 50 lines
{
"properties": {
"displayName": "App Configuration should disable public network access",
"description": "Disabling public network access improves security by ensuring that the resource isn't exposed on the public internet. You can limit exposure of your resources by creating private endpoints instead. Learn more at: https://aka.ms/appconfig/private-endpoint.",
"metadata": {
"version": "1.0.0",
"category": "App Configuration"
},
"version": "1.0.0",
"policyType": "BuiltIn",
"mode": "Indexed",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.AppConfiguration/configurationStores"
},
{
"field": "Microsoft.AppConfiguration/configurationStores/publicNetworkAccess",
"notEquals": "Disabled"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/3d9f5e4c-9947-4579-9539-2a7695fbc187",
"name": "3d9f5e4c-9947-4579-9539-2a7695fbc187"
}Bylaw3d9f5e4c-9947-4579-9539-2a7695fbc187.bylaw.ps1 · 28 lines
# Converted from PrivateLink_PublicNetworkAccess_Audit.json by ConvertTo-Bylaw.
Policy '3d9f5e4c-9947-4579-9539-2a7695fbc187' {
Properties @{
DisplayName = 'App Configuration should disable public network access'
Description = 'Disabling public network access improves security by ensuring that the resource isn''t exposed on the public internet. You can limit exposure of your resources by creating private endpoints instead. Learn more at: https://aka.ms/appconfig/private-endpoint.'
Version = '1.0.0'
Category = 'App Configuration'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.AppConfiguration/configurationStores' {
Require 'publicNetworkAccess is Disabled' {
Field publicNetworkAccess | Must -Be 'Disabled'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/App Configuration/PrivateLink_PublicNetworkAccess_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw