Skip to content

Commit fa5888a

Browse files
committed
add database_name var
1 parent 8536a05 commit fa5888a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ resource "aws_db_instance" "this" {
6161
monitoring_interval = var.monitoring_interval
6262
monitoring_role_arn = var.monitoring_role_arn
6363
multi_az = var.multi_az
64-
name = replace(var.name, "/[^A-Za-z0-9]/", "")
64+
name = var.database_name
6565
parameter_group_name = local.parameter_group_name
6666
password = local.password
6767
performance_insights_enabled = var.performance_insights_enabled

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ variable "cloudwatch_log_exports" {
9696
]
9797
}
9898

99+
variable "database_name" {
100+
default = null
101+
description = "Name of the initial database to create. (null for none)"
102+
type = string
103+
}
104+
99105
variable "enable_deletion_protection" {
100106
default = true
101107
description = "If `true`, deletion protection will be turned on for the RDS instance(s)"

0 commit comments

Comments
 (0)