Azure 'WebApp' => How to set 'WebApp - Diagnost...
# azure
f
Azure 'WebApp' => How to set 'WebApp - DiagnosticSettings' => Hi all! I need to set the Diagnostic Settings of my azure webapp via Pulumi/TypeScript. For this I have identified the resource type 'WebAppDiagnosticLogsConfiguration'. I need to set the following Diagnostic Settings available in Azure Portal: - HTTP Logs - App Service Console Logs - App Service Application Logs But unfortunately there is no property in 'WebAppDiagnosticLogsConfiguration' for these settings (e.g. for 'App Service Console Logs'). What am I doing wrong or which resource should I use to set the Diagnostic Settings?
i
here are the diagnostic settings available for an app service / web app:
I also found this in the JSON view for an app service that I have:
"eligibleLogCategories": "AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs",
Also from the ARM template
Copy code
"type": "Microsoft.Web/sites/config",
    "httpLoggingEnabled": true,
    "detailedErrorLoggingEnabled": true,
    "logsDirectorySizeLimit": 35,
    "azureStorageAccounts": {}
should correspond to:
f
Hello Patrick and thank you very much for your support on 'How to set 'WebApp - DiagnosticSettings'. Sorry at this point also for my late feedback.... In the meantime I had a closer look at the DialogSettings dialog you linked above and saw that there is a separate 'JSON view' button for it which shows the following path as namespace/type:
/providers/Microsoft.Network/applicationGateways/application-gateway/providers/microsoft.insights/diagnosticSettings/
I then found under Pulumi in the Insights namespace the 'azure-native.insights.DiagnosticSetting' resource. This resource corresponds exactly to the properties displayed in the DialogSettings dialog of the webapp. So the solution is to create an 'azure-native.insights.DiagnosticSetting' resource and assign it to the webapp via the 'resourceUri' property.