Skip to content

Commit

Permalink
Merge pull request #8 from Ajay-sops/main
Browse files Browse the repository at this point in the history
added members cluster list in output of terraform
  • Loading branch information
Ajay-sops authored Apr 22, 2024
2 parents d8b182f + 1af9d83 commit 2c83af0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
6 changes: 6 additions & 0 deletions examples/complete-cluster-mode/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ output "id_of_redis_cluster" {
value = module.redis.elastic_cache_redis_cluster_id
}

output "redis_member_clusters" {
description = "Subnet group name of the elasticache-redis cluster"
value = module.redis.elastic_cache_redis_member_clusters

}

output "port_no" {
description = "Port number of Redis"
value = module.redis.elastic_cache_redis_port
Expand Down
6 changes: 3 additions & 3 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
locals {
name = "redis"
region = "us-east-2"
region = "us-west-2"
family = "redis6.x"
node_type = "cache.t3.small"
vpc_cidr = "10.0.0.0/16"
allowed_security_groups = ["sg-09b5da32f11bc36f"]
allowed_security_groups = ["sg-0412fe49"]
environment = "prod"
redis_engine_version = "6.0"
additional_tags = {
Expand Down Expand Up @@ -114,7 +114,7 @@ module "redis" {
cloudwatch_metric_alarms_enabled = true
alarm_cpu_threshold_percent = 70
alarm_memory_threshold_bytes = "10000000" # in bytes
slack_notification_enabled = true
slack_notification_enabled = false
slack_username = ""
slack_channel = ""
slack_webhook_url = ""
Expand Down
6 changes: 6 additions & 0 deletions examples/complete/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ output "redis_subnet_group_name" {

}

output "redis_member_clusters" {
description = "Subnet group name of the elasticache-redis cluster"
value = module.redis.elastic_cache_redis_member_clusters

}

output "id_of_redis_cluster" {
description = "ID of the elasticache-redis cluster"
value = module.redis.elastic_cache_redis_cluster_id
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ output "auth_token_password" {
description = "Elasticache-redis auth token password(this password may be old, because Terraform doesn't track it after initial creation)"
value = var.transit_encryption_enabled ? nonsensitive(random_password.password[0].result) : null
}

output "elastic_cache_redis_member_clusters" {
description = "ID of the elasticache-redis cluster"
value = flatten(aws_elasticache_replication_group.redis.member_clusters)
}

0 comments on commit 2c83af0

Please sign in to comment.