module "redis_elasticache" {
  source = "git@github.com:theorchard/terraform-elasticache.git//?ref=4.0.2"

  providers = {
    aws.dns = aws.networking
  }

  application_family = var.application_family
  environment        = var.environment
  service_name       = var.service_name

  vpc_id          = module.vpc_info.vpc_id

  cache_engine               = "redis"
  redis_engine_version       = "7.0"
  cache_parameter_group_name = "default.redis7"
  cache_node_type            = "cache.t4g.micro"
  cache_node_count           = 1
  cache_subnet_group_name    = "${var.environment}-elasticache-subnet-group"
}
