diff options
author | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-06 22:13:14 +0100 |
---|---|---|
committer | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-06 22:13:14 +0100 |
commit | 1e0f492b1d7f998cb7996e0f307c1e32a07cea36 (patch) | |
tree | a38841b266894d6f0b12776cee3f1b20b4469c83 /opentofu/modules/k8s_control_plane/main.tf | |
parent | aeedb9882aa597a45dd43a1664d604c5f1a2d4f8 (diff) |
opentofu: completely migrated k8-cluster.tf to modules
Successfully built on proxmox
Diffstat (limited to 'opentofu/modules/k8s_control_plane/main.tf')
-rw-r--r-- | opentofu/modules/k8s_control_plane/main.tf | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/opentofu/modules/k8s_control_plane/main.tf b/opentofu/modules/k8s_control_plane/main.tf new file mode 100644 index 0000000..d8477af --- /dev/null +++ b/opentofu/modules/k8s_control_plane/main.tf @@ -0,0 +1,55 @@ +resource "proxmox_vm_qemu" "k8s_cp" { + lifecycle { + ignore_changes = [ + bootdisk, + ] + } + + name = var.name + desc = var.desc + agent = var.agent + target_node = var.target_node + tags = var.tags + + clone = var.clone + full_clone = var.full_clone + + qemu_os = var.qemu_os + cores = var.cores + sockets = var.sockets + cpu_type = var.cpu_type + memory = var.memory + + scsihw = var.scsihw + bootdisk = var.bootdisk + + disks { + ide { + ide0 { + cloudinit { + storage = var.cloudinit_storage + } + } + } + virtio { + virtio0 { + disk { + storage = var.disk_storage + size = var.disk_size + iothread = var.iothread + replicate = var.replicate + } + } + } + } + + network { + id = var.network_id + model = var.network_model + bridge = var.network_bridge + } + + ipconfig0 = var.ipconfig0 + ciuser = var.ciuser + sshkeys = var.sshkeys +} |