fix(elasticache): report a ConfigurationEndpoint only for cluster-mode-enabled replication groups (#4469)

A cluster-mode-disabled replication group reported a ConfigurationEndpoint
alongside NodeGroups[0].PrimaryEndpoint. AWS only returns ConfigurationEndpoint
for a cluster-mode-enabled group, and terraform-provider-aws branches on its
presence: when it is set, primary_endpoint_address and reader_endpoint_address
are left null.
This commit is contained in:
Abhigya authored and GitHub committed 2026-09-26 13:33:47 -04:00
1 parent 2dafbb45b2
commit 5af1d4048e
4 files changed
+32 -15

No files matched your search

@@ -962,7 +962,7 @@ private Response handleCreateCacheParameterGroup(MultivaluedMap<String, String>
appendSingleNodeGroup(xml, g, members, ep);
}
xml.end("NodeGroups");
if (ep != null) {
if (g.isClusterEnabled() && ep != null) {
xml.start("ConfigurationEndpoint")
.elem("Address", ep.address())
.elem("Port", (long) ep.port())