From 7b05928121803bc3413e780d695399b34f805a9a Mon Sep 17 00:00:00 2001 From: Anthony Shaw Date: Sun, 5 May 2024 15:46:27 +1000 Subject: [PATCH] Cruft Update (force) --- .cruft.json | 2 +- infra/core/database/cosmos/cosmos-account.bicep | 1 + infra/core/host/appservice.bicep | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.cruft.json b/.cruft.json index 1fbf32f..a634617 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/Azure-Samples/Azure-Python-Standardization-Template-Generator", - "commit": "397605f4143cc348247197e9b1c30729a94b828f", + "commit": "f9a5fdc99895df6e7f4844a19cb000ec8eb23bca", "checkout": null, "context": { "cookiecutter": { diff --git a/infra/core/database/cosmos/cosmos-account.bicep b/infra/core/database/cosmos/cosmos-account.bicep index 741a862..e3be52c 100644 --- a/infra/core/database/cosmos/cosmos-account.bicep +++ b/infra/core/database/cosmos/cosmos-account.bicep @@ -29,6 +29,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableKeyBasedMetadataWriteAccess: true // See PsRule AZR-000095 } } diff --git a/infra/core/host/appservice.bicep b/infra/core/host/appservice.bicep index bef4d2b..85aac63 100644 --- a/infra/core/host/appservice.bicep +++ b/infra/core/host/appservice.bicep @@ -17,6 +17,8 @@ param runtimeName string param runtimeNameAndVersion string = '${runtimeName}|${runtimeVersion}' param runtimeVersion string +param enableDiagnosticLogging bool = true + // Microsoft.Web/sites Properties param kind string = 'app,linux' @@ -58,6 +60,10 @@ resource appService 'Microsoft.Web/sites@2022-03-01' = { cors: { allowedOrigins: union([ 'https://portal.azure.com', 'https://ms.portal.azure.com' ], allowedOrigins) } + // Diagnostic logging + detailedErrorLoggingEnabled: enableDiagnosticLogging + httpLoggingEnabled: enableDiagnosticLogging + requestTracingEnabled: enableDiagnosticLogging } clientAffinityEnabled: clientAffinityEnabled httpsOnly: true