Skip to content

rhythmictech/terraform-aws-elasticache

Repository files navigation

terraform-aws-elasticache

Terraform ElastiCache Module: Simple and Sensibly Opinionated

tflint tfsec yamllint misspell pre-commit-check follow on Twitter

Example

Here's what using the module will look like

module "example" {
  source  = "rhythmictech/terraform-aws-elasticache"
  version = "0.0.1
}

About

aws.amazon.com/elasticache/

Requirements

Name Version
terraform >= 0.12.20
aws >= 5

Providers

Name Version
aws 5.10.0

Modules

No modules.

Resources

Name Type
aws_elasticache_cluster.this resource
aws_elasticache_replication_group.this resource
aws_elasticache_subnet_group.this resource
aws_route53_record.elasticache resource
aws_security_group.this resource
aws_security_group_rule.egress resource
aws_security_group_rule.ingress_cidr resource
aws_security_group_rule.ingress_sg resource

Inputs

Name Description Type Default Required
apply_immediately Specifies whether any modifications are applied immediately, or during the next maintenance window bool false no
auto_minor_version_upgrade Specifies whether a minor engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. bool true no
cluster_size Number of nodes in Elasticache cluster number 4 no
create If false, this module does nothing bool true no
dns_cname_record_name The name of the record, eg test.example.com. Must be specified with route53_zone_id string null no
egress_security_group_rule_description Description for Egress rule string null no
engine memcached or redis string "redis" no
engine_version Elasticache engine version string null no
ingress_cidr_sg_rule_description Description for CIDR-block Ingress rule string null no
ingress_rule_cidr_blocks List of CIDR blocks that are allowed ingress to ElastiCache list(string) [] no
ingress_sg_sg_rule_description Description for Security Group Ingress rule string null no
instance_type Type of ec2 instance for elasticache string "cache.t2.micro" no
log_delivery_configuration n/a list [] no
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. Example: sun:05:00-sun:09:00 string "sun:03:00-sun:04:00" no
name Moniker to apply to all resources in the module string n/a yes
notification_topic_arn An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to. Example: arn:aws:sns:us-east-1:012345678999:my_sns_topic string null no
parameter_group_name Elasticache parameter group name string null no
port Elasticache port number null no
replication_group_description Description for ElastiCache Replication Group string null no
route53_zone_id The ID of the hosted zone to contain this record. string "" no
security_group_ids Security Groups that are allowed ingress to ElastiCache list(string) [] no
snapshot_window (Optional, Redis only) 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. Example: 05:00-09:00 string "02:00-03:00" no
subnet_ids List of subnet IDs to make Elasticache available on list(string) n/a yes
tags User-Defined tags map(string) {} no
vpc_id VPC ID to create cluster in string n/a yes

Outputs

Name Description
cluster_address (Memcached only) The DNS name of the cache cluster without the port appended.
elasticache_cluster_id ElastiCache cluster ID
elasticache_fqdn Fully Qualified Domain Name of Elasticache: the endpoint or the CNAME if used
elasticache_replication_group_id elasticache_replication_group resource
elasticache_route53_record_id aws route53 record resource
primary_endpoint_address (Redis only) The address of the endpoint for the primary node in the replication group, if the cluster mode is disabled.
security_group_id aws_security_group resource

The Giants underneath this module

  • pre-commit.com/
  • www.terraform.io/
  • github.com/tfutils/tfenv
  • github.com/segmentio/terraform-docs