Gallery › Network › Azure Community Policy
Allowed Express Route SKUs
Converted Policy Audit Deny Disabled Mode All Version 1.0.0
This policy enables you to specify a set of express route SKUs that your organization can deploy.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONazurepolicy.json · 54 lines
{
"name": "1f592b89-fdd1-4698-9835-ad0faf60311f",
"type": "Microsoft.Authorization/policyDefinitions",
"properties": {
"displayName": "Allowed Express Route SKUs",
"description": "This policy enables you to specify a set of express route SKUs that your organization can deploy.",
"metadata": {
"version": "1.0.0",
"category": "Network"
},
"mode": "All",
"parameters": {
"listOfAllowedSKUs": {
"type": "Array",
"metadata": {
"description": "The list of SKUs that can be specified for express route.",
"displayName": "Allowed SKUs"
}
},
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Deny, Audit or Disabled the execution of the Policy"
},
"allowedValues": [
"Deny",
"Audit",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/expressRouteCircuits"
},
{
"not": {
"field": "Microsoft.Network/expressRouteCircuits/sku.name",
"in": "[parameters('listOfAllowedSKUs')]"
}
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}
}
}Bylaw1f592b89-fdd1-4698-9835-ad0faf60311f.bylaw.ps1 · 32 lines
# Converted from azurepolicy.json by ConvertTo-Bylaw.
Policy '1f592b89-fdd1-4698-9835-ad0faf60311f' {
Properties @{
DisplayName = 'Allowed Express Route SKUs'
Description = 'This policy enables you to specify a set of express route SKUs that your organization can deploy.'
Version = '1.0.0'
Category = 'Network'
Mode = 'All'
}
Parameter ListOfAllowedSKUs @{
Type = 'Array'
DisplayName = 'Allowed SKUs'
Description = 'The list of SKUs that can be specified for express route.'
}
Parameter Effect @{
AllowedValues = @('Deny', 'Audit', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Deny, Audit or Disabled the execution of the Policy'
}
Resource 'Microsoft.Network/expressRouteCircuits' {
Require 'sku.name is one of the ListOfAllowedSKUs parameter' {
Field sku.name | Must -BeIn (Param ListOfAllowedSKUs)
}
}
Effect (Param Effect)
}Source: policyDefinitions/Network/allowed-express-route-skus/azurepolicy.json in Azure/Community-Policy, under the MIT licence.
Bylaw