Terraform module for creating a aws elasticache memcache
NOTE: keep the names short, since the maximum length for the name is 20
This project is internal open source and currently maintained by the INF.
The following requirements are needed by this module:
- terraform (>= 0.12)
The following providers are used by this module:
- aws
The following input variables are required:
Description: the module creates a route53 domain entry and therefore need the domain in which the entry should be created
Type: string
Description: the environment this cache is running in (e.g. 'testing')
Type: string
Description: a list of subnet ids in which the ASG deploys to
Type: list(string)
Description: the VPC the ASG should be deployed in
Type: string
The following input variables are optional (have default values):
Description: port the service licenses to
Type: number
Default: 11211
Description: if the memcache should run in a single AZ oder cross multiple, valid arguments: single-az
or cross-az
Type: string
Default: "single-az"
Description: security groups which get added to the security group as ingress
Type: list(string)
Default: []
Description: amount of cluster members to spawn
Type: string
Default: "2"
Description: memcache version to run
Type: string
Default: "1.4.34"
Description: hostname of the memcache
Type: string
Default: "memcache"
Description: type of machine to run on
Type: string
Default: "cache.t2.small"
Description: parameter group for the memcache
Type: string
Default: "default.memcached1.4"
Description: desired string length which is applied to various naming strings, to make the names shorter
Type: number
Default: 4
Description: common tags to add to the ressources
Type: map(string)
Default: {}
The following outputs are exported:
Description: fqdn created from domain and hostname
Description: cluster adress
Description: SG which is attached to the service
Description: an intra SG, intended to added to EC2 instsances for access (DEPRECATED)
module "memcache" {
source = "github.com/ryte/INF-tf-elasticache//memcache?ref=v0.2.2"
tags = local.common_tags
environment = var.environment
domain = var.domain
hostname = "memcache"
desired_clusters = 1
az_mode = "cross-az"
engine_version = "1.5.16"
parameter_group_name = "default.memcached1.5"
application_port = 11211
instance_type = "cache.t3.small"
vpc_id = data.terraform_remote_state.vpc.vpc_id
subnet_ids = data.terraform_remote_state.vpc.subnet_private
csgs = []
}