Source
Azure Portal
Display name
Configure Azure SQL database servers diagnostic settings to Log Analytics workspace
Id
7ea8a143-05e3-4553-abfe-f56bef8b0b70 Copy Id Copy resourceId
Version
1.0.2 Details on versioning
Versioning
Versions supported for Versioning: 1 1.0.2 Built-in Versioning [Preview]
Category
SQL Microsoft Learn
Description
Enables auditing logs for Azure SQL Database server and stream the logs to a Log Analytics workspace when any SQL Server which is missing this auditing is created or updated
Cloud environments
AzureCloud = true AzureUSGovernment = true AzureChinaCloud = unknown
Available in AzUSGov
The Policy is available in AzureUSGovernment cloud. Version: '1.*.*'
Mode
Indexed
Type
BuiltIn
Preview
False
Deprecated
False
Effect
Default DeployIfNotExists
Allowed DeployIfNotExists, Disabled
RBAC role(s)
Rule aliases
THEN-ExistenceCondition (1)
Alias
Namespace
ResourceType
Path
PathIsDefault
DefaultPath
Modifiable
Microsoft.Sql/auditingSettings.state
Microsoft.Sql Microsoft.Sql
servers/databases/auditingSettings servers/auditingSettings
properties.state properties.state
True True
False False
Rule resource types
IF (1)
THEN-Deployment (1)
Compliance
Not a Compliance control
Initiatives usage
Records: 10 25 100 200 Use the filters above each column to filter and limit table data. Advanced searches can be performed by using the following operators:
< ,
<= ,
> ,
>= ,
= ,
* ,
! ,
{ ,
} ,
|| ,
&& ,
[empty] ,
[nonempty] ,
rgx: Learn more ? Page 1 of 1
Clear VirtualEnclaves Clear Preview Clear BuiltIn
Initiative DisplayName
Initiative Id
Initiative Category
State
Type
polSet in AzUSGov
[Preview]: Control the use of diagnostic settings for specific resources in a Virtual Enclave
0a9ea1cb-7925-47fc-b0fe-8bb0a8190423
VirtualEnclaves
Preview BuiltIn
true
No results
History
Date/Time (UTC ymd) (i)
Change type
Change detail
2021-04-27 15:38:15
change
Patch (1.0.1 > 1.0.2)
2021-02-10 14:43:58
add
7ea8a143-05e3-4553-abfe-f56bef8b0b70
JSON compareHide
compare mode:
side-by-side
line-by-line
version left: 1.0.1
version right: 1.0.2 1.0.1
@@ -3,9 +3,9 @@
3
"policyType": "BuiltIn",
4
"mode": "Indexed",
5
"description": "Deploys the diagnostic settings for Azure SQL Database server to stream resource logs to a Log Analytics workspace when any SQL Server which is missing this diagnostic settings is created or updated.",
6
"metadata": {
7
-
"version": "1.0.1",
8
"category": "SQL"
9
},
10
"parameters": {
11
"logAnalyticsWorkspaceId": {
3
"policyType": "BuiltIn",
4
"mode": "Indexed",
5
"description": "Deploys the diagnostic settings for Azure SQL Database server to stream resource logs to a Log Analytics workspace when any SQL Server which is missing this diagnostic settings is created or updated.",
6
"metadata": {
7
+
"version": "1.0.2 ",
8
"category": "SQL"
9
},
10
"parameters": {
11
"logAnalyticsWorkspaceId": {
JSON
api-version=2021-06-01
Copy definition Copy definition 4 EPAC EPAC
{ 7 items displayName: "Configure Azure SQL database servers diagnostic settings to Log Analytics workspace" , policyType: "BuiltIn" , mode: "Indexed" , description: "Enables auditing logs for Azure SQL Database server and stream the logs to a Log Analytics workspace when any SQL Server which is missing this auditing is created or updated" , metadata: { 2 items version: "1.0.2" , category: "SQL" } , parameters: { 2 items logAnalyticsWorkspaceId: { 2 items type: "String" , metadata: { 4 items displayName: "Log Analytics workspace" , description: "Specify the Log Analytics workspace the server should be connected to." , strongType: "omsWorkspace" , assignPermissions: true } } , effect: { 4 items type: "String" , metadata: { 2 items displayName: "Effect" , description: "Enable or disable the execution of the policy" } , allowedValues: [ 2 items "DeployIfNotExists" , "Disabled" ] , defaultValue: "DeployIfNotExists" } } , policyRule: { 2 items if: { 2 items field: "type" , equals: "Microsoft.Sql/servers" } , then: { 2 items effect: "[parameters('effect')]" , details: { 5 items type: "Microsoft.Sql/servers/auditingSettings" , name: "Default" , existenceCondition: { 2 items field: "Microsoft.Sql/auditingSettings.state" , equals: "Enabled" } , roleDefinitionIds: [ 2 items "/providers/Microsoft.Authorization/roleDefinitions/056cd41c-7e88-42e1-933e-88ba6a50c9c3" SQL Security Manager , "/providers/Microsoft.Authorization/roleDefinitions/92aaf0da-9dab-42b6-94a3-d43ce8d16293" Log Analytics Contributor ] , deployment: { 1 item properties: { 3 items mode: "incremental" , template: { 5 items $schema: "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#" , contentVersion: "1.0.0.0" , parameters: { 2 items } , variables: { 1 item diagnosticSettingsName: "SQLSecurityAuditEvents_3d229c42-c7e7-4c97-9a99-ec0d0d8b86c1" } , resources: [ 2 items { 4 items type: "Microsoft.Sql/servers/databases/providers/diagnosticSettings" , name: 🔍 "[
concat(
parameters('serverName'),
'/master/microsoft.insights/',
variables(
'diagnosticSettingsName'
)
)
]", apiVersion: "2017-05-01-preview" , properties: { 3 items name: "[variables('diagnosticSettingsName')]" , workspaceId: "[parameters('logAnalyticsWorkspaceId')]" , logs: [ 1 item ] } } , { 5 items name: 🔍 "[
concat(
parameters('serverName'),
'/Default'
)
]", type: "Microsoft.Sql/servers/auditingSettings" , apiVersion: "2017-03-01-preview" , dependsOn: [ 1 item 🔍 "[
concat(
'Microsoft.Sql/servers/',
parameters('serverName'),
'/databases/master/providers/microsoft.insights/diagnosticSettings/',
variables(
'diagnosticSettingsName'
)
)
]"] , properties: { 2 items state: "Enabled" , isAzureMonitorTargetEnabled: true } } ] } , parameters: { 2 items } } } } } } }