data "aws_route53_zone" "networking_route53_zone" {
  provider = aws.networking
  name     = "theorchard.io"
}

module "elasticache" {
  # checkov:skip=CKV_AWS_30:ElastiCache encryption in transit requires client library update.
  # checkov:skip=CKV_AWS_31:ElastiCache encryption in transit requires client library update.
  source = "git@github.com:theorchard/terraform-elasticache.git//?ref=4.0.0"

  providers = {
    aws.dns = aws.networking
  }

  cache_transit_encryption_enabled = false

  environment                     = var.environment
  service_name                    = var.service_name
  application_family              = var.application_family
  redis_engine_version            = "7.1"
  cache_engine                    = "redis"
  cache_subnet_group_name         = "prod-vpc-orchard-subnet"
  cache_node_type                 = "cache.t4g.micro"
  cache_parameter_group_name      = "default.redis7"
  vpc_id                          = module.vpc_info.vpc_id
}
