File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ param applicationInsightsName string = ''
8
8
param appServicePlanId string
9
9
param keyVaultName string = ''
10
10
param managedIdentity bool = !empty (keyVaultName )
11
+ param storageAccountName string
11
12
12
13
// Runtime Properties
13
14
@allowed ([
@@ -54,7 +55,7 @@ module functions 'appservice.bicep' = {
54
55
applicationInsightsName : applicationInsightsName
55
56
appServicePlanId : appServicePlanId
56
57
appSettings : union (appSettings , {
57
- AzureWebJobsStorage : ''
58
+ AzureWebJobsStorage : 'DefaultEndpointsProtocol=https;AccountName=${ storage . name };AccountKey=${ storage . listKeys (). keys [ 0 ]. value };EndpointSuffix=${ environment (). suffixes . storage } '
58
59
FUNCTIONS_EXTENSION_VERSION : extensionVersion
59
60
FUNCTIONS_WORKER_RUNTIME : runtimeName
60
61
})
@@ -76,6 +77,10 @@ module functions 'appservice.bicep' = {
76
77
}
77
78
}
78
79
80
+ resource storage 'Microsoft.Storage/storageAccounts@2021-09-01' existing = {
81
+ name : storageAccountName
82
+ }
83
+
79
84
output identityPrincipalId string = managedIdentity ? functions .outputs .identityPrincipalId : ''
80
85
output name string = functions .outputs .name
81
86
output uri string = functions .outputs .uri
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ param webappLocation string // Set in main.parameters.json
19
19
// Azure OpenAI -- Cognitive Services
20
20
param assistantId string = '' // Set in main.parameters.json
21
21
22
+ param blobContainerName string = 'files'
23
+
22
24
var assistantGpt = {
23
25
modelName : 'gpt-35-turbo'
24
26
deploymentName : 'gpt-35-turbo'
@@ -71,6 +73,7 @@ module api './core/host/functions.bicep' = {
71
73
runtimeName : 'node'
72
74
runtimeVersion : '20'
73
75
appServicePlanId : appServicePlan .outputs .id
76
+ storageAccountName : storage .outputs .name
74
77
managedIdentity : true
75
78
appSettings : {
76
79
AZURE_OPENAI_ENDPOINT : finalOpenAiUrl
@@ -105,7 +108,12 @@ module storage './core/storage/storage-account.bicep' = {
105
108
location : location
106
109
tags : tags
107
110
allowBlobPublicAccess : false
108
- containers : []
111
+ containers : [
112
+ {
113
+ name : blobContainerName
114
+ publicAccess : 'None'
115
+ }
116
+ ]
109
117
}
110
118
}
111
119
You can’t perform that action at this time.
0 commit comments