diff --git a/README.md b/README.md
index 64bec7f..5dfb4c7 100644
--- a/README.md
+++ b/README.md
@@ -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 |
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
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)