Skip to content

Commit

Permalink
update example version fix cluster_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdikarimian committed Apr 24, 2022
1 parent e43a4e6 commit e74cd5b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
5 changes: 3 additions & 2 deletions examples/redis-basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ module "vpc" {
}

module "redis" {
namespace = "redis-basic-example"
namespace = "redis-basic-"
cluster_name = "example"
source = "Mehdikarimian/elasticache-redis-cluster/aws"
version = "1.0.0"
version = "1.0.3"
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
node_type = "cache.t3.small"
Expand Down
5 changes: 3 additions & 2 deletions examples/redis-clustered-mode/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ module "vpc" {
}

module "redis" {
namespace = "redis-cluster-mode-example"
namespace = "redis-cluster-mode-"
cluster_name = "example"
source = "Mehdikarimian/elasticache-redis-cluster/aws"
version = "1.0.0"
version = "1.0.3"
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
node_type = "cache.t3.small"
Expand Down
19 changes: 10 additions & 9 deletions examples/redis-replication-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ module "vpc" {
}

module "redis" {
namespace = "redis-replication-example"
source = "Mehdikarimian/elasticache-redis-cluster/aws"
version = "1.0.0"
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
node_type = "cache.t3.small"
cluster_description = "redis replication group example description"
subnet_name = "redis-replication-group-example-subnet"
apply_immediately = true
namespace = "redis-replication-"
cluster_name = "example"
source = "Mehdikarimian/elasticache-redis-cluster/aws"
version = "1.0.3"
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
node_type = "cache.t3.small"
cluster_description = "redis replication group example description"
subnet_name = "redis-replication-group-example-subnet"
apply_immediately = true

number_replica = 3

Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resource "aws_elasticache_parameter_group" "redis" {
}

resource "aws_elasticache_replication_group" "default" {
replication_group_id = "${var.cluster_id}-${var.cluster_name}"
replication_group_id = "${var.namespace}-${var.cluster_name}"
description = var.cluster_description
security_group_ids = [aws_security_group.redis-security-group.id]
node_type = var.node_type
Expand Down

0 comments on commit e74cd5b

Please sign in to comment.