1- [ ![ ] ( https://img.shields.io/badge/license-Apache%202-blue.svg )] ( https://www.apache.org/licenses/LICENSE-2.0 )
2- # terraform-aws-elasticache
3- Terraform module elasticache
1+ <p align =" center " >
2+ <a href="https://github.com/tomarv2/terraform-aws-elasticache/actions/workflows/security_scans.yml" alt="Security Scans">
3+ <img src="https://github.com/tomarv2/terraform-aws-elasticache/actions/workflows/security_scans.yml/badge.svg?branch=main" /></a>
4+ <a href="https://www.apache.org/licenses/LICENSE-2.0" alt="license">
5+ <img src="https://img.shields.io/github/license/tomarv2/terraform-aws-elasticache" /></a>
6+ <a href="https://github.com/tomarv2/terraform-aws-elasticache/tags" alt="GitHub tag">
7+ <img src="https://img.shields.io/github/v/tag/tomarv2/terraform-aws-elasticache" /></a>
8+ <a href="https://github.com/tomarv2/terraform-aws-elasticache/pulse" alt="Activity">
9+ <img src="https://img.shields.io/github/commit-activity/m/tomarv2/terraform-aws-elasticache" /></a>
10+ <a href="https://stackoverflow.com/users/6679867/tomarv2" alt="Stack Exchange reputation">
11+ <img src="https://img.shields.io/stackexchange/stackoverflow/r/6679867"></a>
12+ <a href="https://discord.gg/XH975bzN" alt="chat on Discord">
13+ <img src="https://img.shields.io/discord/813961944443912223?logo=discord"></a>
14+ <a href="https://twitter.com/intent/follow?screen_name=varuntomar2019" alt="follow on Twitter">
15+ <img src="https://img.shields.io/twitter/follow/varuntomar2019?style=social&logo=twitter"></a>
16+ </p >
17+
18+ # Terraform module for AWS [ ElastiCache]
419
520## Versions
621
722- Module tested for Terraform 0.14.
823- AWS provider version [ 3.29.0] ( https://registry.terraform.io/providers/hashicorp/aws/latest )
924- ` main ` branch: Provider versions not pinned to keep up with Terraform releases
10- - ` tags ` releases: Tags are pinned with versions (use latest tag in your releases)
25+ - ` tags ` releases: Tags are pinned with versions (use <a href =" https://github.com/tomarv2/terraform-aws-elasticache/tags " alt =" GitHub tag " >
26+ <img src =" https://img.shields.io/github/v/tag/tomarv2/terraform-aws-elasticache " /></a > in your releases)
1127
1228** NOTE:**
1329
@@ -32,32 +48,69 @@ pip install tfremote
3248export TF_AWS_BUCKET=<remote state bucket name>
3349export TF_AWS_PROFILE=default
3450export TF_AWS_BUCKET_REGION=us-west-2
35- export PATH=$PATH:/usr/local/bin/
3651```
3752
38- - Update:
39- ```
40- example/custom/sample.tfvars
41- ```
53+ - Updated ` examples ` directory with required values
4254
43- - Change to:
44- ```
45- example/base
46- ```
4755
4856- Run and verify the output before deploying:
4957```
50- tf -cloud aws plan -var-file <path to .tfvars file>
58+ tf -cloud aws plan
5159```
5260
5361- Run below to deploy:
5462```
55- tf -cloud aws apply -var-file <path to .tfvars file>
63+ tf -cloud aws apply
5664```
5765
5866- Run below to destroy:
5967```
60- tf -cloud aws destroy -var-file <path to .tfvars file>
68+ tf -cloud aws destroy
69+ ```
70+
71+ > ❗️ ** Important** - Two variables are required for using ` tf ` package:
72+ >
73+ > - teamid
74+ > - prjid
75+ >
76+ > These variables are required to set backend path in the remote storage.
77+ > Variables can be defined using:
78+ >
79+ > - As ` inline variables ` e.g.: ` -var='teamid=demo-team' -var='prjid=demo-project' `
80+ > - Inside ` .tfvars ` file e.g.: ` -var-file=<tfvars file location> `
81+ >
82+ > For more information refer to [ Terraform documentation] ( https://www.terraform.io/docs/language/values/variables.html )
83+
84+ ##### ElastiCache with Security Group
85+ ```
86+ module "redis" {
87+ source = "../"
88+
89+ deploy_redis = true
90+ deploy_redis_parameter_group = true
91+ security_group_ids = [module.security_group.security_group_id]
92+ account_id = "123456789012"
93+ email = "demo@demo.com"
94+ # ----------------------------------------------
95+ # Note: Do not change teamid and prjid once set.
96+ teamid = var.teamid
97+ prjid = var.prjid
98+ }
99+
100+ module "security_group" {
101+ source = "git::git@github.com:tomarv2/terraform-aws-security-group.git?ref=v0.0.1"
102+
103+ deploy_security_group = true
104+
105+ service_ports = [6379]
106+ email = "demo@demo.com"
107+ teamid = var.teamid
108+ prjid = var.prjid
109+ }
61110```
62111
63- Please refer to example directory [ link] ( example/README.md ) for references.
112+ Please refer to examples directory [ link] ( examples ) for references.
113+
114+ ** Note:**
115+
116+ - For more information on redis: [ link] ( https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/cluster-create-determine-requirements.html#redis-cluster-configuration )
0 commit comments