diff --git a/outputs.tf b/outputs.tf index ea9e778c2..80c8a2ad8 100644 --- a/outputs.tf +++ b/outputs.tf @@ -250,7 +250,7 @@ output "database_route_table_ids" { output "redshift_route_table_ids" { description = "List of IDs of redshift route tables" - value = try(coalescelist(aws_route_table.redshift[*].id, aws_route_table.public[*].id, aws_route_table.private[*].id), []) + value = length(aws_route_table.redshift[*].id) > 0 ? aws_route_table.redshift[*].id : (var.enable_public_redshift ? aws_route_table.public[*].id : aws_route_table.private[*].id) } output "elasticache_route_table_ids" {