Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ output "endpoint" {
}

output "reader_endpoint_address" {
value = join("", aws_elasticache_replication_group.default.*.reader_endpoint_address)
value = var.cluster_mode_enabled ? null : join("", aws_elasticache_replication_group.default.*.reader_endpoint_address)
Copy link
Member

@nitrocode nitrocode Oct 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we also to make sure the module is also enabled ?

Suggested change
value = var.cluster_mode_enabled ? null : join("", aws_elasticache_replication_group.default.*.reader_endpoint_address)
value = local.enabled && var.cluster_mode_enabled ? null : join("", aws_elasticache_replication_group.default.*.reader_endpoint_address)

If so, we'd probably want to add local.enabled to the endpoint output as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nitrocode Close, but not quite. Also should verify/fix other outputs.

description = "The address of the endpoint for the reader node in the replication group, if the cluster mode is disabled."
}

Expand Down