Skip to content

Commit

Permalink
Update elasticache input variables
Browse files Browse the repository at this point in the history
  • Loading branch information
OlamideOl1 authored and clarissalimab committed Dec 12, 2024
1 parent 91a5bf6 commit 0258f00
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
33 changes: 17 additions & 16 deletions elasticache-redis/replication-group/main.tf
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
resource "aws_elasticache_replication_group" "this" {
replication_group_id = coalesce(var.replication_group_id, var.name)

at_rest_encryption_enabled = var.at_rest_encryption_enabled
automatic_failover_enabled = local.replica_enabled
description = var.description
engine = var.engine
engine_version = var.engine_version
kms_key_id = local.primary_kms_key
multi_az_enabled = local.replica_enabled
node_type = var.node_type
num_cache_clusters = local.instance_count
parameter_group_name = var.parameter_group_name
port = var.port
security_group_ids = local.server_security_group_ids
snapshot_name = var.snapshot_name
snapshot_retention_limit = var.snapshot_retention_limit
subnet_group_name = aws_elasticache_subnet_group.this.name
transit_encryption_enabled = var.transit_encryption_enabled
at_rest_encryption_enabled = var.at_rest_encryption_enabled
automatic_failover_enabled = local.replica_enabled
description = var.description
engine = var.engine
engine_version = var.engine_version
global_replication_group_id = var.global_replication_group_id
kms_key_id = local.primary_kms_key
multi_az_enabled = local.replica_enabled
node_type = var.node_type
num_cache_clusters = local.instance_count
parameter_group_name = var.parameter_group_name
port = var.port
security_group_ids = local.server_security_group_ids
snapshot_name = var.snapshot_name
snapshot_retention_limit = var.snapshot_retention_limit
subnet_group_name = aws_elasticache_subnet_group.this.name
transit_encryption_enabled = var.transit_encryption_enabled

# Auth tokens aren't supported without TLS
auth_token = (
Expand Down
6 changes: 6 additions & 0 deletions elasticache-redis/replication-group/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ variable "engine_version" {
description = "Version for RDS database engine"
}

variable "global_replication_group_id" {
type = string
description = "The ID of the global replication group to which this replication group should belong."
default = null
}

variable "initial_auth_token" {
type = string
description = "Override the initial auth token"
Expand Down

0 comments on commit 0258f00

Please sign in to comment.