Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save carlosescura/e9d2f913132dfe767d14ff336a3c5158 to your computer and use it in GitHub Desktop.
Save carlosescura/e9d2f913132dfe767d14ff336a3c5158 to your computer and use it in GitHub Desktop.
resource "aws_elasticache_subnet_group" "redis_subnet_group" {
name = "redash-redis-subnet-group"
description = "Redash Redis subnet group"
subnet_ids = ["${var.redis_subnet_ids}"]
}
resource "aws_elasticache_cluster" "redis" {
cluster_id = "redash-redis-cluster"
engine = "redis"
node_type = "${var.redis_instance_class}"
num_cache_nodes = 1
parameter_group_name = "default.redis3.2"
engine_version = "3.2.10"
port = 6379
security_group_ids = ["${aws_security_group.redis_access_sg.id}"]
subnet_group_name = "${aws_elasticache_subnet_group.redis_subnet_group.id}"
depends_on = ["aws_elasticache_subnet_group.redis_subnet_group"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment