Skip to content

Commit c0e3731

Browse files
authored
feat(FN-1483): add AZURE env vars to TFM API infra (#2462)
1 parent 9e4a997 commit c0e3731

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

infrastructure/resource_group_level/main.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ var portalApiSecureConnectionStrings = { }
182182

183183
var tmfApiSettings = {
184184
RATE_LIMIT_THRESHOLD: RATE_LIMIT_THRESHOLD
185+
AZURE_UTILISATION_REPORTS_FILESHARE_NAME: AZURE_UTILISATION_REPORTS_FILESHARE_NAME
185186
}
186187
var tfmApiSecureSettings = {
187188
UKEF_TFM_API_SYSTEM_KEY: UKEF_TFM_API_SYSTEM_KEY

infrastructure/resource_group_level/modules/webapps/trade-finance-manager-api-calculated-variables.bicep

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,21 @@ resource cosmosDbAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' exis
3434
name: cosmosDbAccountName
3535
}
3636

37-
// Then there are the calculated values.
37+
// Then there are the calculated values.
3838
var mongoDbConnectionString = replace(cosmosDbAccount.listConnectionStrings().connectionStrings[0].connectionString, '&replicaSet=globaldb', '')
3939

40-
var calculatedAppSettings = {
40+
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' existing = {
41+
name: storageAccountName
42+
}
43+
var storageAccountKey = storageAccount.listKeys().keys[0].value
44+
45+
var calculatedAppSettings = {
4146
MONGO_INITDB_DATABASE: cosmosDbDatabaseName
4247
MONGODB_URI: mongoDbConnectionString
4348
AZURE_NUMBER_GENERATOR_FUNCTION_URL: 'https://${numberGeneratorFunctionDefaultHostName}'
4449
TFM_UI_URL: tfmUiUrl
50+
AZURE_PORTAL_STORAGE_ACCESS_KEY: storageAccountKey
51+
AZURE_PORTAL_STORAGE_ACCOUNT: storageAccountName
4552
}
4653

4754
var appSettingsCombined = union(appSettings, calculatedAppSettings)

0 commit comments

Comments
 (0)