Skip to content

Commit

Permalink
Merge pull request #1 from lsportsltd/add-eni-option-for-private-subnets
Browse files Browse the repository at this point in the history
Add option to work with eni instead of nat gw
  • Loading branch information
liranse authored Jun 28, 2022
2 parents 9c5ef29 + 64b4dc4 commit 11e5480
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion private.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ resource "aws_route" "default" {
for_each = var.az_ngw_ids

route_table_id = aws_route_table.private[each.key].id
nat_gateway_id = each.value
nat_gateway_id = var.is_nat ? each.value : null
network_interface_id = var.is_nat ? null : each.value
destination_cidr_block = "0.0.0.0/0"
depends_on = [aws_route_table.private]
}
3 changes: 3 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,6 @@ variable "ipv6_cidr_block" {
description = "Base IPv6 CIDR block which is divided into /64 subnet CIDR blocks"
default = null
}

variable "is_nat" {
}

0 comments on commit 11e5480

Please sign in to comment.