Skip to content

Commit 7f19349

Browse files
committed
Revert "Merge pull request #6 from debuggerXi/networkinjection"
This reverts commit 6fc4741, reversing changes made to 47c376d.
1 parent f64909f commit 7f19349

File tree

4 files changed

+5
-72
lines changed

4 files changed

+5
-72
lines changed

use-cases/agents/setup/standard-setup/main.bicep

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ param azureCosmosDBAccountResourceId string = ''
3939
param projectCapHost string = 'caphostproj'
4040
param accountCapHost string = 'caphostacc'
4141

42-
@allowed([
43-
'false'
44-
'true'
45-
])
46-
param enableNetworkInjection string = 'false'
47-
4842
// Create a short, unique suffix, that will be unique to each resource group
4943
param deploymentTimestamp string = utcNow('yyyyMMddHHmmss')
5044
var uniqueSuffix = substring(uniqueString('${resourceGroup().id}-${deploymentTimestamp}'), 0, 4)
@@ -73,7 +67,6 @@ var storageParts = split(azureStorageAccountResourceId, '/')
7367
var azureStorageSubscriptionId = storagePassedIn ? storageParts[2] : subscription().subscriptionId
7468
var azureStorageResourceGroupName = storagePassedIn ? storageParts[4] : resourceGroup().name
7569

76-
var virtualNetwork = toLower('${aiServices}${uniqueSuffix}vnet')
7770
/*
7871
Validate existing resources
7972
This module will check if the AI Search Service, Storage Account, and Cosmos DB Account already exist.
@@ -115,10 +108,6 @@ module aiDependencies 'modules-standard/standard-dependent-resources.bicep' = {
115108
// Cosmos DB Account
116109
cosmosDBResourceId: azureCosmosDBAccountResourceId
117110
cosmosDBExists: validateExistingResources.outputs.cosmosDBExists
118-
119-
// vnet injection
120-
vnetName: virtualNetwork
121-
networkInjection: enableNetworkInjection
122111
}
123112
}
124113

@@ -137,9 +126,6 @@ module aiAccount 'modules-standard/ai-account-identity.bicep' = {
137126
modelVersion: modelVersion
138127
modelSkuName: modelSkuName
139128
modelCapacity: modelCapacity
140-
141-
subnetId: aiDependencies.outputs.subnetId
142-
networkInjection: enableNetworkInjection
143129
}
144130
dependsOn: [
145131
validateExistingResources, aiDependencies
@@ -225,10 +211,9 @@ module addProjectCapabilityHost 'modules-standard/add-project-capability-host.bi
225211
cosmosDBConnection: aiProject.outputs.cosmosDBConnection
226212
azureStorageConnection: aiProject.outputs.azureStorageConnection
227213
aiSearchConnection: aiProject.outputs.aiSearchConnection
214+
228215
projectCapHost: projectCapHost
229216
accountCapHost: accountCapHost
230-
subnetId: aiDependencies.outputs.subnetId
231-
networkInjection: enableNetworkInjection
232217
}
233218
dependsOn: [
234219
aiSearchRoleAssignments, cosmosAccountRoleAssignments, storageAccountRoleAssignment

use-cases/agents/setup/standard-setup/modules-standard/add-project-capability-host.bicep

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ param projectName string
55
param accountName string
66
param projectCapHost string
77
param accountCapHost string
8-
param subnetId string
9-
param networkInjection string
108

119
var threadConnections = ['${cosmosDBConnection}']
1210
var storageConnections = ['${azureStorageConnection}']
@@ -17,7 +15,6 @@ var vectorStoreConnections = ['${aiSearchConnection}']
1715
resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
1816
name: accountName
1917
}
20-
2118
#disable-next-line BCP081
2219
resource project 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-preview' existing = {
2320
name: projectName
@@ -26,7 +23,7 @@ resource project 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-previ
2623

2724

2825
#disable-next-line BCP081
29-
resource accountCapabilityHost 'Microsoft.CognitiveServices/accounts/capabilityHosts@2025-04-01-preview' = if (networkInjection == 'false') {
26+
resource accountCapabilityHost 'Microsoft.CognitiveServices/accounts/capabilityHosts@2025-04-01-preview' = {
3027
name: accountCapHost
3128
parent: account
3229
properties: {
@@ -35,6 +32,7 @@ resource project 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-previ
3532
}
3633
}
3734

35+
3836
#disable-next-line BCP081
3937
resource projectCapabilityHost 'Microsoft.CognitiveServices/accounts/projects/capabilityHosts@2025-04-01-preview' = {
4038
name: projectCapHost

use-cases/agents/setup/standard-setup/modules-standard/ai-account-identity.bicep

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ param modelName string
55
param modelFormat string
66
param modelVersion string
77
param modelSkuName string
8-
param modelCapacity int
9-
param subnetId string
10-
param networkInjection string
8+
param modelCapacity int
119

1210
#disable-next-line BCP081
1311
resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' = {
@@ -29,13 +27,7 @@ resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' = {
2927
ipRules: []
3028
}
3129
publicNetworkAccess: 'Enabled'
32-
networkInjections:((networkInjection == 'true') ? [
33-
{
34-
scenario: 'agent'
35-
subnetArmId: subnetId
36-
useMicrosoftManagedNetwork: false
37-
}
38-
] : [])
30+
3931
// true is not supported today
4032
disableLocalAuth: false
4133
}

use-cases/agents/setup/standard-setup/modules-standard/standard-dependent-resources.bicep

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ param aiSearchExists bool
2929
param azureStorageExists bool
3030
param cosmosDBExists bool
3131

32-
@description('Name of the new virtual network')
33-
param vnetName string
34-
param networkInjection string
3532

3633
var cosmosParts = split(cosmosDBResourceId, '/')
3734

@@ -191,44 +188,6 @@ resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' = if(!azureStora
191188
}
192189
}
193190

194-
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2024-05-01' = if (networkInjection == 'true'){
195-
name: vnetName
196-
location: location
197-
properties: {
198-
addressSpace: {
199-
addressPrefixes: [
200-
'192.168.0.0/16'
201-
]
202-
}
203-
subnets: [
204-
{
205-
name: 'default'
206-
properties: {
207-
addressPrefix: '192.168.0.0/24'
208-
}
209-
}
210-
]
211-
}
212-
}
213-
214-
resource subnet 'Microsoft.Network/virtualNetworks/subnets@2024-05-01' = if (networkInjection == 'true'){
215-
parent: virtualNetwork
216-
name: 'default'
217-
properties: {
218-
addressPrefix: '192.168.0.0/24'
219-
delegations: [
220-
{
221-
id: '${virtualNetwork.id}/subnets/default"'
222-
name: 'Microsoft.App/environments'
223-
properties: {
224-
serviceName: 'Microsoft.App/environments'
225-
}
226-
type: 'Microsoft.Network/virtualNetworks/subnets/delegations'
227-
}
228-
]
229-
}
230-
}
231-
232191
// output aiServicesName string = aiServiceExists ? existingAIServiceAccount.name : aiServicesName
233192
// output aiservicesID string = aiServiceExists ? existingAIServiceAccount.id : aiServices.id
234193
// output aiservicesTarget string = aiServiceExists ? existingAIServiceAccount.properties.endpoint : aiServices.properties.endpoint
@@ -250,5 +209,4 @@ output cosmosDBId string = cosmosDBExists ? existingCosmosDB.id : cosmosDB.id
250209
output cosmosDBResourceGroupName string = cosmosDBExists ? cosmosParts[4] : resourceGroup().name
251210
output cosmosDBSubscriptionId string = cosmosDBExists ? cosmosParts[2] : subscription().subscriptionId
252211

253-
output subnetId string = subnet.id
254212
// output keyvaultId string = keyVault.id

0 commit comments

Comments
 (0)