From f1e74b160cf51f2ed60500104893b0f6d11b0ce3 Mon Sep 17 00:00:00 2001 From: Michael Arnold Date: Fri, 5 Feb 2021 18:08:04 -0500 Subject: [PATCH] Allow for control over the Secret name. --- main.tf | 5 +++-- variables.tf | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 05bfd44..1309ce5 100644 --- a/main.tf +++ b/main.tf @@ -176,7 +176,8 @@ module "slash" { source = "cloudposse/label/null" version = "0.22.1" - delimiter = "/" - context = module.this.context + delimiter = "/" + context = module.this.context + label_order = var.secret_label_order } diff --git a/variables.tf b/variables.tf index 5ec65cd..0ab79ef 100644 --- a/variables.tf +++ b/variables.tf @@ -58,3 +58,13 @@ variable "security_group" { description = "The security group(s) where the Lambda Function will be run. This must have access to the RDS instance. The best option is to make this the RDS' security group and allow the SG to access itself" } +variable "secret_label_order" { + type = list + default = ["namespace", "environment", "stage", "name", "attributes"] + description = <<-EOT + The naming order of the id output and Name tag. + Defaults to ["namespace", "environment", "stage", "name", "attributes"]. + You can omit any of the 5 elements, but at least one must be present. + EOT +} +