Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions templates/terraform/environments/staging/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ module "staging" {
]
domain_name = "<% index .Params `stagingHostRoot` %>"

vpc_use_single_nat_gateway = true

# DB configuration
db_instance_class = "db.t3.small"
db_storage_gb = 20
Expand Down
1 change: 1 addition & 0 deletions templates/terraform/modules/environment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module "vpc" {
environment = var.environment
region = var.region
kubernetes_cluster_name = local.kubernetes_cluster_name
single_nat_gateway = var.vpc_use_single_nat_gateway
}

# To get the current account id
Expand Down
6 changes: 6 additions & 0 deletions templates/terraform/modules/environment/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ variable "db_instance_class" {
variable "db_storage_gb" {
description = "The amount of storage to allocate for the db, in GB"
}

variable "vpc_use_single_nat_gateway" {
description = "Use single nat-gateway instead of nat-gateway per subnet"
type = bool
default = true
}
2 changes: 2 additions & 0 deletions templates/terraform/modules/vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ module "vpc" {
}

enable_nat_gateway = true
single_nat_gateway = var.single_nat_gateway

enable_vpn_gateway = false
enable_dns_hostnames = true

Expand Down
5 changes: 5 additions & 0 deletions templates/terraform/modules/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ variable "region" {
variable "kubernetes_cluster_name" {
description = "Kubernetes cluster name used to associate with subnets for auto LB placement"
}

variable "single_nat_gateway" {
description = "Use single nat-gateway instead of nat-gateway per subnet"
type = bool
}