@@ -254,7 +254,7 @@ resource cognitiveServiceExisting 'Microsoft.CognitiveServices/accounts@2025-04-
254254 scope : resourceGroup (existingCognitiveServiceDetails [2 ], existingCognitiveServiceDetails [4 ])
255255}
256256
257- module cognigive_service_dependencies ' modules/dependencies.bicep' = if (!useExistingService ) {
257+ module cognitive_service_dependencies './ modules/dependencies.bicep' = if (!useExistingService ) {
258258 params : {
259259 projectName : projectName
260260 projectDescription : projectDescription
@@ -271,7 +271,7 @@ module cognigive_service_dependencies 'modules/dependencies.bicep' = if(!useExis
271271 }
272272}
273273
274- module existing_cognigive_service_dependencies ' modules/dependencies.bicep' = if (useExistingService ) {
274+ module existing_cognitive_service_dependencies './ modules/dependencies.bicep' = if (useExistingService ) {
275275 params : {
276276 name : cognitiveServiceExisting .name
277277 projectName : projectName
@@ -311,20 +311,20 @@ output endpoint string = useExistingService ? cognitiveServiceExisting.propertie
311311output endpoints endpointType = useExistingService ? cognitiveServiceExisting .properties .endpoints : cognitiveService .properties .endpoints
312312
313313@description ('The principal ID of the system assigned identity.' )
314- output systemAssignedMIPrincipalId string ? = '' // cognitiveService.?identity.?principalId
314+ output systemAssignedMIPrincipalId string ? = useExistingService ? cognitiveServiceExisting . identity . principalId : cognitiveService .?identity .?principalId
315315
316316@description ('The location the resource was deployed into.' )
317- output location string = '' // cognitiveService.location
317+ output location string = useExistingService ? cognitiveServiceExisting . location : cognitiveService .location
318318
319319import { secretsOutputType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
320320@description ('A hashtable of references to the secrets exported to the provided Key Vault. The key of each reference is each secret\' s name.' )
321- output exportedSecrets secretsOutputType = {} //cognigive_service_dependencies .outputs.exportedSecrets
321+ output exportedSecrets secretsOutputType = useExistingService ? existing_cognitive_service_dependencies . outputs . exportedSecrets : cognitive_service_dependencies .outputs .exportedSecrets
322322
323323@description ('The private endpoints of the congitive services account.' )
324- output privateEndpoints privateEndpointOutputType [] = [] //cognigive_service_dependencies .outputs.privateEndpoints
324+ output privateEndpoints privateEndpointOutputType [] = useExistingService ? existing_cognitive_service_dependencies . outputs . privateEndpoints : cognitive_service_dependencies .outputs .privateEndpoints
325325
326- import { aiProjectOutputType } from './modules/ project.bicep'
327- output aiProjectInfo aiProjectOutputType = useExistingService ? existing_cognigive_service_dependencies .outputs .aiProjectInfo : cognigive_service_dependencies .outputs .aiProjectInfo
326+ import { aiProjectOutputType } from './project.bicep'
327+ output aiProjectInfo aiProjectOutputType = useExistingService ? existing_cognitive_service_dependencies .outputs .aiProjectInfo : cognitive_service_dependencies .outputs .aiProjectInfo
328328
329329// ================ //
330330// Definitions //
0 commit comments