Skip to content

Commit

Permalink
Fix configuration name num_cache_clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
adenot committed Dec 10, 2024
1 parent f2e70a5 commit 21b1d98
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ variable "notification_topic_arn" {
default = ""
}

variable "number_cache_clusters" {
variable "num_cache_clusters" {
description = "The number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2"
default = 1
}
Expand Down Expand Up @@ -120,4 +120,4 @@ variable "user_group_ids" {
description = "(Optional) User Group ID to associate with the replication group. Only a maximum of one (1) user group ID is valid. NOTE: This argument is a set because the AWS specification allows for multiple IDs. However, in practice, AWS only allows a maximum size of one."
type = set(string)
default = null
}
}
44 changes: 22 additions & 22 deletions redis.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@ resource "random_string" "redis_password" {
}

resource "aws_elasticache_replication_group" "redis" {
replication_group_id = var.name
replication_group_description = var.name
automatic_failover_enabled = var.automatic_failover_enabled
at_rest_encryption_enabled = var.at_rest_encryption_enabled
transit_encryption_enabled = var.transit_encryption_enabled
multi_az_enabled = var.multi_az_enabled
auth_token = var.transit_encryption_enabled ? random_string.redis_password[0].result : null
engine = var.engine
engine_version = var.engine_version
kms_key_id = var.kms_key_id
maintenance_window = var.maintenance_window
node_type = var.node_type
notification_topic_arn = var.notification_topic_arn
number_cache_clusters = var.number_cache_clusters
port = var.port
security_group_ids = [aws_security_group.redis.id]
snapshot_retention_limit = var.snapshot_retention_limit
snapshot_window = var.snapshot_window
subnet_group_name = try(aws_elasticache_subnet_group.redis[0].name, var.subnet_group_name)
parameter_group_name = var.parameter_group_name
user_group_ids = var.user_group_ids
replication_group_id = var.name
description = var.name
automatic_failover_enabled = var.automatic_failover_enabled
at_rest_encryption_enabled = var.at_rest_encryption_enabled
transit_encryption_enabled = var.transit_encryption_enabled
multi_az_enabled = var.multi_az_enabled
auth_token = var.transit_encryption_enabled ? random_string.redis_password[0].result : null
engine = var.engine
engine_version = var.engine_version
kms_key_id = var.kms_key_id
maintenance_window = var.maintenance_window
node_type = var.node_type
notification_topic_arn = var.notification_topic_arn
num_cache_clusters = var.num_cache_clusters
port = var.port
security_group_ids = [aws_security_group.redis.id]
snapshot_retention_limit = var.snapshot_retention_limit
snapshot_window = var.snapshot_window
subnet_group_name = try(aws_elasticache_subnet_group.redis[0].name, var.subnet_group_name)
parameter_group_name = var.parameter_group_name
user_group_ids = var.user_group_ids

tags = {
"Name" = var.name
"EnvName" = var.environment_name
}
}
}

0 comments on commit 21b1d98

Please sign in to comment.