Skip to content

Commit

Permalink
fix: Expose cluster_id to allow recreation under a new unique name.
Browse files Browse the repository at this point in the history
  • Loading branch information
SlickSolis committed Sep 11, 2024
1 parent 01f64d9 commit c39e8c0
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 c39e8c0

Please sign in to comment.