Skip to content

Commit 8412c34

Browse files
committed
fix: Remove experimental features and ensure compatibility
1 parent 66b54e7 commit 8412c34

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

main.tf

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -309,18 +309,17 @@ resource "aws_route" "private_route_table_routes" {
309309
route_table_id = each.value.route_table_id
310310

311311
# Route attributes
312-
destination_cidr_block = lookup(each.value.route, "destination_cidr_block", null)
313-
destination_ipv6_cidr_block = lookup(each.value.route, "destination_ipv6_cidr_block", null)
314-
egress_only_gateway_id = lookup(each.value.route, "egress_only_gateway_id", null)
315-
gateway_id = lookup(each.value.route, "gateway_id", null)
316-
nat_gateway_id = lookup(each.value.route, "nat_gateway_id", null)
317-
transit_gateway_id = lookup(each.value.route, "transit_gateway_id", null)
318-
vpc_peering_connection_id = lookup(each.value.route, "vpc_peering_connection_id", null)
319-
local_gateway_id = lookup(each.value.route, "local_gateway_id", null)
320-
carrier_gateway_id = lookup(each.value.route, "carrier_gateway_id", null)
321-
destination_prefix_list_id = lookup(each.value.route, "destination_prefix_list_id", null)
312+
destination_cidr_block = each.value.route.destination_cidr_block != "" ? each.value.route.destination_cidr_block : null
313+
destination_ipv6_cidr_block = each.value.route.destination_ipv6_cidr_block != "" ? each.value.route.destination_ipv6_cidr_block : null
314+
egress_only_gateway_id = each.value.route.egress_only_gateway_id != "" ? each.value.route.egress_only_gateway_id : null
315+
gateway_id = each.value.route.gateway_id != "" ? each.value.route.gateway_id : null
316+
nat_gateway_id = each.value.route.nat_gateway_id != "" ? each.value.route.nat_gateway_id : null
317+
transit_gateway_id = each.value.route.transit_gateway_id != "" ? each.value.route.transit_gateway_id : null
318+
vpc_peering_connection_id = each.value.route.vpc_peering_connection_id != "" ? each.value.route.vpc_peering_connection_id : null
319+
local_gateway_id = each.value.route.local_gateway_id != "" ? each.value.route.local_gateway_id : null
320+
carrier_gateway_id = each.value.route.carrier_gateway_id != "" ? each.value.route.carrier_gateway_id : null
321+
destination_prefix_list_id = each.value.route.destination_prefix_list_id != "" ? each.value.route.destination_prefix_list_id : null
322322
}
323-
324323
################################################################################
325324
# Private Network ACLs
326325
################################################################################

variables.tf

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -399,16 +399,16 @@ variable "private_route_table_tags" {
399399
variable "private_route_table_routes" {
400400
description = "A map of private route table IDs to a list of route objects."
401401
type = map(list(object({
402-
destination_cidr_block = optional(string)
403-
destination_ipv6_cidr_block = optional(string)
404-
egress_only_gateway_id = optional(string)
405-
gateway_id = optional(string)
406-
nat_gateway_id = optional(string)
407-
transit_gateway_id = optional(string)
408-
vpc_peering_connection_id = optional(string)
409-
local_gateway_id = optional(string)
410-
carrier_gateway_id = optional(string)
411-
destination_prefix_list_id = optional(string)
402+
destination_cidr_block = string
403+
destination_ipv6_cidr_block = string
404+
egress_only_gateway_id = string
405+
gateway_id = string
406+
nat_gateway_id = string
407+
transit_gateway_id = string
408+
vpc_peering_connection_id = string
409+
local_gateway_id = string
410+
carrier_gateway_id = string
411+
destination_prefix_list_id = string
412412
})))
413413
default = {}
414414
}

0 commit comments

Comments
 (0)