-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
52 lines (48 loc) · 1.13 KB
/
main.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module "network" {
source = "github.com/terraform-yc-modules/terraform-yc-vpc"
network_name = "demo"
create_sg = false
public_subnets = [
{
zone = "ru-central1-a",
v4_cidr_blocks = "10.10.0.0/16"
},
{
zone = "ru-central1-b",
v4_cidr_blocks = "10.20.0.0/16"
},
{
zone = "ru-central1-d",
v4_cidr_blocks = "10.30.0.0/16"
},
]
}
module "kubernetes" {
source = "github.com/terraform-yc-modules/terraform-yc-kubernetes"
network_id = module.network.vpc_id
master_locations = [
for s in module.network.private_subnets :
{
zone = s.zone
subnet_id = s.subnet_id
}
]
node_groups = {
for s in module.network.private_subnets :
"${local.name}-${s.zone}" => {
node_cores = 2
node_memory = 4
nat = true
preemptible = true
fixed_scale = {
size = 1
}
node_locations = [
{
zone = s.zone
subnet_id = s.subnet_id
}
]
}
}
}