Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jan 30, 2023
1 parent 6f822c4 commit aa30e76
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vpc-transit-gateway-association/self/routing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ resource "aws_route" "gateway_vpn_ipv4" {
# routing using prefix lists. We want cross-region prefix lists. For services, we create a cross-region prefix list to the
# peer TGW for every environment. For non-services, we create, we create that for services and the env.
# this is done only once, at the TGW main configuration.
# ENV RT -> services
# ENV RT -> services prefix route
#---
resource "aws_ec2_transit_gateway_prefix_list_reference" "vpc_self_common" {
provider = aws.self
for_each = local.create_prefix_list_routing ? { (var.transit_gateway_environment) = var.data_input.map_route_tables_self["services"] } : {}
for_each = local.create_prefix_list_routing ? { (var.transit_gateway_environment) = var.data_input.map_route_tables_self[var.transit_gateway_environment] } : {}

prefix_list_id = data.aws_ec2_managed_prefix_list.tgw_crossregion_env[each.key].id
prefix_list_id = data.aws_ec2_managed_prefix_list.tgw_crossregion_env["services"].id
transit_gateway_attachment_id = data.aws_ec2_transit_gateway_peering_attachment.attachment_peer.id
transit_gateway_route_table_id = each.value
}
Expand Down Expand Up @@ -107,3 +107,4 @@ resource "aws_ec2_transit_gateway_prefix_list_reference" "vpc_self_all" {
# transit_gateway_route_table_id = each.value
transit_gateway_route_table_id = var.data_input.map_route_tables_self["services"]
}

0 comments on commit aa30e76

Please sign in to comment.