Skip to content

Commit 606f933

Browse files
author
Mike Swantek
committed
testing of AVM modle pr
1 parent 6113b01 commit 606f933

2 files changed

Lines changed: 666 additions & 11 deletions

File tree

infra/modules/avm/cognitive-services/main.bicep

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
metadata name = 'Cognitive Services'
32
metadata description = 'This module deploys a Cognitive Service.'
43

@@ -246,6 +245,7 @@ var builtInRoleNames = {
246245
'Microsoft.Authorization/roleDefinitions',
247246
'a97b65f3-24c7-4388-baec-2e87135dc908'
248247
)
248+
//Added Azure AI Developer role to the list of built-in roles
249249
'Azure AI Developer': subscriptionResourceId(
250250
'Microsoft.Authorization/roleDefinitions',
251251
'64702f94-c441-49e6-a78b-ef80e0188fee'
@@ -293,26 +293,26 @@ resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableT
293293
}
294294
}
295295

296-
resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
296+
resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
297297
name: last(split(customerManagedKey.?keyVaultResourceId!, '/'))
298298
scope: resourceGroup(
299299
split(customerManagedKey.?keyVaultResourceId!, '/')[2],
300300
split(customerManagedKey.?keyVaultResourceId!, '/')[4]
301301
)
302302

303-
resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
303+
resource cMKKey 'keys@2023-07-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
304304
name: customerManagedKey.?keyName!
305305
}
306306
}
307307

308-
resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
308+
resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2025-01-31-preview' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
309309
name: last(split(customerManagedKey.?userAssignedIdentityResourceId!, '/'))
310310
scope: resourceGroup(
311311
split(customerManagedKey.?userAssignedIdentityResourceId!, '/')[2],
312312
split(customerManagedKey.?userAssignedIdentityResourceId!, '/')[4]
313313
)
314314
}
315-
315+
//update the cognitive service account api for the Foundry FDP updates
316316
resource cognitiveService 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' = {
317317
name: name
318318
kind: kind
@@ -323,7 +323,7 @@ resource cognitiveService 'Microsoft.CognitiveServices/accounts@2025-04-01-previ
323323
name: sku
324324
}
325325
properties: {
326-
allowProjectManagement: true
326+
allowProjectManagement: true // allows project management for Cognitive Services accounts in AI Foundry - FDP updates
327327
customSubDomainName: customSubDomainName
328328
networkAcls: !empty(networkAcls ?? {})
329329
? {
@@ -359,11 +359,10 @@ resource cognitiveService 'Microsoft.CognitiveServices/accounts@2025-04-01-previ
359359
userOwnedStorage: userOwnedStorage
360360
dynamicThrottlingEnabled: dynamicThrottlingEnabled
361361
}
362-
}
363-
362+
}
364363

365364
@batchSize(1)
366-
resource cognitiveService_deployments 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = [
365+
resource cognitiveService_deployments 'Microsoft.CognitiveServices/accounts/deployments@2025-04-01-preview' = [
367366
for (deployment, index) in (deployments ?? []): {
368367
parent: cognitiveService
369368
name: deployment.?name ?? '${name}-deployments'
@@ -422,9 +421,9 @@ resource cognitiveService_diagnosticSettings 'Microsoft.Insights/diagnosticSetti
422421
}
423422
]
424423

425-
module cognitiveService_privateEndpoints 'br/public:avm/res/network/private-endpoint:0.10.1' = [
424+
module cognitiveService_privateEndpoints 'br/public:avm/res/network/private-endpoint:0.11.0' = [
426425
for (privateEndpoint, index) in (privateEndpoints ?? []): {
427-
name: '${uniqueString(deployment().name, location)}-cognitiveService-PrivateEndpoint-${index}'
426+
name: take('${uniqueString(deployment().name, location)}-cognitiveService-PrivateEndpoint-${index}', 64)
428427
scope: resourceGroup(
429428
split(privateEndpoint.?resourceGroupResourceId ?? resourceGroup().id, '/')[2],
430429
split(privateEndpoint.?resourceGroupResourceId ?? resourceGroup().id, '/')[4]

0 commit comments

Comments
 (0)