Skip to content

Commit a7f5aec

Browse files
committed
Fix: Updated the random_password resource with variables and change the example file names main.tf -> example.tf
1 parent ca0d035 commit a7f5aec

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed
File renamed without changes.

_example/redis-cluster/main.tf renamed to _example/redis-cluster/example.tf

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ module "redis-cluster" {
7171
Application = "CloudDrove"
7272
}
7373

74+
7475
###----------------------------------------------------------------------------------
7576
# will create ROUTE-53 for redis which will add the dns of the cluster.
7677
###----------------------------------------------------------------------------------
File renamed without changes.

main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ resource "aws_elasticache_subnet_group" "default" {
143143

144144
resource "random_password" "auth_token" {
145145
count = var.auth_token_enable && var.auth_token == null ? 1 : 0
146-
length = 25
147-
special = false
146+
length = var.length
147+
special = var.special
148148
}
149149

150150
##----------------------------------------------------------------------------------

variables.tf

+13
Original file line numberDiff line numberDiff line change
@@ -438,3 +438,16 @@ variable "ssm_parameter_type" {
438438
default = "SecureString"
439439
description = "Type of the parameter."
440440
}
441+
442+
###------------------------------- random_password----------------------------
443+
444+
variable "length" {
445+
type = number
446+
default = 25
447+
}
448+
449+
variable "special" {
450+
type = bool
451+
default = false
452+
453+
}

0 commit comments

Comments
 (0)