-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathservers.tf
263 lines (216 loc) · 6.17 KB
/
servers.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
resource "proxmox_vm_qemu" "controller" {
name = "controller"
desc = "ComputeStacks controller"
tags = var.proxmox_controller_tags
target_node = var.proxmox_controller_host
onboot = var.proxmox_onboot
qemu_os = "l26"
oncreate = true
agent = 1
clone = var.proxmox_image
full_clone = var.proxmox_full_clone
cpu = var.proxmox_cpu_type
cores = var.resources_controller_cpu_cores
sockets = var.resources_controller_cpu_sockets
memory = var.resources_controller_memory
balloon = var.resources_controller_memory
scsihw = "virtio-scsi-pci"
hotplug = "disk,network,usb"
disk {
type = "scsi"
storage = var.proxmox_controller_storage_loc
size = var.resources_controller_disk
discard = var.proxmox_disk_discard
}
network {
model = "virtio"
bridge = var.proxmox_net_bridge
tag = var.proxmox_net_vlan
}
os_type = "cloud-init"
ciuser = var.vm_user
cipassword = random_string.server_password.result
ipconfig0 = var.proxmox_controller_network
ssh_user = var.vm_user
sshkeys = var.ssh_pub_allowed
}
resource "proxmox_vm_qemu" "node" {
name = "node100"
desc = "ComputeStacks node 100"
tags = var.proxmox_node_tags
target_node = var.proxmox_node_host
onboot = var.proxmox_onboot
qemu_os = "l26"
oncreate = true
agent = 1
clone = var.proxmox_image
full_clone = var.proxmox_full_clone
cpu = var.proxmox_cpu_type
cores = var.resources_node_cpu_cores
sockets = var.resources_node_cpu_sockets
memory = var.resources_node_memory
balloon = var.resources_node_memory
scsihw = "virtio-scsi-pci"
hotplug = "disk,network,usb"
disk {
type = "scsi"
storage = var.proxmox_node_storage_loc
size = var.resources_node_disk
discard = var.proxmox_disk_discard
}
network {
model = "virtio"
bridge = var.proxmox_net_bridge
tag = var.proxmox_net_vlan
}
os_type = "cloud-init"
ciuser = var.vm_user
cipassword = random_string.server_password.result
ipconfig0 = var.proxmox_node_network
ssh_user = var.vm_user
sshkeys = var.ssh_pub_allowed
}
resource "proxmox_vm_qemu" "metrics" {
name = "metrics"
desc = "ComputeStacks Metrics"
tags = var.proxmox_metrics_tags
target_node = var.proxmox_metrics_host
onboot = var.proxmox_onboot
qemu_os = "l26"
oncreate = true
agent = 1
clone = var.proxmox_image
full_clone = var.proxmox_full_clone
cpu = var.proxmox_cpu_type
cores = var.resources_metrics_cpu_cores
sockets = var.resources_metrics_cpu_sockets
memory = var.resources_metrics_memory
balloon = var.resources_metrics_memory
scsihw = "virtio-scsi-pci"
hotplug = "disk,network,usb"
disk {
type = "scsi"
storage = var.proxmox_metrics_storage_loc
size = var.resources_metrics_disk
discard = var.proxmox_disk_discard
}
network {
model = "virtio"
bridge = var.proxmox_net_bridge
tag = var.proxmox_net_vlan
}
os_type = "cloud-init"
ciuser = var.vm_user
cipassword = random_string.server_password.result
ipconfig0 = var.proxmox_metrics_network
ssh_user = var.vm_user
sshkeys = var.ssh_pub_allowed
}
resource "proxmox_vm_qemu" "backup" {
name = "backup"
desc = "ComputeStacks Backup"
tags = var.proxmox_backup_tags
target_node = var.proxmox_backup_host
onboot = var.proxmox_onboot
qemu_os = "l26"
oncreate = true
agent = 1
clone = var.proxmox_image
full_clone = var.proxmox_full_clone
cpu = var.proxmox_cpu_type
cores = var.resources_backup_cpu_cores
sockets = var.resources_backup_cpu_sockets
memory = var.resources_backup_memory
balloon = var.resources_backup_memory
scsihw = "virtio-scsi-pci"
hotplug = "disk,network,usb"
disk {
type = "scsi"
storage = var.proxmox_backup_storage_loc
size = var.resources_backup_disk
discard = var.proxmox_disk_discard
}
network {
model = "virtio"
bridge = var.proxmox_net_bridge
tag = var.proxmox_net_vlan
}
os_type = "cloud-init"
ciuser = var.vm_user
cipassword = random_string.server_password.result
ipconfig0 = var.proxmox_backup_network
ssh_user = var.vm_user
sshkeys = var.ssh_pub_allowed
}
resource "proxmox_vm_qemu" "ns_primary" {
name = "ns-primary"
desc = "ComputeStacks Primary NameServer"
tags = var.proxmox_ns_primary_tags
target_node = var.proxmox_ns_primary_host
onboot = var.proxmox_onboot
qemu_os = "l26"
oncreate = true
agent = 1
clone = var.proxmox_image
full_clone = var.proxmox_full_clone
cpu = var.proxmox_cpu_type
cores = var.resources_ns_primary_cpu_cores
sockets = var.resources_ns_primary_cpu_sockets
memory = var.resources_ns_primary_memory
balloon = var.resources_ns_primary_memory
scsihw = "virtio-scsi-pci"
hotplug = "disk,network,usb"
disk {
type = "scsi"
storage = var.proxmox_ns_primary_storage_loc
size = var.resources_ns_primary_disk
discard = var.proxmox_disk_discard
}
network {
model = "virtio"
bridge = var.proxmox_net_bridge
tag = var.proxmox_net_vlan
}
os_type = "cloud-init"
ciuser = var.vm_user
cipassword = random_string.server_password.result
ipconfig0 = var.proxmox_ns_primary_network
ssh_user = var.vm_user
sshkeys = var.ssh_pub_allowed
}
resource "proxmox_vm_qemu" "ns_secondary" {
name = "ns-secondary"
desc = "ComputeStacks Secondary NameServer"
tags = var.proxmox_ns_secondary_tags
target_node = var.proxmox_ns_secondary_host
onboot = var.proxmox_onboot
qemu_os = "l26"
oncreate = true
agent = 1
clone = var.proxmox_image
full_clone = var.proxmox_full_clone
cpu = var.proxmox_cpu_type
cores = var.resources_ns_secondary_cpu_cores
sockets = var.resources_ns_secondary_cpu_sockets
memory = var.resources_ns_secondary_memory
balloon = var.resources_ns_secondary_memory
scsihw = "virtio-scsi-pci"
hotplug = "disk,network,usb"
disk {
type = "scsi"
storage = var.proxmox_ns_secondary_storage_loc
size = var.resources_ns_secondary_disk
discard = var.proxmox_disk_discard
}
network {
model = "virtio"
bridge = var.proxmox_net_bridge
tag = var.proxmox_net_vlan
}
os_type = "cloud-init"
ciuser = var.vm_user
cipassword = random_string.server_password.result
ipconfig0 = var.proxmox_ns_secondary_network
ssh_user = var.vm_user
sshkeys = var.ssh_pub_allowed
}