Gallery › PostgreSQL › Azure built-in policies
A Microsoft Entra administrator should be provisioned for PostgreSQL flexible servers
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 1.0.0
Audit provisioning of a Microsoft Entra administrator for your PostgreSQL flexible server to enable Microsoft Entra authentication. Microsoft Entra authentication enables simplified permission management and centralized identity management of database users and other Microsoft services
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONFlexibleServers_ProvisionEntraAdmin_AINE.json · 44 lines
{
"properties": {
"displayName": "A Microsoft Entra administrator should be provisioned for PostgreSQL flexible servers",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Audit provisioning of a Microsoft Entra administrator for your PostgreSQL flexible server to enable Microsoft Entra authentication. Microsoft Entra authentication enables simplified permission management and centralized identity management of database users and other Microsoft services",
"metadata": {
"version": "1.0.0",
"category": "PostgreSQL"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "AuditIfNotExists",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.DBforPostgreSQL/flexibleServers"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.DBforPostgreSQL/flexibleServers/administrators"
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/ce39a96d-bf09-4b60-8c32-e85d52abea0f",
"name": "ce39a96d-bf09-4b60-8c32-e85d52abea0f"
}Bylawce39a96d-bf09-4b60-8c32-e85d52abea0f.bylaw.ps1 · 24 lines
# Converted from FlexibleServers_ProvisionEntraAdmin_AINE.json by ConvertTo-Bylaw.
Policy 'ce39a96d-bf09-4b60-8c32-e85d52abea0f' {
Properties @{
DisplayName = 'A Microsoft Entra administrator should be provisioned for PostgreSQL flexible servers'
Description = 'Audit provisioning of a Microsoft Entra administrator for your PostgreSQL flexible server to enable Microsoft Entra authentication. Microsoft Entra authentication enables simplified permission management and centralized identity management of database users and other Microsoft services'
Version = '1.0.0'
Category = 'PostgreSQL'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.DBforPostgreSQL/flexibleServers'
AuditIfNotExists 'Microsoft.DBforPostgreSQL/flexibleServers/administrators' -Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/PostgreSQL/FlexibleServers_ProvisionEntraAdmin_AINE.json in Azure/azure-policy, under the MIT licence.
Bylaw