Skip to content

Commit 58b5477

Browse files
authored
Rename repo (#5)
* Rename repos, fix `README.md` * Fix `README.md` * Fix `README.md`
1 parent 27f72db commit 58b5477

File tree

4 files changed

+31
-26
lines changed

4 files changed

+31
-26
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*.tfstate.backup
44

55
# Module directory
6-
.terraform/
7-
6+
.terraform
87
.idea
98
*.iml

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
# tf_redis
1+
# terraform-aws-elasticache-redis
2+
3+
Terraform module to provision an [`ElastiCache`](https://aws.amazon.com/elasticache/) Redis Cluster
24

3-
Terraform module to provision a ElastiCache Redis Cluster
45

56
## Usage
67

78
Include this repository as a module in your existing terraform code:
89

9-
```
10+
```hcl
1011
module "example_redis" {
11-
source = "git::https://github.com/cloudposse/tf_redis.git?ref=tags/0.1.0"
12+
source = "git::https://github.com/cloudposse/terraform-aws-elasticache-redis.git?ref=master"
1213
namespace = "general"
1314
name = "redis"
1415
stage = "prod"
@@ -30,10 +31,11 @@ module "example_redis" {
3031
}
3132
```
3233

34+
3335
## Input
3436

35-
| Name | Default | Decription |
36-
|:----------------------------:|:-------------------:|:------------------------------------------------------:|
37+
| Name | Default | Description |
38+
|:-----------------------------|:-------------------:|:-------------------------------------------------------|
3739
| namespace |global |Namespace |
3840
| stage |default |Stage |
3941
| name |redis |Name |
@@ -46,7 +48,7 @@ module "example_redis" {
4648
| engine_version | 3.2.4 | Redis engine version |
4749
| port | 6379 | Redis port |
4850
| maintenance_window | wed:03:00-wed:04:00 | Maintenance window |
49-
| notification_topic_arn | | Notificate topic arn |
51+
| notification_topic_arn | | Notification topic arn |
5052
| alarm_cpu_threshold_percent | 75 | CPU threshold alarm level |
5153
| alarm_memory_threshold_bytes | 10000000 | Ram threshold alarm level |
5254
| alarm_actions | [] | Alarm action list |
@@ -55,12 +57,17 @@ module "example_redis" {
5557
| availability_zones | [] | Availability zone ids |
5658
| zone_id | false | Route53 dns zone id |
5759

60+
5861
## Output
5962

60-
| Name | Decription |
61-
|:-----------------:|:-----------------:|
63+
| Name | Description |
64+
|:------------------|:------------------|
6265
| id | Redis cluster id |
6366
| security_group_id | Security group id |
6467
| host | Redis host |
6568
| port | Redis port |
6669

70+
71+
## License
72+
73+
Apache 2 License. See [`LICENSE`](LICENSE) for full details.

main.tf

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Define composite variables for resources
22
module "label" {
3-
source = "git::https://github.com/cloudposse/tf_label.git?ref=tags/0.2.0"
3+
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
44
namespace = "${var.namespace}"
55
name = "${var.name}"
66
stage = "${var.stage}"
@@ -15,8 +15,9 @@ module "label" {
1515
resource "aws_security_group" "default" {
1616
vpc_id = "${var.vpc_id}"
1717
name = "${module.label.id}"
18+
1819
ingress {
19-
from_port = "${var.port}" # Redis
20+
from_port = "${var.port}" # Redis
2021
to_port = "${var.port}"
2122
protocol = "tcp"
2223
security_groups = ["${var.security_groups}"]
@@ -29,7 +30,7 @@ resource "aws_security_group" "default" {
2930
cidr_blocks = ["0.0.0.0/0"]
3031
}
3132

32-
tags = "${module.label.tags}"
33+
tags = "${module.label.tags}"
3334
}
3435

3536
resource "aws_elasticache_subnet_group" "default" {
@@ -56,7 +57,7 @@ resource "aws_elasticache_replication_group" "default" {
5657
maintenance_window = "${var.maintenance_window}"
5758
notification_topic_arn = "${var.notification_topic_arn}"
5859

59-
tags = "${module.label.tags}"
60+
tags = "${module.label.tags}"
6061
}
6162

6263
#
@@ -72,15 +73,15 @@ resource "aws_cloudwatch_metric_alarm" "cache_cpu" {
7273
period = "300"
7374
statistic = "Average"
7475

75-
threshold = "${var.alarm_cpu_threshold_percent}"
76+
threshold = "${var.alarm_cpu_threshold_percent}"
7677

7778
dimensions {
7879
CacheClusterId = "${module.label.id}"
7980
}
8081

81-
alarm_actions = ["${var.alarm_actions}"]
82-
depends_on = ["aws_elasticache_replication_group.default"]
83-
tags = "${module.label.tags}"
82+
alarm_actions = ["${var.alarm_actions}"]
83+
depends_on = ["aws_elasticache_replication_group.default"]
84+
tags = "${module.label.tags}"
8485
}
8586

8687
resource "aws_cloudwatch_metric_alarm" "cache_memory" {
@@ -93,20 +94,19 @@ resource "aws_cloudwatch_metric_alarm" "cache_memory" {
9394
period = "60"
9495
statistic = "Average"
9596

96-
threshold = "${var.alarm_memory_threshold_bytes}"
97+
threshold = "${var.alarm_memory_threshold_bytes}"
9798

9899
dimensions {
99100
CacheClusterId = "${module.label.id}"
100101
}
101102

102-
alarm_actions = ["${var.alarm_actions}"]
103-
depends_on = ["aws_elasticache_replication_group.default"]
104-
tags = "${module.label.tags}"
103+
alarm_actions = ["${var.alarm_actions}"]
104+
depends_on = ["aws_elasticache_replication_group.default"]
105+
tags = "${module.label.tags}"
105106
}
106107

107-
108108
module "dns" {
109-
source = "git::https://github.com/cloudposse/tf_hostname.git?ref=tags/0.1.0"
109+
source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.1.1"
110110
namespace = "${var.namespace}"
111111
name = "${var.name}"
112112
stage = "${var.stage}"

output.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ output "port" {
1313
output "host" {
1414
value = "${module.dns.hostname}"
1515
}
16-

0 commit comments

Comments
 (0)