Skip to content

Commit

Permalink
bug fix for single nat gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
harmanjyotkaur committed Jun 22, 2021
1 parent 3f80be8 commit fe829bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ resource "aws_route_table_association" "private" {
#Description : Provides a resource to create a routing table entry (a route) in a VPC
# routing table.
resource "aws_route" "nat_gateway" {
count = local.nat_gateway_count
count = local.nat_gateway_count > 0 ? local.nat_gateway_count : 0

route_table_id = element(aws_route_table.private.*.id, count.index)
destination_cidr_block = "0.0.0.0/0"
Expand Down
3 changes: 2 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ variable "ipv4_cidrs" {

variable "single_nat_gateway" {
type = bool
default = true
default = false

}

0 comments on commit fe829bc

Please sign in to comment.