Deploy an Azure SQL Server with Threat Detection enabled and a user-defined number of Azure SQL Databases with Threat Detection enabled, with an email address to receive alerts for each database.
{"type": "microsoft.sql/servers", "apiversion": "2020-02-02-preview", "location": "[variables('databaseserverlocation')]", "name": "[variables('databaseservername')]", "properties": {"administratorlogin": "[variables('databaseserveradminlogin')]", "administratorloginpassword": "[variables('databaseserveradminloginpassword')]", "version": "12.0"}, "tags": {"displayname": "[variables('databaseservername')]"}}{"apiversion": "2020-02-02-preview", "type": "microsoft.sql/servers/databases", "sku": {"name": "s0", "tier": "standard"}, "kind": "v12.0,user", "location": "[variables('databaseserverlocation')]", "name": "[concat(string(variables('databaseservername')), "/", string(variables('databasenames')[copyindex()]))]", "dependson": ["[resourceid('microsoft.sql/servers", variables('databaseservername'))]"], "tags": {"displayname": "[variables('databaseservername')]"}, "copy": {"name": "databasecopy", "count": "[length(variables('databasenames'))]"}, "properties": {}, "resources": [{"apiversion": "2020-02-02-preview", "type": "securityalertpolicies", "name": "default", "dependson": ["[resourceid('microsoft.sql/servers/databases", variables('databaseservername'), variables('databasenames')[copyindex()])]"], "properties": {"state": "enabled"}}]} 