Gallery › Data Factory › Azure Community Policy
Deny-DataFactory-IdentityType
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
Enforces use of system assigned identity for data factory.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONazurepolicy.json · 45 lines
{
"name": "333fc656-a811-49ab-ab07-66796c9a21d5",
"type": "Microsoft.Authorization/policyDefinitions",
"properties": {
"displayName": "Deny-DataFactory-IdentityType",
"description": "Enforces use of system assigned identity for data factory.",
"metadata": {
"version": "1.0.0",
"category": "Data Factory"
},
"mode": "Indexed",
"parameters": {
"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.DataFactory/factories"
},
{
"field": "identity.type",
"exists": false
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}
}
}Bylaw333fc656-a811-49ab-ab07-66796c9a21d5.bylaw.ps1 · 27 lines
# Converted from azurepolicy.json by ConvertTo-Bylaw.
Policy '333fc656-a811-49ab-ab07-66796c9a21d5' {
Properties @{
DisplayName = 'Deny-DataFactory-IdentityType'
Description = 'Enforces use of system assigned identity for data factory.'
Version = '1.0.0'
Category = 'Data Factory'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Deny', 'Audit', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Deny, Audit or Disabled the execution of the Policy'
}
Resource 'Microsoft.DataFactory/factories' {
Require 'identity.type exists' {
Field identity.type | Must -Exist
}
}
Effect (Param Effect)
}Source: policyDefinitions/Data Factory/deny-datafactory-identitytype/azurepolicy.json in Azure/Community-Policy, under the MIT licence.
Bylaw