Gallery › CDN › Azure built-in policies
Secure private connectivity between Azure Front Door Premium and Azure Storage Blob, or Azure App Service
Converted Policy Audit Disabled Mode All Version 1.0.0
Private link ensures private connectivity between AFD Premium and Azure Storage Blob or Azure App Service over the Azure backbone network, without the Azure Storage Blob or the Azure App Service being publicly exposed to the internet.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONAFD_Premium_PrivateLink_Enabled_Audit.json · 89 lines
{
"properties": {
"displayName": "Secure private connectivity between Azure Front Door Premium and Azure Storage Blob, or Azure App Service",
"description": "Private link ensures private connectivity between AFD Premium and Azure Storage Blob or Azure App Service over the Azure backbone network, without the Azure Storage Blob or the Azure App Service being publicly exposed to the internet.",
"metadata": {
"version": "1.0.0",
"category": "CDN"
},
"version": "1.0.0",
"policyType": "BuiltIn",
"mode": "All",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Disabled"
],
"defaultValue": "Audit"
},
"originType": {
"type": "String",
"metadata": {
"displayName": "Origin Type",
"description": "Azure Storage Blob or Azure App Service origin type"
},
"allowedValues": [
"StorageBlob",
"AppService"
],
"defaultValue": "StorageBlob"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Cdn/profiles/originGroups/origins"
},
{
"anyOf": [
{
"allOf": [
{
"value": "[parameters('originType')]",
"equals": "StorageBlob"
},
{
"field": "Microsoft.Cdn/profiles/originGroups/origins/hostName",
"like": "*.blob.core.windows.net"
}
]
},
{
"allOf": [
{
"value": "[parameters('originType')]",
"equals": "AppService"
},
{
"field": "Microsoft.Cdn/profiles/originGroups/origins/hostName",
"like": "*.azurewebsites.net"
}
]
}
]
},
{
"field": "Microsoft.Cdn/profiles/originGroups/origins/sharedPrivateLinkResource.privateLink",
"exists": false
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/daba2cce-8326-4af3-b049-81a362da024d",
"name": "daba2cce-8326-4af3-b049-81a362da024d"
}Bylawdaba2cce-8326-4af3-b049-81a362da024d.bylaw.ps1 · 47 lines
# Converted from AFD_Premium_PrivateLink_Enabled_Audit.json by ConvertTo-Bylaw.
Policy 'daba2cce-8326-4af3-b049-81a362da024d' {
Properties @{
DisplayName = 'Secure private connectivity between Azure Front Door Premium and Azure Storage Blob, or Azure App Service'
Description = 'Private link ensures private connectivity between AFD Premium and Azure Storage Blob or Azure App Service over the Azure backbone network, without the Azure Storage Blob or the Azure App Service being publicly exposed to the internet.'
Version = '1.0.0'
Category = 'CDN'
PolicyVersion = '1.0.0'
Mode = 'All'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Parameter OriginType @{
AllowedValues = @('StorageBlob', 'AppService')
Default = 'StorageBlob'
DisplayName = 'Origin Type'
Description = 'Azure Storage Blob or Azure App Service origin type'
}
Resource 'Microsoft.Cdn/profiles/originGroups/origins' {
When {
AnyOf {
AllOf {
Param OriginType | Must -Be 'StorageBlob'
Field hostName | Must -BeLike '*.blob.core.windows.net'
}
AllOf {
Param OriginType | Must -Be 'AppService'
Field hostName | Must -BeLike '*.azurewebsites.net'
}
}
}
Require 'sharedPrivateLinkResource.privateLink exists' {
Field sharedPrivateLinkResource.privateLink | Must -Exist
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/CDN/AFD_Premium_PrivateLink_Enabled_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw