Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ Standard setup supports private network isolation through utilizing **Managed Vi

1. **Register Resource Providers**

Make sure you have an active Azure subscription that allows registering resource providers. For example, subnet delegation requires the Microsoft.App provider to be registered in your subscription. If it's not already registered, run the commands below:
Make sure you have an active Azure subscription that allows registering resource providers. If it's not already registered, run the commands below:

```bash
az provider register --namespace 'Microsoft.KeyVault'
az provider register --namespace 'Microsoft.CognitiveServices'
az provider register --namespace 'Microsoft.Storage'
az provider register --namespace 'Microsoft.Search'
az provider register --namespace 'Microsoft.Network'
az provider register --namespace 'Microsoft.App'
az provider register --namespace 'Microsoft.ContainerService'
```

Expand All @@ -62,11 +61,15 @@ Standard setup supports private network isolation through utilizing **Managed Vi
## Pre-Deployment Steps

### Limitations
1. Do not support Evaluations in Foundry currently, and only secure Agents service.
2. The private endpoints created for your CosmosDB account and Search resource must be done manually using the files in the "update-outbound-rules-cli" folder. Please run the commands as the "outbound-rule-cli.md" files outline for the additional resources you require private endpoints to in your managed vnet set-up. Keep in mind these are only the commands to create the Private endpoints. You will also need connections to those resources - these are covered in the template for CosmosDB, Search, and Storage but additional new resources will need both a connection created and a private endpoint created.
3. The managed VNET is supported for Agents v1 created and ingested through the Foundry classic experience. Agent v2 support is coming soon in GA.
4. We do not support private VNET support for Agent tools such as MCP yet. The tools must be public traffic facing for now. The support is coming soon in GA.
5. For any feedback, please directly email meerakurup@microsoft.com
1. A managed network Foundry resource is only deployable via the `main.bicep` template in the folder `18-managed-virtual-network-preview` in foundry-samples.
1. If you create FQDN outbound rules when the managed virtual network is in Allow Only Approved Outbound mode, a managed Azure Firewall is created which comes with associated Firewall costs. The FQDN outbound rules only support ports 80 and 443.
1. Managed virtual network isolation cannot be disabled after enabling. There is no upgrade path from custom virtual network set-up to managed virtual network. A Foundry resource redeployment is required. Deleting your Foundry resource deletes the managed virtual network.
1. Outbound rules from the managed network must be created through Azure CLI. For the end-to-end secured Agent service set-up with a managed virtual network, the template creates the managed private endpoint to the associated Storage account. Private endpoints are not created to CosmosDB or AI Search. Please use instructions in the `outbound rules CLI ` for information on how to create the managed private endpoints.
1. Support for managed virtual network is only in the following regions: **East US, East US2, Japan East, France Central, UAE North, Brazil South, Spain Central, Germany West Central, Italy North, South Central US, West Central US, Australia East, Sweden Central, Canada East, South Africa North, West Europe, West US, West US 3, South India, and UK South.**
1. If you require private access to on-premises resources for your Foundry resource, please use the to [Application Gatway](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/access-on-premises-resources?view=foundry-classic&viewFallbackFrom=foundry) to configure on-premises access. The same set-up with a private endpoint to Application Gateway and setting up backend pools is supported. Both L4 and L7 traffic are now supported with the Application Gateway in GA.
1. Supports only Standard BYO resources Agents v1 and the Foundry classic experience. Basic Agents do not require network isolation. Support in the new Agents v2 and the new Foundry UI is coming soon.
1. End-to-end network isolation for Agent MCP tools with managed virtual network is currently not supported. Please use public MCP tools with managed network isolation Foundry.
1. For any feedback, please directly email meerakurup@microsoft.com

### Template Customization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,50 @@
"_generator": {
"name": "bicep",
"version": "0.39.26.7824",
"templateHash": "739301657298739367"
"templateHash": "15609984867232984221"
}
},
"parameters": {
"location": {
"type": "string",
"defaultValue": "eastus2",
"allowedValues": [
"spaincentral",
"westus",
"eastus",
"eastus2",
"japaneast",
"francecentral",
"eastus2",
"uaenorth",
"canadaeast"
"brazilsouth",
"germanywestcentral",
"italynorth",
"southcentralus",
"westcentralus",
"australiaeast",
"swedencentral",
"canadaeast",
"southafricanorth",
"westeurope",
"westus3",
"southindia",
"uksouth"
],
"metadata": {
"description": "Location for all resources."
}
},
"isolationMode": {
"type": "string",
"defaultValue": "AllowOnlyApprovedOutbound",
"allowedValues": [
"AllowOnlyApprovedOutbound",
"AllowInternetOutbound"
],
"metadata": {
"description": "The isolation mode for the managed network"
}
},
"aiServices": {
"type": "string",
"defaultValue": "aiservices",
Expand Down Expand Up @@ -1181,6 +1206,9 @@
"accountName": {
"value": "[reference(resourceId('Microsoft.Resources/deployments', format('ai-{0}-{1}-deployment', variables('accountName'), variables('uniqueSuffix'))), '2025-04-01').outputs.accountName.value]"
},
"isolationMode": {
"value": "[parameters('isolationMode')]"
},
"storageName": {
"value": "[reference(resourceId('Microsoft.Resources/deployments', format('dependencies-{0}-deployment', variables('uniqueSuffix'))), '2025-04-01').outputs.azureStorageName.value]"
},
Expand All @@ -1198,7 +1226,7 @@
"_generator": {
"name": "bicep",
"version": "0.39.26.7824",
"templateHash": "13583929851932803119"
"templateHash": "2247331089577562037"
}
},
"parameters": {
Expand All @@ -1208,6 +1236,17 @@
"description": "The name of the AI Services account"
}
},
"isolationMode": {
"type": "string",
"defaultValue": "AllowOnlyApprovedOutbound",
"allowedValues": [
"AllowOnlyApprovedOutbound",
"AllowInternetOutbound"
],
"metadata": {
"description": "The isolation mode for the managed network"
}
},
"storageName": {
"type": "string",
"metadata": {
Expand All @@ -1234,7 +1273,7 @@
"name": "[format('{0}/{1}', parameters('accountName'), 'default')]",
"properties": {
"managedNetwork": {
"IsolationMode": "AllowOnlyApprovedOutbound",
"IsolationMode": "[parameters('isolationMode')]",
"managedNetworkKind": "V2"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,54 +1,33 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"value": "eastus2"
},
"aiServices": {
"value": ""
},
"modelName": {
"value": ""
},
"modelFormat": {
"value": ""
},
"modelVersion": {
"value": ""
},
"modelSkuName": {
"value": ""
},
"modelCapacity": {
"value": 0
"isolationMode": {
"value": "AllowOnlyApprovedOutbound"
},
"deploymentTimestamp": {
"value": ""
"aiServices": {
"value": "aiservices"
},
"firstProjectName": {
"value": ""
"value": "project"
},
"projectDescription": {
"value": ""
"value": "A project for the AI Foundry account with managed network secured deployed Agent"
},
"displayName": {
"value": ""
},
"vnetName": {
"value": ""
"value": "project"
},
"peSubnetName": {
"value": ""
"value": "pe-subnet"
},
"existingVnetResourceId": {
"value": ""
},
"vnetAddressPrefix": {
"value": ""
},
"peSubnetPrefix": {
"value": ""
"vnetName": {
"value": "my-vnet"
},
"aiSearchResourceId": {
"value": ""
Expand All @@ -59,9 +38,6 @@
"azureCosmosDBAccountResourceId": {
"value": ""
},
"projectCapHost": {
"value": ""
},
"apiManagementResourceId": {
"value": ""
},
Expand All @@ -75,6 +51,23 @@
"privatelink.documents.azure.com": "",
"privatelink.azure-api.net": ""
}
},
"dnsZoneNames": {
"value": [
"privatelink.services.ai.azure.com",
"privatelink.openai.azure.com",
"privatelink.cognitiveservices.azure.com",
"privatelink.search.windows.net",
"privatelink.blob.core.windows.net",
"privatelink.documents.azure.com",
"privatelink.azure-api.net"
]
},
"vnetAddressPrefix": {
"value": ""
},
"peSubnetPrefix": {
"value": ""
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,36 @@ Standard Setup Managed Network Secured Steps for main.bicep
*/
@description('Location for all resources.')
@allowed([
'spaincentral'
'westus'
'eastus'
'eastus2'
'japaneast'
'francecentral'
'eastus2'
'uaenorth'
'brazilsouth'
'germanywestcentral'
'italynorth'
'southcentralus'
'westcentralus'
'australiaeast'
'swedencentral'
'canadaeast'
'southafricanorth'
'westeurope'
'westus3'
'southindia'
'uksouth'
])
param location string = 'eastus2'

@description('The isolation mode for the managed network')
@allowed([
'AllowOnlyApprovedOutbound'
'AllowInternetOutbound'
])
param isolationMode string = 'AllowOnlyApprovedOutbound'

@description('Name for your AI Services resource.')
param aiServices string = 'aiservices'

Expand Down Expand Up @@ -223,6 +244,7 @@ module managedNetwork 'modules-network-secured/managed-network.bicep' = {
name: 'managed-network-${uniqueSuffix}-deployment'
params: {
accountName: aiAccount.outputs.accountName
isolationMode: isolationMode
storageName: aiDependencies.outputs.azureStorageName
storageResourceGroupName: azureStorageResourceGroupName
storageSubscriptionId: azureStorageSubscriptionId
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using './main.bicep'

param location = 'eastus2'
param isolationMode = 'AllowOnlyApprovedOutbound'
param aiServices = 'aiservices'
param firstProjectName = 'project'
param projectDescription = 'A project for the AI Foundry account with managed network secured deployed Agent'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "This set of templates demonstrates how to set up Azure AI Agent Service with the managed network secured standard setup environment.",
"summary": "This set of templates demonstrates how to use Azure AI Agent Service with a managed virtual network.",
"githubUsername": "meerakurup",
"dateUpdated": "2025-06-24",
"dateUpdated": "2025-12-17",
"environments": [
"AzureCloud"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
@description('The name of the AI Services account')
param accountName string

@description('The isolation mode for the managed network')
@allowed([
'AllowOnlyApprovedOutbound'
'AllowInternetOutbound'
])
param isolationMode string = 'AllowOnlyApprovedOutbound'

@description('The name of the storage account to create outbound rules for')
param storageName string

Expand All @@ -10,7 +17,7 @@ param storageResourceGroupName string
@description('The subscription ID where the storage account is located')
param storageSubscriptionId string

@description('The name of the AI Search service to create outbound rules for')
// @description('The name of the AI Search service to create outbound rules for')
// param aiSearchName string

// @description('The resource group name where the AI Search service is located')
Expand Down Expand Up @@ -40,8 +47,9 @@ resource managedNetwork 'Microsoft.CognitiveServices/accounts/managednetworks@20
name: 'default'
properties: {
managedNetwork: {
IsolationMode: 'AllowOnlyApprovedOutbound'
IsolationMode: isolationMode
managedNetworkKind: 'V2'
//firewallSku: 'Standard' // Uncomment to enable firewall only when in AllowOnlyApprovedOutbound mode
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedNetworks/default",
"name": "default",
"type": "Microsoft.CognitiveServices/accounts/managedNetworks/outboundRules",
"properties": {
"IsolationMode": "AllowOnlyApprovedOutbound",
"outboundRules": {
"storage-rule": {
"type": "PrivateEndpoint",
"destination": {
"serviceResourceId": "/subscriptions/{storageSubscriptionId}/resourceGroups/{storageResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageName}",
"subresourceTarget": "blob",
"sparkEnabled": false,
"sparkStatus": "Inactive"
},
"category": "UserDefined"
},
"aisearch-rule": {
"type": "PrivateEndpoint",
"destination": {
"serviceResourceId": "/subscriptions/{aiSearchSubscriptionId}/resourceGroups/{aiSearchResourceGroupName}/providers/Microsoft.Search/searchServices/{aiSearchName}",
"subresourceTarget": "searchService",
"sparkEnabled": false,
"sparkStatus": "Inactive"
},
"category": "UserDefined"
},
"cosmosdb-rule": {
"type": "PrivateEndpoint",
"destination": {
"serviceResourceId": "/subscriptions/{cosmosDBSubscriptionId}/resourceGroups/{cosmosDBResourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{cosmosDBName}",
"subresourceTarget": "Sql",
"sparkEnabled": false,
"sparkStatus": "Inactive"
},
"category": "UserDefined"
}
},
"managedNetworkKind": "V2"
}
}
Loading