diff --git a/nat-instance.tf b/nat-instance.tf index 49b7ed7f..f7d569c0 100644 --- a/nat-instance.tf +++ b/nat-instance.tf @@ -135,7 +135,7 @@ resource "aws_eip_association" "nat_instance" { resource "aws_route" "nat_instance" { count = local.enabled ? local.nat_instance_count : 0 route_table_id = element(aws_route_table.private.*.id, count.index) - instance_id = element(aws_instance.nat_instance.*.id, count.index) + network_interface_id = element(aws_instance.nat_instance.*.primary_network_interface_id, count.index) destination_cidr_block = "0.0.0.0/0" depends_on = [aws_route_table.private]