Skip to content

Commit 58149e8

Browse files
committed
v1.1 -> expose cluster_id
Signed-off-by: John Ritsema <john.ritsema@turner.com>
1 parent 1d1139c commit 58149e8

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

examples/open/readme.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ provider "aws" {
88
}
99
1010
module "elasticache_redis" {
11-
source = "github.com/turnerlabs/terraform-aws-elasticache-redis?ref=v1.0"
11+
source = "github.com/turnerlabs/terraform-aws-elasticache-redis?ref=v1.1"
12+
13+
cluster_id = "myteam-myapp-dev"
1214
1315
vpc_id = "vpc-d070efb3"
1416
private_subnet_ids = "subnet-020d8b59,subnet-13f50b64"
@@ -20,7 +22,7 @@ module "elasticache_redis" {
2022
tag_name = "redis"
2123
tag_environment = "dev"
2224
tag_team = "myteam"
23-
tag_application = "my-app"
25+
tag_application = "myapp"
2426
}
2527
2628
resource "aws_security_group_rule" "access_in" {

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ resource "aws_elasticache_subnet_group" "default" {
2424
}
2525

2626
resource "aws_elasticache_cluster" "redis" {
27-
cluster_id = "${var.tag_team}-${var.tag_application}-${var.tag_environment}"
27+
cluster_id = "${var.cluster_id}"
2828
engine = "redis"
2929
engine_version = "${var.engine_version}"
3030
maintenance_window = "${var.maintenance_window}"

readme.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ A Terraform module that represents an AWS ElastiCache Redis cluster. Note that
66

77
```terraform
88
module "elasticache_redis" {
9-
source = "github.com/turnerlabs/terraform-aws-elasticache-redis?ref=v1.0"
9+
source = "github.com/turnerlabs/terraform-aws-elasticache-redis?ref=v1.1"
10+
11+
cluster_id = "myteam-myapp-dev"
1012
1113
vpc_id = "vpc-20f74844"
1214
private_subnet_ids = "subnet-4a887f3c,subnet-76dae35d"
@@ -18,12 +20,13 @@ module "elasticache_redis" {
1820
tag_name = "redis"
1921
tag_environment = "dev"
2022
tag_team = "myteam"
21-
tag_application = "my-app"
23+
tag_application = "myapp"
2224
}
2325
```
2426

2527
### Variables
2628

29+
- `cluster_id` - ID of the cluster
2730
- `vpc_id` - ID of VPC meant to house the cache
2831
- `private_subnet_ids` - Comma delimited list of private subnet IDs
2932
- `engine_version` - Cache engine version (default: `2.8.24`)

variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
variable "cluster_id" {}
2+
13
variable "vpc_id" {}
24

35
variable "private_subnet_ids" {}

0 commit comments

Comments
 (0)