diff --git a/Environments/Todo-Nodejs-Mongo-AKS/app/db.bicep b/Environments/Todo-Nodejs-Mongo-AKS/app/db.bicep index 938949c6..8d828333 100644 --- a/Environments/Todo-Nodejs-Mongo-AKS/app/db.bicep +++ b/Environments/Todo-Nodejs-Mongo-AKS/app/db.bicep @@ -18,6 +18,7 @@ param collections array = [ ] param databaseName string = '' param keyVaultName string +param keyVaultResourceGroupName string // Because databaseName is optional in main.bicep, we make sure the database name is set here. var defaultDatabaseName = 'Todo' @@ -31,6 +32,7 @@ module cosmos '../core/database/cosmos/mongo/cosmos-mongo-db.bicep' = { location: location collections: collections keyVaultName: keyVaultName + keyVaultResourceGroupName: keyVaultResourceGroupName tags: tags } } diff --git a/Environments/Todo-Nodejs-Mongo-AKS/main.bicep b/Environments/Todo-Nodejs-Mongo-AKS/main.bicep index 0320a02a..c70b89ac 100644 --- a/Environments/Todo-Nodejs-Mongo-AKS/main.bicep +++ b/Environments/Todo-Nodejs-Mongo-AKS/main.bicep @@ -10,6 +10,7 @@ param location string = resourceGroup().location param cosmosAccountName string = '' param cosmosDatabaseName string = '' param keyvaultName string = '' +param keyVaultResourceGroupName string = resourceGroup().name var abbrs = loadJsonContent('./abbreviations.json') var resourceToken = toLower(uniqueString(subscription().id, environmentName, location)) @@ -24,6 +25,7 @@ module cosmos './app/db.bicep' = { location: location tags: tags keyVaultName: keyvaultName + keyVaultResourceGroupName: keyVaultResourceGroupName } } diff --git a/Environments/Todo-Nodejs-Mongo-AKS/manifest.yaml b/Environments/Todo-Nodejs-Mongo-AKS/manifest.yaml index 5a56bb76..18c37573 100644 --- a/Environments/Todo-Nodejs-Mongo-AKS/manifest.yaml +++ b/Environments/Todo-Nodejs-Mongo-AKS/manifest.yaml @@ -22,4 +22,10 @@ parameters: name: "keyvaultName (e.g. kv-abc123)" description: "keyvault name that store the secret for mongo connection string" type: string - required: true \ No newline at end of file + required: true + +- id: "keyvaultResourceGroupName" + name: "keyvaultResourceGroupName (e.g. rg-abc123)" + description: "keyvault group name contains the key vault above" + type: string + required: true \ No newline at end of file