Skip to content

Commit

Permalink
Allow removal of cluster name from aurora ssm parameter (#1162)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Smith <[email protected]>
Co-authored-by: Igor Rodionov <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent fb8b77d commit 5e6711f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/aurora-postgres/ssm.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
ssm_path_prefix = format("/%s/%s", var.ssm_path_prefix, module.cluster.id)
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)

admin_user_key = format("%s/%s/%s", local.ssm_path_prefix, "admin", "user")
admin_password_key = format("%s/%s/%s", local.ssm_path_prefix, "admin", "password")
Expand Down
6 changes: 6 additions & 0 deletions modules/aurora-postgres/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,9 @@ variable "backup_window" {
default = "07:00-09:00"
description = "Daily time range during which the backups happen, UTC"
}

variable "ssm_cluster_name_override" {
type = string
default = ""
description = "Set a cluster name into the ssm path prefix"
}

0 comments on commit 5e6711f

Please sign in to comment.