Gallery › Synapse › Azure built-in policies
Managed workspace virtual network on Azure Synapse workspaces should be enabled
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
Enabling a managed workspace virtual network ensures that your workspace is network isolated from other workspaces. Data integration and Spark resources deployed in this virtual network also provides user level isolation for Spark activities.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONWorkspaceManagedVnet_Audit.json · 50 lines
{
"properties": {
"displayName": "Managed workspace virtual network on Azure Synapse workspaces should be enabled",
"description": "Enabling a managed workspace virtual network ensures that your workspace is network isolated from other workspaces. Data integration and Spark resources deployed in this virtual network also provides user level isolation for Spark activities.",
"policyType": "BuiltIn",
"mode": "Indexed",
"metadata": {
"version": "1.0.0",
"category": "Synapse"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Synapse/workspaces"
},
{
"field": "Microsoft.Synapse/workspaces/managedVirtualNetwork",
"notEquals": "default"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/2d9dbfa3-927b-4cf0-9d0f-08747f971650",
"name": "2d9dbfa3-927b-4cf0-9d0f-08747f971650"
}Bylaw2d9dbfa3-927b-4cf0-9d0f-08747f971650.bylaw.ps1 · 28 lines
# Converted from WorkspaceManagedVnet_Audit.json by ConvertTo-Bylaw.
Policy '2d9dbfa3-927b-4cf0-9d0f-08747f971650' {
Properties @{
DisplayName = 'Managed workspace virtual network on Azure Synapse workspaces should be enabled'
Description = 'Enabling a managed workspace virtual network ensures that your workspace is network isolated from other workspaces. Data integration and Spark resources deployed in this virtual network also provides user level isolation for Spark activities.'
Version = '1.0.0'
Category = 'Synapse'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Synapse/workspaces' {
Require 'managedVirtualNetwork is default' {
Field managedVirtualNetwork | Must -Be 'default'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Synapse/WorkspaceManagedVnet_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw