Skip to content

Commit

Permalink
fix var
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Oct 17, 2022
1 parent 79bca22 commit 211c386
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vpc-transit-gateway-association/data.transit-gateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data "aws_ec2_transit_gateway" "gateway_peer" {
## }

locals {
transit_gateway_route_table_ids_self = { for k, v in local.data_input.route_tables_self : v.tags["boc:network_vrf"] => k if contains(keys(v.tags), "boc:network_vrf") }
transit_gateway_route_table_ids_self = { for k, v in var.data_input.route_tables_self : v.tags["boc:network_vrf"] => k if contains(keys(v.tags), "boc:network_vrf") }
}

## these must be passed in
Expand All @@ -58,7 +58,7 @@ locals {
## }

locals {
transit_gateway_route_table_ids_peer = { for k, v in local.data_input.route_tables_peer : v.tags["boc:network_vrf"] => k if contains(keys(v.tags), "boc:network_vrf") }
transit_gateway_route_table_ids_peer = { for k, v in var.data_input.route_tables_peer : v.tags["boc:network_vrf"] => k if contains(keys(v.tags), "boc:network_vrf") }
}

# These two hold a map of VRF => route table
Expand Down
2 changes: 1 addition & 1 deletion vpc-transit-gateway-association/routing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ resource "aws_route" "gateway_ipv4" {
route_table_id = each.value
# destination_cidr_block = "10.128.0.0/16"
# destination_prefix_list_id = one([for k, v in data.aws_ec2_managed_prefix_list.tgw_ipv4 : k if v.address_family == "IPv4"])
destination_prefix_list_id = local.data_input.prefix_list_id_ipv4
destination_prefix_list_id = var.data_input.prefix_list_id_ipv4
transit_gateway_id = data.aws_ec2_transit_gateway.gateway_self.id

depends_on = [null_resource.vpc_attachment_exists]
Expand Down

0 comments on commit 211c386

Please sign in to comment.