Git Product home page Git Product logo

terraform-aws-elasticache-module's Introduction

terraform-aws-elasticache-module

This terraform module is to create an AWS ElastiCache Replica Set/Cluster. The purpose of this module is not to limit the IAC to a specific team/project but rather be used across different Business Units/Organizations.

Table of contents

Overview

  • This is terraform module to create an AWS Redis ElastiCache Replica Set
  • The following components are also created as part of this module to support the Elasticache Redis Cluster Infrastructure
    • Redis Parameter Group with custom parameters which can be controlled in the vars
    • Redis Subnet Group to support the Cluster
    • Custom Security Group which is dedicated to the Redis Cluster
    • Post Creation the Authentication Details are put into a custom AWS Secret Manager for Security Purposes

Usage

module "aws-elasticache" {
  source = "[email protected]:Kartheeko07/terraform-aws-elasticache-module.git?ref=LATEST_VERSION"

  ...

  tags = var.tags
}

Requirements

Name Version
terraform >= 0.13.0, < 0.15.0

Providers

Name Version
aws n/a
random n/a

Inputs

Name Description Type Default Required
apply_immediately Specifies whether any cluster modifications are applied immediately, or during the next maintenance window string "false" no
at_rest_encryption_enabled Enable encryption at rest bool true 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 string "true" no
automatic_failover_enabled Automatic failover (Not available for T1/T2 instances) bool true no
availability_zones A list of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is not important list(any)
[
"us-east-1a"
]
no
cluster_mode_enabled Flag to enable/disable creation of a native redis cluster. automatic_failover_enabled must be set to true. Only 1 cluster_mode block is allowed bool true no
cluster_mode_num_node_groups Number of node groups (shards) for this Redis replication group. Changing this number will trigger an online resizing operation before other settings modifications number 0 no
cluster_mode_replicas_per_node_group Number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will force a new resource number 0 no
cluster_size Number of nodes in the redis cluster. *Ignored when cluster_mode_enabled == true* number 2 no
family Redis family string "redis6.x" no
mandatory_elasticache_tags The Default tags that should be present while creating the application map(any)
{
"Classification": "Internal",
"Name": "DevOps Redis",
"Owner": "Infrastructure",
"Service": "Elasticache Redis"
}
no
multi_az_enabled Multi AZ (Automatic Failover must also be enabled. If Cluster Mode is enabled, Multi AZ is on by default, and this setting is ignored) bool true no
name Name for the Redis replication group i.e. UserObject string "redis-devops" no
parameter A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another
list(object({
name = string
value = string
}))
[
{
"name": "maxmemory-policy",
"value": "allkeys-lru"
}
]
no
redis_auth_token The password used to access a password protected server. Can be specified only if transit_encryption_enabled = true. If specified must contain from 16 to 128 alphanumeric characters or symbols string "" no
redis_ingress_rules n/a
list(object({
from_port = number
to_port = number
protocol = string
cidr_blocks = string
description = string
}))
[] 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.m5.large" no
redis_parameter_group_name Name of the custom aws_elasticache_parameter_group string n/a yes
redis_port n/a number 6379 no
redis_secret_name n/a string "redis-devops" 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 6.x string "6.x" no
snapshot_arns A single-element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. Example: arn:aws:s3:::my_bucket/snapshot1.rdb list(string) [] no
snapshot_name The name of a snapshot from which to restore data into the new node group. Changing the snapshot_name forces a new resource string "" no
subnet_group_name name of the subnet group string "redis-devops" no
subnet_ids ID list(string) [] no
tags Additional tags (e.g. map(BusinessUnit,XYZ) map(any) {} no
transit_encryption_enabled Whether to enable encryption in transit. If this is enabled, use the following guide to access redis bool true no
vpc_id VPC ID to create the cluster in (e.g. vpc-a22222ee) string "" no

Outputs

Name Description
endpoint Redis primary endpoint
id n/a
parameter_group n/a
port n/a

terraform-aws-elasticache-module's People

Contributors

kartheeko07 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.