Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@albertoal
Created November 2, 2018 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertoal/6ce26dd608c9993f0e33d5e1dc24f5af to your computer and use it in GitHub Desktop.
Save albertoal/6ce26dd608c9993f0e33d5e1dc24f5af to your computer and use it in GitHub Desktop.
module "dev_vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "1.46.0"
name = "${local.vpc_name}"
cidr = "10.0.0.0/16"
azs = ["${local.azs}"]
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
enable_nat_gateway = true
tags = {
// This is so kops knows that the VPC resources can be used for k8s
"kubernetes.io/cluster/${local.kubernetes_cluster_name}" = "shared"
"terraform" = true
"environment" = "${local.environment}"
}
// Tags required by k8s to launch services on the right subnets
private_subnet_tags = {
"kubernetes.io/role/internal-elb" = true
}
public_subnet_tags = {
"kubernetes.io/role/elb" = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment