ARM Template for deploying Azure SQL in a Failover Group with monitoring and audit enabled.
- Creates a primary database
- Creates a failover group that references the server specified in the sqlSecondaryServerName parameter.
- Enables Advanced Database Security and creates a storage account if the enableADS parameter is set to "true".
One way to determine the correct logs and metrics to add to the "providers/diagnosticSettings" is to do the following:
- Use the Azure Portal and setup the desired diagnostic settings
- Use the Azure CLI and issue the following command this example is for Azure SQL Database
az monitor diagnostic-settings show --name [diagnostic name] --resource "/subscriptions/[subscription ID]/resourceGroups/[resource group name]/providers/Microsoft.Sql/servers/[server name]/databases/[database name]"
- Copy-paste the json arrays for Logs and Metrics into your template