diff --git a/infra/app/web.bicep b/infra/app/web.bicep index 7bfe91711..d24bb0a39 100644 --- a/infra/app/web.bicep +++ b/infra/app/web.bicep @@ -122,16 +122,16 @@ module web '../core/host/appservice.bicep' = { '2023-05-01' ).key1 AZURE_COSMOSDB_ACCOUNT_KEY: (useKeyVault || cosmosDBKeyName == '') - ? cosmosDBKeyName - : listKeys( - resourceId( - subscription().subscriptionId, - resourceGroup().name, - 'Microsoft.DocumentDB/databaseAccounts', - cosmosDBKeyName - ), - '2022-08-15' - ).primaryMasterKey + ? cosmosDBKeyName + : listKeys( + resourceId( + subscription().subscriptionId, + resourceGroup().name, + 'Microsoft.DocumentDB/databaseAccounts', + cosmosDBKeyName + ), + '2022-08-15' + ).primaryMasterKey }) keyVaultName: keyVaultName runtimeName: runtimeName @@ -202,7 +202,6 @@ module cosmosRoleDefinition '../core/database/cosmos-sql-role-def.bicep' = { ] } - module cosmosUserRole '../core/database/cosmos-sql-role-assign.bicep' = { name: 'cosmos-sql-user-role-${web.name}' params: { diff --git a/infra/core/host/functions.bicep b/infra/core/host/functions.bicep index f8d1b0865..fac21a7d6 100644 --- a/infra/core/host/functions.bicep +++ b/infra/core/host/functions.bicep @@ -71,7 +71,11 @@ module functions 'appservice.bicep' = { FUNCTIONS_EXTENSION_VERSION: extensionVersion }, !useDocker ? { FUNCTIONS_WORKER_RUNTIME: runtimeName } : {}, - useKeyVault ? { AzureWebJobsStorage: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${storage.listKeys().keys[0].value};EndpointSuffix=${environment().suffixes.storage}'} : {AzureWebJobsStorage__accountName: storage.name} + useKeyVault + ? { + AzureWebJobsStorage: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${storage.listKeys().keys[0].value};EndpointSuffix=${environment().suffixes.storage}' + } + : { AzureWebJobsStorage__accountName: storage.name } ) clientAffinityEnabled: clientAffinityEnabled enableOryxBuild: enableOryxBuild