@@ -260,7 +260,7 @@ resource cognitiveServiceExisting 'Microsoft.CognitiveServices/accounts@2025-04-
260260 scope : resourceGroup (existingCognitiveServiceDetails [2 ], existingCognitiveServiceDetails [4 ])
261261}
262262
263- module cognigive_service_dependencies './dependencies.bicep' = if (!useExistingService ) {
263+ module cognitive_service_dependencies './dependencies.bicep' = if (!useExistingService ) {
264264 params : {
265265 projectName : projectName
266266 projectDescription : projectDescription
@@ -277,7 +277,7 @@ module cognigive_service_dependencies './dependencies.bicep' = if(!useExistingSe
277277 }
278278}
279279
280- module existing_cognigive_service_dependencies './dependencies.bicep' = if (useExistingService ) {
280+ module existing_cognitive_service_dependencies './dependencies.bicep' = if (useExistingService ) {
281281 params : {
282282 name : cognitiveServiceExisting .name
283283 projectName : projectName
@@ -317,20 +317,20 @@ output endpoint string = useExistingService ? cognitiveServiceExisting.propertie
317317output endpoints endpointType = useExistingService ? cognitiveServiceExisting .properties .endpoints : cognitiveService .properties .endpoints
318318
319319@description ('The principal ID of the system assigned identity.' )
320- output systemAssignedMIPrincipalId string ? = '' // cognitiveService.?identity.?principalId
320+ output systemAssignedMIPrincipalId string ? = useExistingService ? cognitiveServiceExisting . identity . principalId : cognitiveService .?identity .?principalId
321321
322322@description ('The location the resource was deployed into.' )
323- output location string = '' // cognitiveService.location
323+ output location string = useExistingService ? cognitiveServiceExisting . location : cognitiveService .location
324324
325325import { secretsOutputType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
326326@description ('A hashtable of references to the secrets exported to the provided Key Vault. The key of each reference is each secret\' s name.' )
327- output exportedSecrets secretsOutputType = {} //cognigive_service_dependencies .outputs.exportedSecrets
327+ output exportedSecrets secretsOutputType = useExistingService ? existing_cognitive_service_dependencies . outputs . exportedSecrets : cognitive_service_dependencies .outputs .exportedSecrets
328328
329329@description ('The private endpoints of the congitive services account.' )
330- output privateEndpoints privateEndpointOutputType [] = [] //cognigive_service_dependencies .outputs.privateEndpoints
330+ output privateEndpoints privateEndpointOutputType [] = useExistingService ? existing_cognitive_service_dependencies . outputs . privateEndpoints : cognitive_service_dependencies .outputs .privateEndpoints
331331
332332import { aiProjectOutputType } from './project.bicep'
333- output aiProjectInfo aiProjectOutputType = useExistingService ? existing_cognigive_service_dependencies .outputs .aiProjectInfo : cognigive_service_dependencies .outputs .aiProjectInfo
333+ output aiProjectInfo aiProjectOutputType = useExistingService ? existing_cognitive_service_dependencies .outputs .aiProjectInfo : cognitive_service_dependencies .outputs .aiProjectInfo
334334
335335// ================ //
336336// Definitions //
0 commit comments