Commit cb853573 authored by Stephen Coe's avatar Stephen Coe Committed by Erik Osterman

Input variable for replication_group_id (#28)

* adding an input variable for replication_group_id

* fix formatting

* updating docs
parent eb3a647e
This diff is collapsed.
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
| notification_topic_arn | Notification topic arn | string | `` | no | | notification_topic_arn | Notification topic arn | string | `` | no |
| parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no | | parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no |
| port | Redis port | string | `6379` | no | | port | Redis port | string | `6379` | no |
| replication_group_id | Replication group ID with the following constraints: A name must contain from 1 to 20 alphanumeric characters or hyphens. The first character must be a letter. A name cannot end with a hyphen or contain two consecutive hyphens. | string | `` | no |
| security_groups | AWS security group ids | list | `<list>` | no | | security_groups | AWS security group ids | list | `<list>` | no |
| stage | Stage | string | `default` | no | | stage | Stage | string | `default` | no |
| subnets | AWS subnet ids | list | `<list>` | no | | subnets | AWS subnet ids | list | `<list>` | no |
......
...@@ -52,7 +52,7 @@ resource "aws_elasticache_replication_group" "default" { ...@@ -52,7 +52,7 @@ resource "aws_elasticache_replication_group" "default" {
count = "${var.enabled == "true" ? 1 : 0}" count = "${var.enabled == "true" ? 1 : 0}"
auth_token = "${var.auth_token}" auth_token = "${var.auth_token}"
replication_group_id = "${module.label.id}" replication_group_id = "${var.replication_group_id == "" ? module.label.id : var.replication_group_id}"
replication_group_description = "${module.label.id}" replication_group_description = "${module.label.id}"
node_type = "${var.instance_type}" node_type = "${var.instance_type}"
number_cache_clusters = "${var.cluster_size}" number_cache_clusters = "${var.cluster_size}"
......
...@@ -147,3 +147,9 @@ variable "auth_token" { ...@@ -147,3 +147,9 @@ variable "auth_token" {
description = "Auth token for password protecting redis, transit_encryption_enabled must be set to 'true'! Password must be longer than 16 chars" description = "Auth token for password protecting redis, transit_encryption_enabled must be set to 'true'! Password must be longer than 16 chars"
default = "" default = ""
} }
variable "replication_group_id" {
type = "string"
description = "Replication group ID with the following constraints: \nA name must contain from 1 to 20 alphanumeric characters or hyphens. \n The first character must be a letter. \n A name cannot end with a hyphen or contain two consecutive hyphens."
default = ""
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment