diff --git a/src/ssm.tf b/src/ssm.tf index 9b74979..9e62a50 100644 --- a/src/ssm.tf +++ b/src/ssm.tf @@ -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") diff --git a/src/variables.tf b/src/variables.tf index ea71e52..1bc2277 100644 --- a/src/variables.tf +++ b/src/variables.tf @@ -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" +}