Skip to content

Commit

Permalink
fix outputs where coalescelist could be run with all parametes as emp…
Browse files Browse the repository at this point in the history
…ty lists
  • Loading branch information
alex-goncharov committed May 24, 2019
1 parent 7333e94 commit 9127d84
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,17 @@ output "private_route_table_ids" {

output "database_route_table_ids" {
description = "List of IDs of database route tables"
value = coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id)
value = length(aws_route_table.database.*.id) > 0 ? aws_route_table.database.*.id : aws_route_table.private.*.id
}

output "redshift_route_table_ids" {
description = "List of IDs of redshift route tables"
value = coalescelist(aws_route_table.redshift.*.id, aws_route_table.private.*.id)
value = length(aws_route_table.redshift.*.id) > 0 ? aws_route_table.redshift.*.id : aws_route_table.private.*.id
}

output "elasticache_route_table_ids" {
description = "List of IDs of elasticache route tables"
value = [coalescelist(
aws_route_table.elasticache.*.id,
aws_route_table.private.*.id,
)]
value = length(aws_route_table.elasticache.*.id) > 0 ? aws_route_table.elasticache.*.id : aws_route_table.private.*.id
}

output "intra_route_table_ids" {
Expand Down

0 comments on commit 9127d84

Please sign in to comment.