From c284b401925f362af08ebc63ad5af2a5ea88ddad Mon Sep 17 00:00:00 2001 From: badra001 Date: Tue, 31 Jan 2023 07:50:06 -0500 Subject: [PATCH] revert --- .../vpc-transit-gateway.tf | 66 +++++-------------- 1 file changed, 18 insertions(+), 48 deletions(-) diff --git a/examples/vpc-transit-gateway-attachment/vpc-transit-gateway.tf b/examples/vpc-transit-gateway-attachment/vpc-transit-gateway.tf index 3a9bf00..8d8596a 100644 --- a/examples/vpc-transit-gateway-attachment/vpc-transit-gateway.tf +++ b/examples/vpc-transit-gateway-attachment/vpc-transit-gateway.tf @@ -12,24 +12,16 @@ module "vpc_tgw_data" { aws.peer = aws.tgw_peer } - network_account_profile = var.network_account_profile - vpc_id = local.vpc_id - vpc_cidr_block = var.vpc_cidr_block - vpc_full_name = var.vpc_full_name - # private_subnets_ids = [for sn in module.subnets.private_subnets_ids : sn if lookup(sn.tags, "boc:vpc:route-table", null) == "attachment"] - # private_route_table_ids = module.routing.private_route_table_ids - private_subnets_ids = [for sn in local.private_subnets_ids : sn if lookup(sn.tags, "boc:vpc:route-table", null) == "attachment"] - private_route_table_ids = local.private_route_table_ids + network_account_profile = var.network_account_profile + vpc_id = local.vpc_id + vpc_cidr_block = var.vpc_cidr_block + vpc_full_name = var.vpc_full_name + private_subnets_ids = [for sn in module.subnets.private_subnets_ids : sn if lookup(sn.tags, "boc:vpc:route-table", null) == "attachment"] + private_route_table_ids = module.routing.private_route_table_ids transit_gateway_environment = var.tgw_environment transit_gateway_label = var.tgw_label route_prefix_list_name = format("transit-gateway.%v", var.tgw_label) vpn_route_prefix_list_name = format("vpn-transit-gateway.%v", var.tgw_label) - - tags = merge( - local.common_tags, - var.tgw_label != null ? { "boc:tgw:environment" = var.tgw_label } : {}, - # var.shared_vpc_label!=null ? { "boc:network_shared"= var.shared_vpc_label } : {}, - ) } @@ -46,28 +38,17 @@ module "vpc_tgw_self" { } count = var.tgw_environment != null ? 1 : 0 - network_account_profile = var.network_account_profile - vpc_id = local.vpc_id - vpc_cidr_block = var.vpc_cidr_block - vpc_full_name = var.vpc_full_name - # private_subnets_ids = [for sn in module.subnets.private_subnets_ids : sn if lookup(sn.tags, "boc:vpc:route-table", null) == "attachment"] - # private_route_table_ids = module.routing.private_route_table_ids - private_subnets_ids = [for sn in local.private_subnets_ids : sn if lookup(sn.tags, "boc:vpc:route-table", null) == "attachment"] - private_route_table_ids = local.private_route_table_ids + network_account_profile = var.network_account_profile + vpc_id = local.vpc_id + vpc_cidr_block = var.vpc_cidr_block + vpc_full_name = var.vpc_full_name + private_subnets_ids = [for sn in module.subnets.private_subnets_ids : sn if lookup(sn.tags, "boc:vpc:route-table", null) == "attachment"] + private_route_table_ids = module.routing.private_route_table_ids transit_gateway_environment = var.tgw_environment transit_gateway_label = var.tgw_label route_prefix_list_name = format("transit-gateway.%v", var.tgw_label) vpn_route_prefix_list_name = format("vpn-transit-gateway.%v", var.tgw_label) data_input = module.vpc_tgw_data.data_output - enable_vpn_routing = true - # create_prefix_list_routing = false - # create_static_peer_routing = false - - tags = merge( - local.common_tags, - var.tgw_label != null ? { "boc:tgw:environment" = var.tgw_label } : {}, - # var.shared_vpc_label!=null ? { "boc:network_shared"= var.shared_vpc_label } : {}, - ) } module "vpc_tgw_peer" { @@ -80,28 +61,17 @@ module "vpc_tgw_peer" { } count = var.tgw_environment != null ? 1 : 0 - network_account_profile = var.network_account_profile - vpc_id = local.vpc_id - vpc_cidr_block = var.vpc_cidr_block - vpc_full_name = var.vpc_full_name - # private_subnets_ids = [for sn in module.subnets.private_subnets_ids : sn if lookup(sn.tags, "boc:vpc:route-table", null) == "attachment"] - # private_route_table_ids = module.routing.private_route_table_ids - private_subnets_ids = [for sn in local.private_subnets_ids : sn if lookup(sn.tags, "boc:vpc:route-table", null) == "attachment"] - private_route_table_ids = local.private_route_table_ids + network_account_profile = var.network_account_profile + vpc_id = local.vpc_id + vpc_cidr_block = var.vpc_cidr_block + vpc_full_name = var.vpc_full_name + private_subnets_ids = [for sn in module.subnets.private_subnets_ids : sn if lookup(sn.tags, "boc:vpc:route-table", null) == "attachment"] + private_route_table_ids = module.routing.private_route_table_ids transit_gateway_environment = var.tgw_environment transit_gateway_label = var.tgw_label route_prefix_list_name = format("transit-gateway.%v", var.tgw_label) vpn_route_prefix_list_name = format("vpn-transit-gateway.%v", var.tgw_label) data_input = module.vpc_tgw_data.data_output - enable_vpn_routing = true - # create_prefix_list_routing = false - # create_static_peer_routing = false - - tags = merge( - local.common_tags, - var.tgw_label != null ? { "boc:tgw:environment" = var.tgw_label } : {}, - # var.shared_vpc_label!=null ? { "boc:network_shared"= var.shared_vpc_label } : {}, - ) depends_on = [module.vpc_tgw_self] }