I have an ARM Template to deploy SQL Server and can make it to enable Audit Settings and set up auditActionsAndGroups property by following this site
https://learn.microsoft.com/en-us/azure/templates/microsoft.sql/servers/auditingsettings?pivots=deployment-language-arm-template.
But it doesn’t have the Predicate Expression property.
The question is: can the ARM template set the Predicate Expression of the Server?
Currently, I am using this Powershell to run the command to set it.
Custom PredicateExpression command
Set-AzSqlServerAudit -ResourceGroupName "RESOURCEGROUPNAME" -ServerName "SERVERNAME" -PredicateExpression "statement <> 'exec sp_executesql N’SELECT%’'"
Cannot find the Predicate Expression property on the Microsoft document, is there a work around?
kulladech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.