Skip to content

Commit 04f8eaa

Browse files
author
Harmanpreet Kaur
committed
updated the bicep
1 parent 51bbc9a commit 04f8eaa

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

infra/deploy_app_service.bicep

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ param solutionName string
1010
// param solutionLocation string
1111

1212
// param identity string
13-
var abbrs = loadJsonContent('./abbreviations.json')
13+
1414

1515
@description('Name of App Service plan')
16-
var HostingPlanName = '${abbrs.compute.appServicePlan}${solutionName}'
16+
param HostingPlanName string
1717

1818
@description('The pricing tier for the App Service plan')
1919
@allowed(
@@ -24,7 +24,7 @@ var HostingPlanName = '${abbrs.compute.appServicePlan}${solutionName}'
2424
param HostingPlanSku string = 'B1'
2525

2626
@description('Name of Web App')
27-
var WebsiteName = '${abbrs.compute.webApp}${solutionName}'
27+
param WebsiteName string
2828

2929
// @description('Name of Application Insights')
3030
// param ApplicationInsightsName string = '${ solutionName }-app-insights'

infra/deploy_cosmos_db.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ param solutionName string
55
param solutionLocation string
66
param keyVaultName string
77
var abbrs = loadJsonContent('./abbreviations.json')
8+
param accountName string
89

9-
var accountName = '${abbrs.databases.cosmosDBDatabase}${solutionName}'
1010
var databaseName = 'db_conversation_history'
1111
var collectionName = 'conversations'
1212

infra/deploy_keyvault.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ param solutionLocation string
66
param managedIdentityObjectId string
77
var abbrs = loadJsonContent('./abbreviations.json')
88

9-
var keyvaultName = '${abbrs.security.keyVault}${solutionName}'
9+
param keyvaultName string
1010

1111
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
1212
name: keyvaultName

infra/deploy_managed_identity.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ param solutionName string
1111
param solutionLocation string
1212

1313
@description('Name')
14-
var miName = '${abbrs.security.managedIdentity}${solutionName}'
14+
param miName string
1515

1616
resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
1717
name: miName

infra/deploy_storage_account.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ========== Storage Account ========== //
22
targetScope = 'resourceGroup'
3-
var abbrs = loadJsonContent('./abbreviations.json')
3+
44
@minLength(3)
55
@maxLength(15)
66
@description('Solution Name')
@@ -10,7 +10,7 @@ param solutionName string
1010
param solutionLocation string
1111

1212
@description('Name')
13-
var saName = '${abbrs.storage.storageAccount}${ solutionName }'
13+
param saName string
1414

1515
param keyVaultName string
1616
param managedIdentityObjectId string

infra/main.bicep

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ module managedIdentityModule 'deploy_managed_identity.bicep' = {
7171
params: {
7272
solutionName: solutionPrefix
7373
solutionLocation: solutionLocation
74+
miName: '${abbrs.security.managedIdentity}${solutionPrefix}'
7475
}
7576
scope: resourceGroup(resourceGroup().name)
7677
}
@@ -82,6 +83,7 @@ module kvault 'deploy_keyvault.bicep' = {
8283
solutionName: solutionPrefix
8384
solutionLocation: resourceGroupLocation
8485
managedIdentityObjectId:managedIdentityModule.outputs.managedIdentityOutput.objectId
86+
keyvaultName:'${abbrs.security.keyVault}${solutionPrefix}'
8587
}
8688
scope: resourceGroup(resourceGroup().name)
8789
}
@@ -112,6 +114,7 @@ module storageAccount 'deploy_storage_account.bicep' = {
112114
solutionLocation: solutionLocation
113115
keyVaultName: kvault.outputs.keyvaultName
114116
managedIdentityObjectId:managedIdentityModule.outputs.managedIdentityOutput.objectId
117+
saName:'${abbrs.storage.storageAccount}${ solutionPrefix}'
115118
}
116119
scope: resourceGroup(resourceGroup().name)
117120
}
@@ -383,6 +386,8 @@ module appserviceModule 'deploy_app_service.bicep' = {
383386
AZURE_COSMOSDB_CONVERSATIONS_CONTAINER: cosmosDBModule.outputs.cosmosContainerName
384387
AZURE_COSMOSDB_DATABASE: cosmosDBModule.outputs.cosmosDatabaseName
385388
AZURE_COSMOSDB_ENABLE_FEEDBACK:'True'
389+
HostingPlanName:'${abbrs.compute.appServicePlan}${solutionPrefix}'
390+
WebsiteName:'${abbrs.compute.webApp}${solutionPrefix}'
386391
}
387392
scope: resourceGroup(resourceGroup().name)
388393
// dependsOn:[sqlDBModule]
@@ -421,6 +426,7 @@ module cosmosDBModule 'deploy_cosmos_db.bicep' = {
421426
solutionName: solutionPrefix
422427
solutionLocation: secondaryLocation
423428
keyVaultName: kvault.outputs.keyvaultName
429+
accountName: '${abbrs.databases.cosmosDBDatabase}${solutionPrefix}'
424430
}
425431
scope: resourceGroup(resourceGroup().name)
426432
}

0 commit comments

Comments
 (0)