Skip to content

Commit 9774b9c

Browse files
committed
fix bicep issues
1 parent d42dd9f commit 9774b9c

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"ms-azuretools.vscode-bicep",
2626
"charliermarsh.ruff",
2727
"ms-python.python",
28-
"bierner.github-markdown-preview"
28+
"bierner.github-markdown-preview",
29+
"GitHub.copilot-chat"
2930
],
3031
"settings": {
3132
"python.defaultInterpreterPath": "/usr/local/bin/python",

infra/main.bicep

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ module resources 'resources.bicep' = {
4242
output AZURE_LOCATION string = location
4343
output APPLICATIONINSIGHTS_CONNECTION_STRING string = resources.outputs.APPLICATIONINSIGHTS_CONNECTION_STRING
4444
output WEB_URI string = resources.outputs.WEB_URI
45-
output WEB_APP_SETTINGS array = resources.outputs.WEB_APP_SETTINGS
4645
output WEB_APP_LOG_STREAM string = resources.outputs.WEB_APP_LOG_STREAM
4746
output WEB_APP_SSH string = resources.outputs.WEB_APP_SSH
4847
output WEB_APP_CONFIG string = resources.outputs.WEB_APP_CONFIG

infra/resources.bicep

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ resource cachePrivateEndpoint 'Microsoft.Network/privateEndpoints@2023-05-01' =
157157
}
158158
}
159159

160-
resource web 'Microsoft.Web/sites@2022-03-01' = {
160+
resource web 'Microsoft.Web/sites@2024-11-01' = {
161161
name: '${prefix}-app-service'
162162
location: location
163163
tags: union(tags, { 'azd-service-name': 'web' })
@@ -180,11 +180,11 @@ resource web 'Microsoft.Web/sites@2022-03-01' = {
180180
resource appSettings 'config' = {
181181
name: 'appsettings'
182182
properties: {
183-
SCM_DO_BUILD_DURING_DEPLOYMENT: 'true'
184-
AZURE_POSTGRESQL_CONNECTIONSTRING: 'dbname=${pythonAppDatabase.name} host=${postgresServer.name}.postgres.database.azure.com port=5432 sslmode=require user=${postgresServer.properties.administratorLogin} password=${databasePassword}'
185-
SECRET_KEY: secretKey
186-
AZURE_REDIS_CONNECTIONSTRING: 'rediss://:${redisCache.listKeys().primaryKey}@${redisCache.name}.redis.cache.windows.net:6380/0'
187-
}
183+
SCM_DO_BUILD_DURING_DEPLOYMENT: 'true'
184+
AZURE_POSTGRESQL_CONNECTIONSTRING: 'dbname=${pythonAppDatabase.name} host=${postgresServer.name}.postgres.database.azure.com port=5432 sslmode=require user=${postgresServer.properties.administratorLogin} password=${databasePassword}'
185+
SECRET_KEY: secretKey
186+
AZURE_REDIS_CONNECTIONSTRING: 'rediss://:${redisCache.listKeys().primaryKey}@${redisCache.name}.redis.cache.windows.net:6380/0'
187+
}
188188
}
189189

190190
resource logs 'config' = {
@@ -362,14 +362,6 @@ resource redisCache 'Microsoft.Cache/redis@2023-04-01' = {
362362

363363
output WEB_URI string = 'https://${web.properties.defaultHostName}'
364364
output APPLICATIONINSIGHTS_CONNECTION_STRING string = applicationInsightsResources.outputs.APPLICATIONINSIGHTS_CONNECTION_STRING
365-
366-
resource webAppSettings 'Microsoft.Web/sites/config@2022-03-01' existing = {
367-
name: web::appSettings.name
368-
parent: web
369-
}
370-
371-
var webAppSettingsKeys = map(items(webAppSettings.list().properties), setting => setting.key)
372-
output WEB_APP_SETTINGS array = webAppSettingsKeys
373365
output WEB_APP_LOG_STREAM string = format('https://portal.azure.com/#@/resource{0}/logStream', web.id)
374366
output WEB_APP_SSH string = format('https://{0}.scm.azurewebsites.net/webssh/host', web.name)
375367
output WEB_APP_CONFIG string = format('https://portal.azure.com/#@/resource{0}/configuration', web.id)

0 commit comments

Comments
 (0)