Skip to content

Commit e7f7668

Browse files
author
Sohan
committed
create variable for description
1 parent b5ec1cb commit e7f7668

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ resource "aws_elasticache_subnet_group" "default" {
2323
count = var.enable ? 1 : 0
2424
name = module.labels.id
2525
subnet_ids = var.subnet_ids
26-
description = "Managed by ${var.managedby}"
26+
description = var.description
2727
}
2828

2929
# Module : Elasticache Replication Group

outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ output "port" {
1313
output "tags" {
1414
value = module.labels.tags
1515
description = "A mapping of tags to assign to the resource."
16-
}
16+
}

variables.tf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ variable "enable" {
4848
description = "Enable or disable of elasticache"
4949
}
5050

51-
5251
# Module : Replication Group
5352
# Description : Terraform Replication group module variables.
5453
variable "engine" {
@@ -126,6 +125,12 @@ variable "subnet_ids" {
126125
description = "List of VPC Subnet IDs for the cache subnet group."
127126
}
128127

128+
variable "description" {
129+
type = string
130+
default = "Managed by Terraform"
131+
description = "Description for the cache subnet group. Defaults to `Managed by Terraform`."
132+
}
133+
129134
variable "availability_zones" {
130135
type = list(string)
131136
description = "A list of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is not important."
@@ -197,7 +202,6 @@ variable "az_mode" {
197202
description = "(Memcached only) Specifies whether the nodes in this Memcached node group are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region. Valid values for this parameter are single-az or cross-az, default is single-az. If you want to choose cross-az, num_cache_nodes must be greater than 1."
198203
}
199204

200-
201205
variable "replicas_per_node_group" {
202206
default = ""
203207
description = "Replicas per Shard."
@@ -206,4 +210,4 @@ variable "replicas_per_node_group" {
206210
variable "num_node_groups" {
207211
default = ""
208212
description = "Number of Shards (nodes)."
209-
}
213+
}

0 commit comments

Comments
 (0)