You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable audit logs to a LAW in Azure, the following MySQL configuration entries are needed:
"audit_log_enabled" = "ON",
"audit_log_events" = "ADMIN,CONNECTION,DCL,DDL"
The latter may vary depend on what logging is desired from the server.
Via Terraform these could be implemented via a pair of azurerm_mysql_flexible_server_configuration resources:
These could either be enabled via an option variable in the variables.tf file (e.g. enable_audit_log), or even better such a variable could add the above defined in locals as an argument to a merge() function such as suggested in #50 (preferred).
This will also require a diagnostic setting resource and a LAW to house logs. In Terraform:
The text was updated successfully, but these errors were encountered:
epopisces
changed the title
Support enabling audit logs on MySQL Flexible Server
Terraform: support enabling audit logs on MySQL Flexible Server
Nov 20, 2023
epopisces
changed the title
Terraform: support enabling audit logs on MySQL Flexible Server
Support enabling audit logs on MySQL Flexible Server
Nov 20, 2023
From a governance perspective, I prefer that auditing is enabled via Azure Policy. I am not sure if MySQL database auditing can be enabled via Policy, in which case we'll consider that for implementation in Bicep.
To enable audit logs to a LAW in Azure, the following MySQL configuration entries are needed:
"audit_log_enabled" = "ON",
"audit_log_events" = "ADMIN,CONNECTION,DCL,DDL"
The latter may vary depend on what logging is desired from the server.
Via Terraform these could be implemented via a pair of
azurerm_mysql_flexible_server_configuration
resources:These could either be enabled via an option variable in the variables.tf file (e.g.
enable_audit_log
), or even better such a variable could add the above defined in locals as an argument to a merge() function such as suggested in #50 (preferred).This will also require a diagnostic setting resource and a LAW to house logs. In Terraform:
The text was updated successfully, but these errors were encountered: