-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.tf
80 lines (69 loc) · 2.57 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
###
# Kubernetes Umgebung
#
module "master" {
#source = "./terraform-lerncloud-module"
source = "git::https://github.com/mc-b/terraform-lerncloud-multipass"
#source = "git::https://github.com/mc-b/terraform-lerncloud-maas"
#source = "git::https://github.com/mc-b/terraform-lerncloud-lernmaas"
#source = "git::https://github.com/mc-b/terraform-lerncloud-aws"
#source = "git::https://github.com/mc-b/terraform-lerncloud-azure"
#source = "git::https://github.com/mc-b/terraform-lerncloud-proxmox"
module = "dukmaster-${var.host_no}-${terraform.workspace}"
description = "Kubernetes Master"
userdata = "cloud-init-dukmaster.yaml"
depends_on = [
module.worker-01,
module.worker-02
]
cores = 4
memory = 12
storage = 32
ports = [22, 80, 16443, 25000, 2049, 4200]
url = var.url
key = var.key
vpn = var.vpn
}
module "worker-01" {
count = var.create_worker_01 ? 1 : 0
#source = "./terraform-lerncloud-module"
source = "git::https://github.com/mc-b/terraform-lerncloud-multipass"
#source = "git::https://github.com/mc-b/terraform-lerncloud-maas"
#source = "git::https://github.com/mc-b/terraform-lerncloud-lernmaas"
#source = "git::https://github.com/mc-b/terraform-lerncloud-aws"
#source = "git::https://github.com/mc-b/terraform-lerncloud-azure"
#source = "git::https://github.com/mc-b/terraform-lerncloud-proxmox"
module = "dukworker-${var.host_no + 1}-${terraform.workspace}"
description = "Kubernetes Worker"
userdata = "cloud-init-dukworker.yaml"
cores = 2
memory = 4
storage = 32
ports = [22, 80, 16443, 25000, 2049, 4200]
url = var.url
key = var.key
vpn = var.vpn
}
module "worker-02" {
count = var.create_worker_02 ? 1 : 0
#source = "./terraform-lerncloud-module"
source = "git::https://github.com/mc-b/terraform-lerncloud-multipass"
#source = "git::https://github.com/mc-b/terraform-lerncloud-maas"
#source = "git::https://github.com/mc-b/terraform-lerncloud-lernmaas"
#source = "git::https://github.com/mc-b/terraform-lerncloud-aws"
#source = "git::https://github.com/mc-b/terraform-lerncloud-azure"
#source = "git::https://github.com/mc-b/terraform-lerncloud-proxmox"
module = "dukworker-${var.host_no + 2}-${terraform.workspace}"
description = "Kubernetes Worker"
userdata = "cloud-init-dukworker.yaml"
depends_on = [
module.worker-01
]
cores = 2
memory = 4
storage = 32
ports = [22, 80, 16443, 25000, 2049, 4200]
url = var.url
key = var.key
vpn = var.vpn
}