Skip to content

Commit 5b3a5b1

Browse files
Merge pull request microsoft#1075 from AbdulMujeeb-2000/dev
fix: Resolve intermittent app settings environment value skipping
2 parents 2f534f7 + b032bc6 commit 5b3a5b1

1 file changed

Lines changed: 24 additions & 15 deletions

File tree

infra/avm/modules/compute/app-service.bicep

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ module appService 'br/public:avm/res/web/site:0.23.1' = {
112112
healthCheckPath: !empty(healthCheckPath) ? healthCheckPath : null
113113
webSocketsEnabled: webSocketsEnabled
114114
appCommandLine: appCommandLine
115+
vnetRouteAllEnabled: vnetRouteAllEnabled
115116
acrUseManagedIdentityCreds: !empty(acrUserManagedIdentityClientId)
116117
acrUserManagedIdentityID: !empty(acrUserManagedIdentityClientId) ? acrUserManagedIdentityClientId : null
117118
}
@@ -122,21 +123,6 @@ module appService 'br/public:avm/res/web/site:0.23.1' = {
122123
properties: appSettings
123124
applicationInsightResourceId: !empty(applicationInsightResourceId) ? applicationInsightResourceId : null
124125
}
125-
{
126-
name: 'logs'
127-
properties: {
128-
applicationLogs: { fileSystem: { level: 'Verbose' } }
129-
detailedErrorMessages: { enabled: true }
130-
failedRequestsTracing: { enabled: true }
131-
httpLogs: { fileSystem: { enabled: true, retentionInDays: 1, retentionInMb: 35 } }
132-
}
133-
}
134-
{
135-
name:'web'
136-
properties: {
137-
vnetRouteAllEnabled: vnetRouteAllEnabled
138-
}
139-
}
140126
]
141127
outboundVnetRouting: {
142128
contentShareTraffic: contentShareTraffic
@@ -159,6 +145,28 @@ module appService 'br/public:avm/res/web/site:0.23.1' = {
159145
}
160146
}
161147

148+
// ============================================================================
149+
// Logs Configuration (deployed serially after appsettings)
150+
// Deploy logs after app settings to prevent concurrent config writes.
151+
// ============================================================================
152+
resource site 'Microsoft.Web/sites@2025-03-01' existing = {
153+
name: name
154+
}
155+
156+
resource logsConfig 'Microsoft.Web/sites/config@2025-03-01' = {
157+
parent: site
158+
name: 'logs'
159+
properties: {
160+
applicationLogs: { fileSystem: { level: 'Verbose' } }
161+
detailedErrorMessages: { enabled: true }
162+
failedRequestsTracing: { enabled: true }
163+
httpLogs: { fileSystem: { enabled: true, retentionInDays: 1, retentionInMb: 35 } }
164+
}
165+
dependsOn: [
166+
appService
167+
]
168+
}
169+
162170
// ============================================================================
163171
// Outputs
164172
// ============================================================================
@@ -176,3 +184,4 @@ output appUrl string = 'https://${appService.outputs.defaultHostname}'
176184

177185
@description('System-assigned identity principal ID.')
178186
output identityPrincipalId string = appService.outputs.?systemAssignedMIPrincipalId ?? ''
187+

0 commit comments

Comments
 (0)