From 117c7715d6639600b35ac8c08bbb127428260afa Mon Sep 17 00:00:00 2001 From: detomarco Date: Mon, 8 Sep 2025 17:41:42 +0200 Subject: [PATCH 1/4] feat: add replication group port to outputs --- outputs.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/outputs.tf b/outputs.tf index e015a78..79fad03 100644 --- a/outputs.tf +++ b/outputs.tf @@ -61,6 +61,11 @@ output "replication_group_primary_endpoint_address" { value = try(aws_elasticache_replication_group.this[0].primary_endpoint_address, aws_elasticache_replication_group.global[0].primary_endpoint_address, null) } +output "replication_group_port" { + description = "Port of the primary node in the replication group, if the cluster mode is disabled" + value = try(aws_elasticache_replication_group.this[0].port, aws_elasticache_replication_group.global[0].port, null) +} + output "replication_group_reader_endpoint_address" { description = "Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled" value = try(aws_elasticache_replication_group.this[0].reader_endpoint_address, aws_elasticache_replication_group.global[0].reader_endpoint_address, null) From 389110396b4594ae59b0bed2c42f902dce99d94d Mon Sep 17 00:00:00 2001 From: Marco De Toma Date: Mon, 8 Sep 2025 17:52:28 +0200 Subject: [PATCH 2/4] doc: update module documentation --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64bec7f..c5f8cf2 100644 --- a/README.md +++ b/README.md @@ -373,8 +373,8 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.93 | -| [random](#provider\_random) | >= 3.0 | +| [aws](#provider\_aws) | 6.12.0 | +| [random](#provider\_random) | 3.7.2 | ## Modules @@ -492,6 +492,7 @@ No modules. | [replication\_group\_engine\_version\_actual](#output\_replication\_group\_engine\_version\_actual) | Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine | | [replication\_group\_id](#output\_replication\_group\_id) | ID of the ElastiCache Replication Group | | [replication\_group\_member\_clusters](#output\_replication\_group\_member\_clusters) | Identifiers of all the nodes that are part of this replication group | +| [replication\_group\_port](#output\_replication\_group\_port) | Port of the primary node in the replication group, if the cluster mode is disabled | | [replication\_group\_primary\_endpoint\_address](#output\_replication\_group\_primary\_endpoint\_address) | Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled | | [replication\_group\_reader\_endpoint\_address](#output\_replication\_group\_reader\_endpoint\_address) | Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled | | [security\_group\_arn](#output\_security\_group\_arn) | Amazon Resource Name (ARN) of the security group | From bd210ca32644460f7671495dee509d5eb1e0f88f Mon Sep 17 00:00:00 2001 From: Marco De Toma Date: Mon, 8 Sep 2025 17:54:52 +0200 Subject: [PATCH 3/4] doc: rollback providers version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5f8cf2..5dfb4c7 100644 --- a/README.md +++ b/README.md @@ -373,8 +373,8 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| -| [aws](#provider\_aws) | 6.12.0 | -| [random](#provider\_random) | 3.7.2 | +| [aws](#provider\_aws) | >= 5.93 | +| [random](#provider\_random) | >= 3.0 | ## Modules From 4c0d3159baad9df20983c8d810bbbd31eb8bec7e Mon Sep 17 00:00:00 2001 From: Marco De Toma Date: Mon, 8 Sep 2025 18:35:37 +0200 Subject: [PATCH 4/4] chore: update examples --- examples/redis-global-replication-group/README.md | 1 + examples/redis-global-replication-group/outputs.tf | 5 +++++ examples/redis-replication-group/README.md | 1 + examples/redis-replication-group/outputs.tf | 5 +++++ 4 files changed, 12 insertions(+) diff --git a/examples/redis-global-replication-group/README.md b/examples/redis-global-replication-group/README.md index f512f47..a3b3c7a 100644 --- a/examples/redis-global-replication-group/README.md +++ b/examples/redis-global-replication-group/README.md @@ -74,6 +74,7 @@ No inputs. | [replication\_group\_engine\_version\_actual](#output\_replication\_group\_engine\_version\_actual) | Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine | | [replication\_group\_id](#output\_replication\_group\_id) | ID of the ElastiCache Replication Group | | [replication\_group\_member\_clusters](#output\_replication\_group\_member\_clusters) | Identifiers of all the nodes that are part of this replication group | +| [replication\_group\_port](#output\_replication\_group\_port) | Port of the primary node in the replication group, if the cluster mode is disabled | | [replication\_group\_primary\_endpoint\_address](#output\_replication\_group\_primary\_endpoint\_address) | Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled | | [replication\_group\_reader\_endpoint\_address](#output\_replication\_group\_reader\_endpoint\_address) | Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled | | [security\_group\_arn](#output\_security\_group\_arn) | Amazon Resource Name (ARN) of the security group | diff --git a/examples/redis-global-replication-group/outputs.tf b/examples/redis-global-replication-group/outputs.tf index 85300ce..602424f 100644 --- a/examples/redis-global-replication-group/outputs.tf +++ b/examples/redis-global-replication-group/outputs.tf @@ -61,6 +61,11 @@ output "replication_group_primary_endpoint_address" { value = module.elasticache_primary.replication_group_primary_endpoint_address } +output "replication_group_port" { + description = "Port of the primary node in the replication group, if the cluster mode is disabled" + value = module.elasticache_primary.replication_group_port +} + output "replication_group_reader_endpoint_address" { description = "Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled" value = module.elasticache_primary.replication_group_reader_endpoint_address diff --git a/examples/redis-replication-group/README.md b/examples/redis-replication-group/README.md index e4e2312..b873d2c 100644 --- a/examples/redis-replication-group/README.md +++ b/examples/redis-replication-group/README.md @@ -66,6 +66,7 @@ No inputs. | [replication\_group\_engine\_version\_actual](#output\_replication\_group\_engine\_version\_actual) | Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine | | [replication\_group\_id](#output\_replication\_group\_id) | ID of the ElastiCache Replication Group | | [replication\_group\_member\_clusters](#output\_replication\_group\_member\_clusters) | Identifiers of all the nodes that are part of this replication group | +| [replication\_group\_port](#output\_replication\_group\_port) | Port of the primary node in the replication group, if the cluster mode is disabled | | [replication\_group\_primary\_endpoint\_address](#output\_replication\_group\_primary\_endpoint\_address) | Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled | | [replication\_group\_reader\_endpoint\_address](#output\_replication\_group\_reader\_endpoint\_address) | Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled | | [security\_group\_arn](#output\_security\_group\_arn) | Amazon Resource Name (ARN) of the security group | diff --git a/examples/redis-replication-group/outputs.tf b/examples/redis-replication-group/outputs.tf index ccf51c7..3956261 100644 --- a/examples/redis-replication-group/outputs.tf +++ b/examples/redis-replication-group/outputs.tf @@ -61,6 +61,11 @@ output "replication_group_primary_endpoint_address" { value = module.elasticache.replication_group_primary_endpoint_address } +output "replication_group_port" { + description = "Port of the primary node in the replication group, if the cluster mode is disabled" + value = module.elasticache.replication_group_port +} + output "replication_group_reader_endpoint_address" { description = "Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled" value = module.elasticache.replication_group_reader_endpoint_address