I was in a SEV A with support last night due to an ARM Template deployment failing with the error:
"Category 'AppServiceFileAuditLogs' is not supported."
Support was hesitant to open an ICM and engage the product group b/c it appears these features have been in preview since 2019 (thats quite a long time).
I'm doing what I can to try and get to the bottom of this issue and figure out a path forward. I'd be happy to provide specifics about my case in a DM.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"org": {
"allowedValues": [
"redacted"
],
"type": "String"
},
"app_name": {
"type": "String"
},
"environment": {
"allowedValues": [
"test",
"uat",
"prod",
"train"
],
"type": "String"
},
"new_deployment": {
"type": "Bool"
},
"app_settings": {
"type": "Object"
},
"cors_allowed_origins": {
"defaultValue": [
"*"
],
"type": "Array",
"metadata": {
"description": "CORS allowed origins"
}
},
"subnet_resource_id": {
"defaultValue": "",
"type": "String"
},
"ip_restrictions": {
"defaultValue": [],
"type": "Array"
}
},
"variables": {
"ProdSubscriptionId": "redacted",
"tag_environment": "[toUpper(parameters('environment'))]",
"location": "[replace(resourceGroup().location,'us','')]",
"app_service_name": "[concat(parameters('org'),'-',parameters('app_name'),'-',variables('location'),'-',parameters('environment'))]",
"app_insights_location": "[if(equals(variables('location'),'west'),'westus2',resourceGroup().location)]",
"app_service_plan_id": "[resourceId('microsoft.web/serverfarms/', variables('app_service_name'))]",
"hiddenlink_app_service": "[concat('hidden-link:/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name,'/providers/Microsoft.Web/sites/',variables('app_service_name'))]",
"hiddenreleated_app_service_plan": "[concat('hidden-related:',variables('app_service_plan_id'))]",
"prod_log_analytics_workspace_id": "redacted",
"nonprod_log_analytics_workspace_id": "redacted",
"log_analytics_workspace_id": "[if(equals(subscription().subscriptionId,variables('ProdSubscriptionId')),variables('prod_log_analytics_workspace_id'),variables('nonprod_log_analytics_workspace_id'))]",
"quota_gb": "[if(equals(subscription().subscriptionId,variables('ProdSubscriptionId')),'50','10')]"
},
"resources": [
{
"type": "microsoft.insights/components",
"apiVersion": "2018-05-01-preview",
"name": "[variables('app_service_name')]",
"location": "[variables('app_insights_location')]",
"tags": {
"[variables('hiddenlink_app_service')]": "Resource",
"Application": "[parameters('app_name')]",
"Environment": "[variables('tag_environment')]",
"Region": "[variables('app_insights_location')]"
},
"kind": "web",
"properties": {
"ApplicationId": "[variables('app_service_name')]"
}
},
{
"type": "microsoft.insights/components/CurrentBillingFeatures",
"apiVersion": "2015-05-01",
"name": "[concat(variables('app_service_name'),'/Basic')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('microsoft.insights/components', variables('app_service_name'))]"
],
"properties": {
"CurrentBillingFeatures": "Basic",
"DataVolumeCap": {
"Cap": "[variables('quota_gb')]",
"WarningThreshold": 80,
"ResetTime": 5
}
}
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2019-08-01",
"name": "[variables('app_service_name')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('microsoft.insights/components/', variables('app_service_name'))]"
],
"tags": {
"[variables('hiddenreleated_app_service_plan')]": "empty",
"Application": "[parameters('app_name')]",
"Environment": "[variables('tag_environment')]",
"Region": "[resourceGroup().location]"
},
"kind": "app",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"enabled": true,
"serverFarmId": "[variables('app_service_plan_id')]",
"reserved": false
},
"resources": [],
"condition": "[parameters('new_deployment')]"
},
{
"type": "Microsoft.Web/sites/slots",
"apiVersion": "2019-08-01",
"name": "[concat(variables('app_service_name'),'/stage-slot')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('app_service_name'))]"
],
"tags": {
"displayName": "stage-slot",
"Application": "[parameters('app_name')]",
"Environment": "[variables('tag_environment')]",
"Region": "[resourceGroup().location]"
},
"identity": {
"type": "SystemAssigned"
},
"properties": {
"clientAffinityEnabled": false,
"serverFarmId": "[variables('app_service_plan_id')]",
"siteConfig": {
"copy": [
{
"name": "appSettings",
"count": "[length(parameters('app_settings').keyvalue_pairs)]",
"input": {
"name": "[parameters('app_settings').keyvalue_pairs[copyIndex('appSettings')].name]",
"value": "[parameters('app_settings').keyvalue_pairs[copyIndex('appSettings')].value]"
}
}
]
}
},
"resources": [
{
"type": "providers/diagnosticSettings",
"apiVersion": "2017-05-01-preview",
"name": "Microsoft.Insights/diagnosticsToLogAnalytics",
"dependsOn": [
"[resourceId('Microsoft.Web/sites/slots', variables('app_service_name'),'stage-slot')]"
],
"properties": {
"name": "Log to Log Analytics",
"workspaceId": "[variables('log_analytics_workspace_id')]",
"logs": [
{
"category": "AppServiceHTTPLogs",
"enabled": true,
"retentionPolicy": {
"days": 0,
"enabled": false
}
},
{
"category": "AppServiceConsoleLogs",
"enabled": true,
"retentionPolicy": {
"days": 0,
"enabled": false
}
},
{
"category": "AppServiceAppLogs",
"enabled": true,
"retentionPolicy": {
"days": 0,
"enabled": false
}
},
{
"category": "AppServiceFileAuditLogs",
"enabled": true,
"retentionPolicy": {
"days": 0,
"enabled": false
}
},
{
"category": "AppServiceAuditLogs",
"enabled": true,
"retentionPolicy": {
"days": 0,
"enabled": false
}
}
],
"metrics": [
{
"timeGrain": "PT1M",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
]
}
}
]
},
{
"type": "Microsoft.Web/sites/slots/config",
"apiVersion": "2019-08-01",
"name": "[concat(variables('app_service_name'), '/stage-slot/web')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites/slots', variables('app_service_name'),'stage-slot')]"
],
"tags": {
"[variables('hiddenreleated_app_service_plan')]": "empty",
"Application": "[parameters('app_name')]",
"Environment": "[variables('tag_environment')]",
"Region": "[resourceGroup().location]"
},
"properties": {
"minTlsVersion": "1.2",
"numberOfWorkers": 1,
"defaultDocuments": [
"Default.htm",
"Default.html",
"Default.asp",
"index.htm",
"index.html",
"iisstart.htm",
"default.aspx",
"index.php",
"hostingstart.html"
],
"netFrameworkVersion": "v4.0",
"phpVersion": "7.1",
"pythonVersion": "",
"nodeVersion": "",
"linuxFxVersion": "",
"requestTracingEnabled": false,
"remoteDebuggingEnabled": false,
"remoteDebuggingVersion": null,
"logsDirectorySizeLimit": 35,
"detailedErrorLoggingEnabled": true,
"publishingUsername": null,
"publishingPassword": null,
"metadata": null,
"connectionStrings": null,
"machineKey": null,
"handlerMappings": null,
"documentRoot": null,
"scmType": "None",
"use32BitWorkerProcess": true,
"webSocketsEnabled": false,
"alwaysOn": true,
"javaVersion": null,
"javaContainer": null,
"javaContainerVersion": null,
"appCommandLine": "",
"managedPipelineMode": "Integrated",
"virtualApplications": [
{
"virtualPath": "/",
"physicalPath": "site\\wwwroot",
"preloadEnabled": false,
"virtualDirectories": null
}
],
"winAuthAdminState": 0,
"winAuthTenantState": 0,
"customAppPoolIdentityAdminState": false,
"customAppPoolIdentityTenantState": false,
"runtimeADUser": null,
"runtimeADUserPassword": null,
"loadBalancing": "LeastRequests",
"routingRules": [],
"clientAffinityEnabled": false,
"experiments": {
"rampUpRules": []
},
"limits": null,
"autoHealEnabled": false,
"autoHealRules": null,
"tracingOptions": null,
"vnetName": "",
"siteAuthEnabled": false,
"siteAuthSettings": {
"enabled": null,
"unauthenticatedClientAction": null,
"tokenStoreEnabled": null,
"allowedExternalRedirectUrls": null,
"defaultProvider": null,
"clientId": null,
"clientSecret": null,
"issuer": null,
"allowedAudiences": null,
"additionalLoginParams": null,
"isAadAutoProvisioned": false,
"googleClientId": null,
"googleClientSecret": null,
"googleOAuthScopes": null,
"facebookAppId": null,
"facebookAppSecret": null,
"facebookOAuthScopes": null,
"twitterConsumerKey": null,
"twitterConsumerSecret": null,
"microsoftAccountClientId": null,
"microsoftAccountClientSecret": null,
"microsoftAccountOAuthScopes": null
},
"cors": {
"allowedOrigins": "[parameters('cors_allowed_origins')]"
},
"push": null,
"apiDefinition": null,
"autoSwapSlotName": null,
"localMySqlEnabled": false,
"managedServiceIdentityId": null,
"ipSecurityRestrictions": "[parameters('ip_restrictions')]"
}
},
{
"type": "Microsoft.Web/sites/slots/config",
"apiVersion": "2019-08-01",
"name": "[concat(variables('app_service_name'), '/stage-slot/logs')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites/slots/config', variables('app_service_name'),'stage-slot','web')]"
],
"tags": {
"displayName": "stage-slot-logs",
"Application": "[parameters('app_name')]",
"Environment": "[variables('tag_environment')]",
"Region": "[resourceGroup().location]"
},
"properties": {
"applicationLogs": {
"fileSystem": {
"level": "Off"
},
"azureTableStorage": {
"level": "Off"
},
"azureBlobStorage": {
"level": "Off"
}
},
"httpLogs": {
"fileSystem": null,
"azureBlobStorage": {
"enabled": false
}
},
"failedRequestsTracing": {
"enabled": false
},
"detailedErrorMessages": {
"enabled": false
}
}
},
{
"type": "Microsoft.Web/sites/slots/config",
"apiVersion": "2019-08-01",
"name": "[concat(variables('app_service_name'), '/stage-slot/virtualNetwork')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites/slots/config', variables('app_service_name'),'stage-slot','web')]"
],
"properties": {
"subnetResourceId": "[parameters('subnet_resource_id')]",
"swiftSupported": true
},
"condition": "[not(empty(parameters('subnet_resource_id')))]"
}
]
}