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" {