From b31d4c5cd74fb88dfa24bca6e7ac72fc70db7126 Mon Sep 17 00:00:00 2001 From: badra001 Date: Mon, 3 Apr 2023 15:15:31 -0400 Subject: [PATCH] add output zones --- route53-zone-association/vpc/README.md | 4 +++- route53-zone-association/vpc/main.tf | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/route53-zone-association/vpc/README.md b/route53-zone-association/vpc/README.md index 5a3ff70..81a5cbe 100644 --- a/route53-zone-association/vpc/README.md +++ b/route53-zone-association/vpc/README.md @@ -64,4 +64,6 @@ No modules. ## Outputs -No outputs. +| Name | Description | +|------|-------------| +| [zones](#output\_zones) | Map of zone ids to zone names for PHZs | diff --git a/route53-zone-association/vpc/main.tf b/route53-zone-association/vpc/main.tf index c0642db..61bafdf 100644 --- a/route53-zone-association/vpc/main.tf +++ b/route53-zone-association/vpc/main.tf @@ -71,3 +71,8 @@ resource "aws_route53_zone_association" "peer_zones" { depends_on = [aws_route53_vpc_association_authorization.peer_zones] } + +output "zones" { + description = "Map of zone ids to zone names for PHZs" + value = { for k, v in data.aws_route53_zone.zones : v.zone_id => k } +}