Skip to content

Commit 5e6711f

Browse files
darrenl33Benbentwogoruha
authored
Allow removal of cluster name from aurora ssm parameter (#1162)
Co-authored-by: Benjamin Smith <ben.smith.developer@gmail.com> Co-authored-by: Igor Rodionov <goruha@gmail.com>
1 parent fb8b77d commit 5e6711f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

modules/aurora-postgres/ssm.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
locals {
2-
ssm_path_prefix = format("/%s/%s", var.ssm_path_prefix, module.cluster.id)
2+
ssm_path_prefix = length(var.ssm_cluster_name_override) > 0 ? format("/%s/%s", var.ssm_path_prefix, var.ssm_cluster_name_override) : format("/%s/%s", var.ssm_path_prefix, module.cluster.id)
33

44
admin_user_key = format("%s/%s/%s", local.ssm_path_prefix, "admin", "user")
55
admin_password_key = format("%s/%s/%s", local.ssm_path_prefix, "admin", "password")

modules/aurora-postgres/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,3 +352,9 @@ variable "backup_window" {
352352
default = "07:00-09:00"
353353
description = "Daily time range during which the backups happen, UTC"
354354
}
355+
356+
variable "ssm_cluster_name_override" {
357+
type = string
358+
default = ""
359+
description = "Set a cluster name into the ssm path prefix"
360+
}

0 commit comments

Comments
 (0)