From 63158ad46a387c76d1d82e8c6f770c5d18994631 Mon Sep 17 00:00:00 2001 From: badra001 Date: Mon, 3 Apr 2023 16:38:38 -0400 Subject: [PATCH] add zones_account_id, zones_region --- route53-zone-association/vpc/README.md | 2 ++ route53-zone-association/vpc/main.tf | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/route53-zone-association/vpc/README.md b/route53-zone-association/vpc/README.md index 81a5cbe..59ac6f9 100644 --- a/route53-zone-association/vpc/README.md +++ b/route53-zone-association/vpc/README.md @@ -67,3 +67,5 @@ No modules. | Name | Description | |------|-------------| | [zones](#output\_zones) | Map of zone ids to zone names for PHZs | +| [zones\_account\_id](#output\_zones\_account\_id) | AWS Account ID where zone(s) is defined | +| [zones\_region](#output\_zones\_region) | AWS Region where zone(s) is defined | diff --git a/route53-zone-association/vpc/main.tf b/route53-zone-association/vpc/main.tf index 61bafdf..b6b8ac1 100644 --- a/route53-zone-association/vpc/main.tf +++ b/route53-zone-association/vpc/main.tf @@ -76,3 +76,13 @@ 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 } } + +output "zones_account_id" { + description = "AWS Account ID where zone(s) is defined" + value = data.aws_caller_identity.peer.account_id +} + +output "zones_region" { + description = "AWS Region where zone(s) is defined" + value = data.aws_region.peer.name +}