File tree Expand file tree Collapse file tree 2 files changed +32
-12
lines changed
infrastructure/modules/postgresql-flexible Expand file tree Collapse file tree 2 files changed +32
-12
lines changed Original file line number Diff line number Diff line change @@ -97,3 +97,17 @@ module "private_endpoint_postgresql_flexible_server" {
9797
9898 tags = var. tags
9999}
100+
101+ /* --------------------------------------------------------------------------------------------------
102+ PostgreSQL Server Diagnostic Settings
103+ -------------------------------------------------------------------------------------------------- */
104+ module "diagnostic_setting_postgresql_server" {
105+
106+ source = " ../diagnostic-settings"
107+
108+ name = " ${ var . name } -postgresql-server-diagnotic-setting"
109+ target_resource_id = azurerm_postgresql_flexible_server. postgresql_flexible_server . id
110+ log_analytics_workspace_id = var. log_analytics_workspace_id
111+ enabled_log = var. monitor_diagnostic_setting_postgresql_server_enabled_logs
112+ metric = var. monitor_diagnostic_setting_postgresql_server_metrics
113+ }
Original file line number Diff line number Diff line change @@ -154,15 +154,21 @@ variable "private_endpoint_properties" {
154154 })
155155}
156156
157- # /* --------------------------------------------------------------------------------------------------
158- # Auditing and Diagnostics Variables
159- # -------------------------------------------------------------------------------------------------- */
160- # variable "monitor_diagnostic_setting_database_enabled_logs" {
161- # type = list(string)
162- # description = "Controls what logs will be enabled for the database"
163- # }
164-
165- # variable "monitor_diagnostic_setting_database_metrics" {
166- # type = list(string)
167- # description = "Controls what metrics will be enabled for the database"
168- # }
157+
158+ /* --------------------------------------------------------------------------------------------------
159+ Auditing and Diagnostics Variables
160+ -------------------------------------------------------------------------------------------------- */
161+ variable "log_analytics_workspace_id" {
162+ type = string
163+ description = " id of the log analytics workspace to send resource logging to via diagnostic settings"
164+ }
165+
166+ variable "monitor_diagnostic_setting_postgresql_server_enabled_logs" {
167+ type = list (string )
168+ description = " Controls what logs will be enabled for the sql server"
169+ }
170+
171+ variable "monitor_diagnostic_setting_postgresql_server_metrics" {
172+ type = list (string )
173+ description = " Controls what metrics will be enabled for the sql server"
174+ }
You can’t perform that action at this time.
0 commit comments