From dc4f02f6504a270d11a5d77a3f9920e101c64fcb Mon Sep 17 00:00:00 2001 From: badra001 Date: Sat, 22 Apr 2023 14:33:07 -0400 Subject: [PATCH] make zone data be per-vpc --- route53-zone-association/vpc/main.tf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/route53-zone-association/vpc/main.tf b/route53-zone-association/vpc/main.tf index 64443f0..75046bd 100644 --- a/route53-zone-association/vpc/main.tf +++ b/route53-zone-association/vpc/main.tf @@ -74,14 +74,17 @@ resource "aws_route53_zone_association" "peer_zones" { resource "aws_ssm_parameter" "self_zones" { for_each = var.enable_ssm_parameter ? { for k, v in data.aws_route53_zone.zones : k => v.zone_id } : {} - name = format("/local/%v/route53/zones/%v", local.region, each.key) + name = format("/local/%v/route53/%v/zones/%v", local.region, var.vpc_id, each.key) description = format("Route53 Zone Details for %v", each.key) type = "String" value = jsonencode({ - name = each.key - account_id = data.aws_caller_identity.peer.account_id - region = data.aws_region.peer.name - zone_id = each.value + name = each.key + self_account_id = data.aws_caller_identity.self.account_id + peer_account_id = data.aws_caller_identity.peer.account_id + self_region = data.aws_region.self.name + peer_region = data.aws_region.peer.name + zone_id = each.value + vpc_id = var.vpc_id # create_time = try(time_static.vpce[0].unix, null) })