File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ resource "random_id" "salt" {
7
7
}
8
8
9
9
resource "aws_elasticache_replication_group" "redis" {
10
- replication_group_id = format (" %.40s " , " ${ var . name } -${ var . env } " )
10
+ replication_group_id = format (" ${ var . format_length } " , " ${ var . name } -${ var . env } " )
11
11
description = " Terraform-managed ElastiCache replication group for ${ var . name } -${ var . env } "
12
12
num_cache_clusters = var. redis_clusters
13
13
node_type = var. redis_node_type
Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ variable "name" {
54
54
type = string
55
55
}
56
56
57
+ variable "format_length" {
58
+ description = " Length formatting for redis instance name"
59
+ type = string
60
+ default = " %.40s"
61
+ }
62
+
57
63
variable "redis_clusters" {
58
64
description = " Number of Redis cache clusters (nodes) to create"
59
65
type = string
You can’t perform that action at this time.
0 commit comments