Skip to content

Commit 0ae2075

Browse files
committed
feat: migrate to avm child module for app config
1 parent 97b1f27 commit 0ae2075

File tree

2 files changed

+12
-107
lines changed

2 files changed

+12
-107
lines changed

infra/core/site-app-settings.bicep

Lines changed: 0 additions & 93 deletions
This file was deleted.

infra/main.bicep

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -161,21 +161,20 @@ module burgerApiFunction 'br/public:avm/res/web/site:0.16.1' = {
161161
}
162162

163163
// Needed to avoid circular resource dependencies
164-
// TODO: migrate to child module once it's available in the public registry
165-
module burgerApiFunctionSettings './core/site-app-settings.bicep' = {
164+
module burgerApiFunctionSettings 'br/public:avm/res/web/site/config:0.1.0' = {
166165
name: 'burger-api-settings'
167166
scope: resourceGroup
168167
params: {
168+
name: 'appsettings'
169169
appName: burgerApiFunction.outputs.name
170-
kind: 'functionapp,linux'
171-
appSettingsKeyValuePairs: {
170+
properties: {
172171
AZURE_STORAGE_URL: storageUrl
173172
AZURE_STORAGE_CONTAINER_NAME: blobContainerName
174173
AZURE_COSMOSDB_NOSQL_ENDPOINT: cosmosDb.outputs.endpoint
175174
}
176175
storageAccountResourceId: storage.outputs.resourceId
177176
storageAccountUseIdentityAuthentication: true
178-
appInsightResourceId: monitoring.outputs.applicationInsightsResourceId
177+
applicationInsightResourceId: monitoring.outputs.applicationInsightsResourceId
179178
}
180179
}
181180

@@ -258,13 +257,13 @@ module agentApiFunction 'br/public:avm/res/web/site:0.16.1' = {
258257
}
259258

260259
// Needed to avoid circular resource dependencies
261-
module agentApiFunctionSettings './core/site-app-settings.bicep' = {
260+
module agentApiFunctionSettings 'br/public:avm/res/web/site/config:0.1.0' = {
262261
name: 'agent-api-settings'
263262
scope: resourceGroup
264263
params: {
264+
name: 'appsettings'
265265
appName: agentApiFunction.outputs.name
266-
kind: 'functionapp,linux'
267-
appSettingsKeyValuePairs: {
266+
properties: {
268267
AZURE_COSMOSDB_NOSQL_ENDPOINT: cosmosDb.outputs.endpoint
269268
AZURE_OPENAI_ENDPOINT: openAiUrl
270269
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME: chatModelName
@@ -274,7 +273,7 @@ module agentApiFunctionSettings './core/site-app-settings.bicep' = {
274273
}
275274
storageAccountResourceId: storage.outputs.resourceId
276275
storageAccountUseIdentityAuthentication: true
277-
appInsightResourceId: monitoring.outputs.applicationInsightsResourceId
276+
applicationInsightResourceId: monitoring.outputs.applicationInsightsResourceId
278277
}
279278
}
280279

@@ -362,21 +361,20 @@ module burgerMcpFunction 'br/public:avm/res/web/site:0.16.1' = {
362361
}
363362

364363
// Needed to avoid circular resource dependencies
365-
// TODO: migrate to child module once it's available in the public registry
366-
module burgerMcpFunctionSettings './core/site-app-settings.bicep' = {
364+
module burgerMcpFunctionSettings 'br/public:avm/res/web/site/config:0.1.0' = {
367365
name: 'burger-mcp-settings'
368366
scope: resourceGroup
369367
params: {
368+
name: 'appsettings'
370369
appName: burgerMcpFunction.outputs.name
371-
kind: 'functionapp,linux'
372-
appSettingsKeyValuePairs: {
370+
properties: {
373371
AZURE_STORAGE_URL: storageUrl
374372
AZURE_STORAGE_CONTAINER_NAME: blobContainerName
375373
BURGER_API_URL: burgerApiUrl
376374
}
377375
storageAccountResourceId: storage.outputs.resourceId
378376
storageAccountUseIdentityAuthentication: true
379-
appInsightResourceId: monitoring.outputs.applicationInsightsResourceId
377+
applicationInsightResourceId: monitoring.outputs.applicationInsightsResourceId
380378
}
381379
}
382380

0 commit comments

Comments
 (0)