Check whether the Synapse workspace has a managed virtual network

Enable a managed virtual network at creation if the Synapse workspace needs managed private endpoints.

Description

Azure Synapse can place a workspace’s Spark and data integration resources in a virtual network that it manages for that workspace. You choose this option when you create the workspace.

Potential impact

Without this network, the workspace cannot use managed private endpoints to connect to data sources such as Azure Storage. The separate publicNetworkAccess setting controls public access to the workspace itself.

Remediation

Set properties.managedVirtualNetwork to default at creation. If the template uses a parameter, check the value supplied at deployment. To add the network later, plan a migration to a new workspace.

Examples

Each JSON excerpt is one entry in the template’s resources array. Supply the workspace name and the URL of a Data Lake Storage Gen2 account with an analytics file system. Declare the SQL administrator password parameter as secureString.

Before

json
{
  "type": "Microsoft.Synapse/workspaces",
  "apiVersion": "2021-06-01",
  "name": "[parameters('workspaceName')]",
  "location": "[resourceGroup().location]",
  "identity": { "type": "SystemAssigned" },
  "properties": {
    "defaultDataLakeStorage": {
      "accountUrl": "[parameters('lakeUrl')]",
      "filesystem": "analytics"
    },
    "sqlAdministratorLogin": "workspaceadmin",
    "sqlAdministratorLoginPassword": "[parameters('sqlAdminPassword')]",
    "managedVirtualNetwork": ""
  }
}

After

json
{
  "type": "Microsoft.Synapse/workspaces",
  "apiVersion": "2021-06-01",
  "name": "[parameters('workspaceName')]",
  "location": "[resourceGroup().location]",
  "identity": { "type": "SystemAssigned" },
  "properties": {
    "defaultDataLakeStorage": {
      "accountUrl": "[parameters('lakeUrl')]",
      "filesystem": "analytics"
    },
    "sqlAdministratorLogin": "workspaceadmin",
    "sqlAdministratorLoginPassword": "[parameters('sqlAdminPassword')]",
    "managedVirtualNetwork": "default"
  }
}

References