Skip to content

Commit e7099b2

Browse files
creates param group log parameters from module variables
1 parent 28b82d5 commit e7099b2

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ resource "aws_db_parameter_group" "rds_postgres_pg" {
88
description = "TAMR RDS parameter group"
99
parameter {
1010
name = "log_statement"
11-
value = "all"
11+
value = var.param_log_statement
12+
}
13+
parameter {
14+
name = "log_min_duration_statement"
15+
value = var.param_log_min_duration_statement
1216
}
1317
tags = local.effective_tags
1418
}

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ variable "parameter_group_name" {
2727
default = "rds-postgres-pg"
2828
}
2929

30+
variable "param_log_min_duration_statement" {
31+
description = "(ms) Sets the minimum execution time above which statements will be logged."
32+
type = string
33+
default = "-1"
34+
}
35+
36+
variable "param_log_statement" {
37+
description = "Sets the type of statements logged. Valid values are none, ddl, mod, all"
38+
type = string
39+
default = "none"
40+
}
41+
3042
variable "identifier_prefix" {
3143
description = "Identifier prefix for the RDS instance"
3244
type = string

0 commit comments

Comments
 (0)