-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-dev.tf
44 lines (43 loc) · 1.11 KB
/
k8s-dev.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
terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
}
}
}
resource "proxmox_vm_qemu" "pve-tf" {
count = 0
agent = var.pm_agent_enabled
vmid = 301 + count.index
name = "k8s-dev-0${1 + count.index}"
target_node = var.pm_target_node
clone = var.pm_vm_template
full_clone = var.pm_vm_full_clone
os_type = var.pm_vm_os_type
cores = var.pm_vm_cores
sockets = var.pm_vm_sockets
cpu = var.pm_vm_cpu_type
memory = var.pm_vm_memory
scsihw = var.pm_vm_scsihw
bootdisk = var.pm_vm_bootdisk
desc = "Built by ${var.github_actor} at ${var.github_updated_at}"
disk {
size = var.pm_vm_disk_size
type = var.pm_vm_disk_type
storage = var.pm_vm_disk_storage
#storage_type = "lvmthin"
iothread = var.pm_vm_disk_iothread
}
network {
model = var.pm_vm_network_model
bridge = var.pm_vm_network_bridge
}
lifecycle {
ignore_changes = [
network,
]
}
# Create Ansible user, introduce its SSH key pub.
ciuser = var.pm_vm_ciuser
sshkeys = var.pm_vm_sshkeys
}