Skip to content

Commit f70ec98

Browse files
Michael Strachebryantbiggs
Michael Strache
andauthored
fix: Use IPv6 CIDR block destination on route when IPv6 support is enabled (#102)
Co-authored-by: Bryant Biggs <[email protected]>
1 parent 89cd41c commit f70ec98

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ resource "aws_route" "this" {
116116
tgw_id = x.tgw_id
117117
} }
118118

119-
route_table_id = each.key
120-
destination_cidr_block = each.value["cidr"]
121-
transit_gateway_id = each.value["tgw_id"]
119+
route_table_id = each.key
120+
destination_cidr_block = try(each.value.ipv6_support, false) ? null : each.value["cidr"]
121+
destination_ipv6_cidr_block = try(each.value.ipv6_support, false) ? each.value["cidr"] : null
122+
transit_gateway_id = each.value["tgw_id"]
122123
}
123124

124125
resource "aws_ec2_transit_gateway_route_table_association" "this" {

0 commit comments

Comments
 (0)