kristijorgji / terraform-aws-elasticache-redis

Forked from FitnessKeeper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Terraform module to create a Redis ElastiCache cluster

Lint Status Docs Status Tag License

A terraform module providing a Redis ElastiCache cluster in AWS.

This module

  • Creates Redis ElastiCache clusters
  • Creates, manages, and exports a security group

Usage

module "redis" {
  source         = "github.com/terraform-community-modules/tf_aws_elasticache_redis?ref=v1.3.0"
  env            = "${var.env}"
  name           = "thtest"
  redis_clusters = "2"
  redis_failover = "true"
  subnets        = "${module.vpc.database_subnets}"
  vpc_id         = "${module.vpc.vpc_id}"
}

Usage with redis_parameters

variable "redis_parameters" {
  description = "additional parameters"
  default = [{
    name  = "min-slaves-max-lag"
    value = "5"
  },{
    name  = "min-slaves-to-write"
    value = "1"
  },{
    name  = "databases"
    value = "32"
  }]
}

module "redis" {
  source           = "github.com/Flaconi/terraform-aws-elasticache-redis?ref=v0.2.0"
  ...
  redis_parameters = "${var.redis_parameters}"
  ...
}

Requirements

Name Version
terraform >= 1.0
aws >= 4
random >= 3.5

Providers

Name Version
aws >= 4
random >= 3.5

Modules

No modules.

Resources

Name Type
aws_elasticache_parameter_group.redis_parameter_group resource
aws_elasticache_replication_group.redis resource
aws_elasticache_subnet_group.redis_subnet_group resource
random_id.salt resource
aws_vpc.vpc data source

Inputs

Name Description Type Default Required
env env to deploy into, should typically dev/staging/prod string n/a yes
name Name for the Redis replication group i.e. UserObject string n/a yes
redis_clusters Number of Redis cache clusters (nodes) to create number n/a yes
subnets List of VPC Subnet IDs for the cache subnet group list(string) n/a yes
vpc_id VPC ID string n/a yes
allowed_cidr A list of Security Group ID's to allow access to. list(string)
[
"127.0.0.1/32"
]
no
apply_immediately Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is false. bool false no
multi_az_enabled Specifies whether to enable Multi-AZ Support for the replication group bool false no
redis_failover Specifies whether cluster should perform automatic fail-over bool false no
redis_maintenance_window Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period string "fri:08:00-fri:09:00" no
redis_node_type Instance type to use for creating the Redis cache clusters string "cache.t2.micro" no
redis_parameters Additional parameters modified in parameter group list(map(string)) [] no
redis_port Which port redis will be listening on number 6379 no
redis_snapshot_retention_limit The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. Please note that setting a snapshot_retention_limit is not supported on cache.t1.micro or cache.t2.* cache nodes number 0 no
redis_snapshot_window The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. The minimum snapshot window is a 60 minute period string "06:30-07:30" no
redis_version Redis version to use, defaults to 3.2.10 string "3.2.10" no
security_groups A list of Security Group ID's to allow access to. list(string) [] no
tags Tags for redis nodes map(string) {} no

Outputs

Name Description
cluster_enabled n/a
endpoint n/a
endpoint_config n/a
endpoint_ro n/a
id n/a
parameter_group n/a
port n/a
redis_subnet_group_name n/a

Authors

Created by Tim Hartmann. Maintained by Anton Babenko and these awesome contributors.

License

MIT License

About

Forked from FitnessKeeper

License:MIT License


Languages

Language:HCL 58.7%Language:Makefile 41.3%