Gallery › Automation › Azure built-in policies
Private endpoint connections on Automation Accounts should be enabled
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 1.0.0
Private endpoint connections allow secure communication by enabling private connectivity to Automation accounts without a need for public IP addresses at the source or destination. Learn more about private endpoints in Azure Automation at https://docs.microsoft.com/azure/automation/how-to/private-link-security
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONAccount_PrivateEndpoint_AINE.json · 48 lines
{
"properties": {
"displayName": "Private endpoint connections on Automation Accounts should be enabled",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Private endpoint connections allow secure communication by enabling private connectivity to Automation accounts without a need for public IP addresses at the source or destination. Learn more about private endpoints in Azure Automation at https://docs.microsoft.com/azure/automation/how-to/private-link-security",
"metadata": {
"version": "1.0.0",
"category": "Automation"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "AuditIfNotExists"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Automation/automationAccounts"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Automation/automationAccounts/privateEndpointConnections",
"existenceCondition": {
"field": "Microsoft.Automation/automationAccounts/privateEndpointConnections/privateLinkServiceConnectionState.status",
"equals": "Approved"
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/0c2b3618-68a8-4034-a150-ff4abc873462",
"name": "0c2b3618-68a8-4034-a150-ff4abc873462"
}Bylaw0c2b3618-68a8-4034-a150-ff4abc873462.bylaw.ps1 · 27 lines
# Converted from Account_PrivateEndpoint_AINE.json by ConvertTo-Bylaw.
Policy '0c2b3618-68a8-4034-a150-ff4abc873462' {
Properties @{
DisplayName = 'Private endpoint connections on Automation Accounts should be enabled'
Description = 'Private endpoint connections allow secure communication by enabling private connectivity to Automation accounts without a need for public IP addresses at the source or destination. Learn more about private endpoints in Azure Automation at https://docs.microsoft.com/azure/automation/how-to/private-link-security'
Version = '1.0.0'
Category = 'Automation'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Automation/automationAccounts'
AuditIfNotExists 'Microsoft.Automation/automationAccounts/privateEndpointConnections' -Effect (Param Effect) {
Require 'privateLinkServiceConnectionState.status is Approved' {
Field privateLinkServiceConnectionState.status | Must -Be 'Approved'
}
}
}Source: built-in-policies/policyDefinitions/Automation/Account_PrivateEndpoint_AINE.json in Azure/azure-policy, under the MIT licence.
Bylaw