Skip to content

Commit 7e422d5

Browse files
author
Shreyas-Microsoft
committed
final changes
1 parent d0e1d8d commit 7e422d5

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

infra/main.bicep

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,25 +217,38 @@ module network 'modules/network.bicep' = if (enablePrivateNetworking) {
217217
}
218218

219219
module aiServices 'modules/ai-foundry/main.bicep' = {
220-
name: take('aiservices-${resourcesName}-deployment', 64)
221-
#disable-next-line no-unnecessary-dependson
222-
dependsOn: [logAnalyticsWorkspace, network] // required due to optional flags that could change dependency
220+
name: take('avm.res.cognitive-services.account.${resourcesName}', 64)
223221
params: {
224222
name: 'ais-${resourcesName}'
225223
location: aiDeploymentsLocation
226224
sku: 'S0'
227225
kind: 'AIServices'
228-
deployments: [modelDeployment]
229-
projectName: 'proj-${resourcesName}'
230-
projectDescription: 'aifp-${solutionUniqueToken}'
226+
deployments: [ modelDeployment ]
227+
projectName: 'aifp-${resourcesName}'
228+
projectDescription: 'aifp-${resourcesName}'
231229
logAnalyticsWorkspaceResourceId: enableMonitoring ? logAnalyticsWorkspaceResourceId : ''
232-
existingFoundryProjectResourceId: azureExistingAIProjectResourceId
233230
privateNetworking: enablePrivateNetworking
234231
? {
235232
virtualNetworkResourceId: network.outputs.vnetResourceId
236233
subnetResourceId: network.outputs.subnetPrivateEndpointsResourceId
237234
}
238235
: null
236+
existingFoundryProjectResourceId: azureExistingAIProjectResourceId
237+
disableLocalAuth: true //Should be set to true for WAF aligned configuration
238+
customSubDomainName: 'ais-${resourcesName}'
239+
apiProperties: {
240+
//staticsEnabled: false
241+
}
242+
allowProjectManagement: true
243+
managedIdentities: {
244+
systemAssigned: true
245+
}
246+
publicNetworkAccess: 'Enabled'
247+
networkAcls: {
248+
bypass: 'AzureServices'
249+
defaultAction: 'Allow'
250+
}
251+
privateEndpoints: []
239252
roleAssignments: [
240253
{
241254
principalId: appIdentity.outputs.principalId

infra/modules/ai-foundry/main.bicep

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,12 @@ resource cognitiveServiceExisting 'Microsoft.CognitiveServices/accounts@2025-04-
303303
name: existingCognitiveServiceDetails[8]
304304
scope: resourceGroup(existingCognitiveServiceDetails[2], existingCognitiveServiceDetails[4])
305305
}
306-
307306
module cognitive_service_dependencies './dependencies.bicep' = if(!useExistingService) {
308307
name: take('${name}-cognitive-service-${cognitiveServiceNew.name}-dependencies', 64)
309308
params: {
310309
projectName: projectName
311310
projectDescription: projectDescription
312-
name: cognitiveServiceNew.name
311+
name: cognitiveServiceNew.name
313312
location: location
314313
deployments: deployments
315314
diagnosticSettings: !empty(logAnalyticsWorkspaceResourceId)

0 commit comments

Comments
 (0)