Skip to content

Commit

Permalink
Merge pull request #1 from Slickdeals/add-cluster-id-argument
Browse files Browse the repository at this point in the history
fix: Expose cluster_id to allow recreation under a new unique name.
  • Loading branch information
SlickSolis authored Sep 11, 2024
2 parents 01f64d9 + c39e8c0 commit 45c1a03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ resource "aws_elasticache_parameter_group" "default" {
resource "aws_elasticache_cluster" "default" {
count = local.enabled ? 1 : 0
apply_immediately = var.apply_immediately
cluster_id = module.this.id
cluster_id = var.cluster_id ? var.cluster_id : module.this.id
engine = "memcached"
engine_version = var.engine_version
node_type = var.instance_type
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
variable "cluster_id" {
type = string
default = ""
description = "Group identifier. ElastiCache converts this name to lowercase. Changing this value will re-create the resource."
}

variable "vpc_id" {
type = string
default = ""
Expand Down

0 comments on commit 45c1a03

Please sign in to comment.