-
Notifications
You must be signed in to change notification settings - Fork 0
/
vpc.tf
36 lines (29 loc) · 1.02 KB
/
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
35
36
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "2.17.0"
name = "${var.name}"
cidr = "${var.vpc_cidr}"
#azs = ["${split(",", var.azs)}"]
#private_subnets = ["${split(",", var.private_subnets)}"]
#public_subnets = ["${split(",", var.public_subnets)}"]
azs = ["${var.azs}"]
private_subnets = ["${var.private_subnets}"]
public_subnets = ["${var.public_subnets}"]
enable_nat_gateway = "${var.enable_nat_gateway}"
single_nat_gateway = "${var.single_nat_gateway}"
enable_dns_support = "${var.enable_dns_support}"
enable_dns_hostnames = "${var.enable_dns_hostnames}"
tags = "${merge(
map(format("kubernetes.io/cluster/%s", var.name), "shared"),
map("Terraform", "true")
)}"
public_subnet_tags = "${merge(
map("kubernetes.io/role/elb", "1"),
map("type", "public")
)}"
private_subnet_tags = "${merge(
map(format("kubernetes.io/cluster/%s", var.name), "shared"),
map("kubernetes.io/role/internal-elb", "1"),
map("type", "private")
)}"
}