From 0f5d2f74c19072dd15a01b4519f64066cabde32e Mon Sep 17 00:00:00 2001 From: Himanshu Ahirwar Date: Thu, 7 Dec 2023 22:38:17 +0530 Subject: [PATCH] fix: auth_token output when transit_encryption_enabled set to false --- outputs.tf | 2 +- variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/outputs.tf b/outputs.tf index 1b77220..c222e09 100644 --- a/outputs.tf +++ b/outputs.tf @@ -61,7 +61,7 @@ output "Memcached_ssm_name" { } output "auth_token" { - value = random_password.auth_token[0].result + value = var.auth_token_enable ? random_password.auth_token[0].result : "" sensitive = true description = "Auth token generated value" } \ No newline at end of file diff --git a/variables.tf b/variables.tf index 9726fd4..841f5a3 100644 --- a/variables.tf +++ b/variables.tf @@ -184,7 +184,7 @@ variable "auth_token_enable" { variable "auth_token" { type = string default = null - description = "The password used to access a password protected server. Can be specified only if transit_encryption_enabled = true." + description = "The password used to access a password protected server. Can be specified only if transit_encryption_enabled = true. Find auto generated auth_token in terraform.tfstate or in AWS SSM Parameter Store." } variable "cluster_replication_enabled" {