Skip to content

Commit

Permalink
fix: need inputs (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
zack-is-cool authored Mar 9, 2024
1 parent 50e0eb9 commit 1737ad9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ locals {
transit_gateway_vpc_attachment_id = null
static_routes = [
{
blackhole = false
destination_cidr_block = "0.0.0.0/0"
blackhole = false
destination_cidr_block = "0.0.0.0/0"
route_transit_gateway_attachment_id = null
},
{
blackhole = false
destination_cidr_block = module.vpc_prod.vpc_cidr_block
blackhole = false
destination_cidr_block = module.vpc_prod.vpc_cidr_block
route_transit_gateway_attachment_id = null
}
]
},
Expand All @@ -131,8 +133,9 @@ locals {
transit_gateway_vpc_attachment_id = null
static_routes = [
{
blackhole = false
destination_cidr_block = module.vpc_dev.vpc_cidr_block
blackhole = false
destination_cidr_block = module.vpc_dev.vpc_cidr_block
route_transit_gateway_attachment_id = null
}
]
}
Expand Down Expand Up @@ -173,12 +176,12 @@ locals {
{
blackhole = false
destination_cidr_block = module.vpc_dev.vpc_cidr_block
route_transit_gateway_attachment_id = ""
route_transit_gateway_attachment_id = null
},
{
blackhole = false
destination_cidr_block = "0.0.0.0/0"
route_transit_gateway_attachment_id = ""
route_transit_gateway_attachment_id = null
},
]
}
Expand Down
2 changes: 1 addition & 1 deletion modules/transit_gateway_route/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {
"bh_${tostring(rc.blackhole)}"])
) => {
destination_cidr_block = rc.destination_cidr_block,
route_transit_gateway_attachment_id = rc.route_transit_gateway_attachment_id != "" ? rc.route_transit_gateway_attachment_id : (rc.blackhole ? null : var.vpc_transit_gateway_attachment_id),
route_transit_gateway_attachment_id = rc.route_transit_gateway_attachment_id != null && rc.route_transit_gateway_attachment_id != "" ? rc.route_transit_gateway_attachment_id : (rc.blackhole ? null : var.vpc_transit_gateway_attachment_id),
blackhole = rc.blackhole
}
}
Expand Down

0 comments on commit 1737ad9

Please sign in to comment.