Skip to content

Commit

Permalink
Remove tags in outputs (#11)
Browse files Browse the repository at this point in the history
* Remove references to tags in outputs

The AZ subnets are indexed by the count parameter. Since the count parameter is the same for all resources the ordering will be maintained. Hence the double check for AZ tags is redundant.

* Regenerate docs
  • Loading branch information
philwinder authored and aknysh committed Sep 24, 2018
1 parent cd20b06 commit 5676691
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ for example:
```
Available targets:
help This help screen
help Help screen
help/all Display help for all targets
help/short This help short screen
lint Lint terraform code
```
Expand Down
3 changes: 2 additions & 1 deletion docs/targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
```
Available targets:
help This help screen
help Help screen
help/all Display help for all targets
help/short This help short screen
lint Lint terraform code
```
6 changes: 3 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
output "az_subnet_ids" {
value = "${zipmap(var.availability_zones, matchkeys(coalescelist(aws_subnet.private.*.id, aws_subnet.public.*.id), coalescelist(aws_subnet.private.*.tags.AZ, aws_subnet.public.*.tags.AZ), var.availability_zones))}"
value = "${zipmap(var.availability_zones, coalescelist(aws_subnet.private.*.id, aws_subnet.public.*.id))}"
description = "Map of AZ names to subnet IDs"
}

output "az_route_table_ids" {
value = "${zipmap(var.availability_zones, matchkeys(coalescelist(aws_route_table.private.*.id, aws_route_table.public.*.id), coalescelist(aws_route_table.private.*.tags.AZ, aws_route_table.public.*.tags.AZ), var.availability_zones))}"
value = "${zipmap(var.availability_zones, coalescelist(aws_route_table.private.*.id, aws_route_table.public.*.id))}"
description = " Map of AZ names to Route Table IDs"
}

output "az_ngw_ids" {
value = "${zipmap(var.availability_zones, coalescelist(matchkeys(aws_nat_gateway.public.*.id, aws_nat_gateway.public.*.tags.AZ, var.availability_zones), local.dummy_az_ngw_ids))}"
value = "${zipmap(var.availability_zones, coalescelist(aws_nat_gateway.public.*.id, local.dummy_az_ngw_ids))}"
description = "Map of AZ names to NAT Gateway IDs (only for public subnets)"
}

0 comments on commit 5676691

Please # to comment.