@@ -362,7 +362,7 @@ module backend 'core/host/appservice.bicep' = if (deploymentTarget == 'appservic
362
362
363
363
// identity for pulling images from ACR
364
364
module acaIdentity 'core/security/aca-identity.bicep' = if (deploymentTarget == 'containerapps' ) {
365
- name : acaIdentityName
365
+ name : 'aca-identity'
366
366
scope : resourceGroup
367
367
params : {
368
368
identityName : acaIdentityName
@@ -394,11 +394,11 @@ module acaBackend 'core/host/container-app-upsert.bicep' = if (deploymentTarget
394
394
params : {
395
395
name : !empty (backendServiceName ) ? backendServiceName : '${abbrs .webSitesContainerApps }backend-${resourceToken }'
396
396
location : location
397
- identityName : acaIdentity .name
397
+ identityName : ( deploymentTarget == 'containerapps' ) ? acaIdentity .name : ''
398
398
exists : webAppExists
399
399
workloadProfile : azureContainerAppsWorkloadProfile
400
- containerRegistryName : containerApps .outputs .registryName
401
- containerAppsEnvironmentName : containerApps .outputs .environmentName
400
+ containerRegistryName : ( deploymentTarget == 'containerapps' ) ? containerApps .outputs .registryName : ''
401
+ containerAppsEnvironmentName : ( deploymentTarget == 'containerapps' ) ? containerApps .outputs .environmentName : ''
402
402
identityType : 'UserAssigned'
403
403
tags : union (tags , { 'azd-service-name' : 'backend' })
404
404
targetPort : 8000
@@ -460,7 +460,7 @@ module acaBackend 'core/host/container-app-upsert.bicep' = if (deploymentTarget
460
460
USE_LOCAL_PDF_PARSER : useLocalPdfParser
461
461
USE_LOCAL_HTML_PARSER : useLocalHtmlParser
462
462
// For using managed identity to access Azure resources. See https://github.com/microsoft/azure-container-apps/issues/442
463
- AZURE_CLIENT_ID : acaIdentity .outputs .clientId
463
+ AZURE_CLIENT_ID : ( deploymentTarget == 'containerapps' ) ? acaIdentity .outputs .clientId : ''
464
464
}
465
465
}
466
466
}
0 commit comments