Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-elasticache-redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-elasticache-redis
Commits
58b54777
Commit
58b54777
authored
Sep 22, 2017
by
Andriy Knysh
Committed by
GitHub
Sep 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename repo (#5)
* Rename repos, fix `README.md` * Fix `README.md` * Fix `README.md`
parent
27f72db9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
26 deletions
+31
-26
.gitignore
.gitignore
+1
-2
README.md
README.md
+16
-9
main.tf
main.tf
+14
-14
output.tf
output.tf
+0
-1
No files found.
.gitignore
View file @
58b54777
...
...
@@ -3,7 +3,6 @@
*.tfstate.backup
# Module directory
.terraform/
.terraform
.idea
*.iml
README.md
View file @
58b54777
# tf_redis
# terraform-aws-elasticache-redis
Terraform module to provision an
[
`ElastiCache`
](
https://aws.amazon.com/elasticache/
)
Redis Cluster
Terraform module to provision a ElastiCache Redis Cluster
## Usage
Include this repository as a module in your existing terraform code:
```
```
hcl
module
"example_redis"
{
source = "git::https://github.com/cloudposse/t
f_redis.git?ref=tags/0.1.0
"
source
=
"git::https://github.com/cloudposse/t
erraform-aws-elasticache-redis.git?ref=master
"
namespace
=
"general"
name
=
"redis"
stage
=
"prod"
...
...
@@ -30,10 +31,11 @@ module "example_redis" {
}
```
## Input
| Name | Default | De
cription
|
|:----------------------------
:|:-------------------:|:------------------------------------------------------:
|
| Name | Default | De
scription
|
|:----------------------------
-|:-------------------:|:-------------------------------------------------------
|
| namespace |global |Namespace |
| stage |default |Stage |
| name |redis |Name |
...
...
@@ -46,7 +48,7 @@ module "example_redis" {
| engine_version | 3.2.4 | Redis engine version |
| port | 6379 | Redis port |
| maintenance_window | wed:03:00-wed:04:00 | Maintenance window |
| notification_topic_arn | | Notificat
e topic arn
|
| notification_topic_arn | | Notificat
ion topic arn
|
| alarm_cpu_threshold_percent | 75 | CPU threshold alarm level |
| alarm_memory_threshold_bytes | 10000000 | Ram threshold alarm level |
| alarm_actions |
[]
| Alarm action list |
...
...
@@ -55,12 +57,17 @@ module "example_redis" {
| availability_zones |
[]
| Availability zone ids |
| zone_id | false | Route53 dns zone id |
## Output
| Name | De
cription
|
|:-----------------
:|:-----------------:
|
| Name | De
scription
|
|:-----------------
-|:------------------
|
| id | Redis cluster id |
| security_group_id | Security group id |
| host | Redis host |
| port | Redis port |
## License
Apache 2 License. See
[
`LICENSE`
](
LICENSE
)
for full details.
main.tf
View file @
58b54777
# Define composite variables for resources
module
"label"
{
source
=
"git::https://github.com/cloudposse/t
f_label.git?ref=tags/0.2.0
"
source
=
"git::https://github.com/cloudposse/t
erraform-null-label.git?ref=tags/0.2.1
"
namespace
=
"
${
var
.
namespace
}
"
name
=
"
${
var
.
name
}
"
stage
=
"
${
var
.
stage
}
"
...
...
@@ -15,6 +15,7 @@ module "label" {
resource
"aws_security_group"
"default"
{
vpc_id
=
"
${
var
.
vpc_id
}
"
name
=
"
${module
.
label
.
id
}
"
ingress
{
from_port
=
"
${
var
.
port
}
"
# Redis
to_port
=
"
${
var
.
port
}
"
...
...
@@ -104,9 +105,8 @@ resource "aws_cloudwatch_metric_alarm" "cache_memory" {
tags
=
"
${module
.
label
.
tags
}
"
}
module
"dns"
{
source
=
"git::https://github.com/cloudposse/t
f_hostname.git?ref=tags/0.1.0
"
source
=
"git::https://github.com/cloudposse/t
erraform-aws-route53-cluster-hostname.git?ref=tags/0.1.1
"
namespace
=
"
${
var
.
namespace
}
"
name
=
"
${
var
.
name
}
"
stage
=
"
${
var
.
stage
}
"
...
...
output.tf
View file @
58b54777
...
...
@@ -13,4 +13,3 @@ output "port" {
output
"host"
{
value
=
"
${module
.
dns
.
hostname
}
"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment