Skip to content

Commit

Permalink
Create a single NAT gateway for all private subnets (#39)
Browse files Browse the repository at this point in the history
* Create a single NAT gateway for all private subnets

* use official terraform source

* Create private subnets
- they are intended for the lanalyse and mdf hadoop cluster

* revert vpc module source as it fails tflint for unknown reasons
  • Loading branch information
lawliet89 authored and chrissng committed Feb 21, 2018
1 parent c6a9eab commit 131c1d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/core/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ variable "vpc_cidr" {
default = "10.158.0.0/16"
}

// Convention is for the MSB of the third octect to be zero for public subnet and one for private
// Convention is for the MSB of the third octet to be zero for public subnet and one for private
// subnets.

variable "vpc_public_subnets_cidr" {
Expand All @@ -78,7 +78,7 @@ variable "vpc_public_subnets_cidr" {
variable "vpc_private_subnets_cidr" {
description = "CIDR for each of the private subnets in the VPCs we want to create"
type = "list"
default = []
default = ["10.158.240.0/24", "10.158.241.0/24", "10.158.242.0/24"]
}

variable "vpc_database_subnets_cidr" {
Expand Down
3 changes: 2 additions & 1 deletion modules/core/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module "vpc" {
private_subnets = "${var.vpc_private_subnets_cidr}"
database_subnets = "${var.vpc_database_subnets_cidr}"

enable_nat_gateway = false
enable_nat_gateway = true
single_nat_gateway = true
enable_vpn_gateway = false
enable_dns_hostnames = true

Expand Down

0 comments on commit 131c1d8

Please sign in to comment.