-
Notifications
You must be signed in to change notification settings - Fork 1
/
eks-vpc.tf
34 lines (27 loc) · 833 Bytes
/
eks-vpc.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
provider "aws" {
region = "${var.eks_region}"
}
module "eks-vpc" {
source = "terraform-aws-modules/vpc/aws"
name = "eks-vpc"
cidr = "${var.vpc_cidr}"
azs = "${var.eks_azs}"
private_subnets = "${var.eks_private_cidrs}"
public_subnets = "${var.eks_public_cidrs}"
enable_nat_gateway = true
single_nat_gateway = true
enable_vpn_gateway = false
enable_dns_hostnames = true
public_subnet_tags = {
"kubernetes.io/role/elb" = ""
}
private_subnet_tags = {
"kubernetes.io/role/internal-elb" = ""
}
tags = {
"kubernetes.io/cluster/${var.cluster_name}" = "shared"
Terraform = "true"
Environment = "${var.environment_name}"
Stack = "${var.cluster_name}"
}
}