Plan for spinning up 7 node kubernetes cluster; kazan!

- Defines controller & worker resources
- terraform.tfvars defines distinct nodes as a dictonary
- Output provides final vmid, name & template used
This commit is contained in:
2023-01-02 23:50:14 +01:00
parent 3f0549a792
commit 20f90c129f
4 changed files with 254 additions and 0 deletions

43
outputs.tf Normal file
View File

@@ -0,0 +1,43 @@
# Controller outputs
output "controller_vm_id" {
description = "The VM Id"
value = {
for k, vm in proxmox_vm_qemu.k8s-kazan-controllers : k => vm.id
}
}
output "controller_vm_name" {
description = "The VM name"
value = {
for k, vm in proxmox_vm_qemu.k8s-kazan-controllers : k => vm.name
}
}
output "controller_clone" {
description = "Template name that this VM was cloned from"
value = {
for k, vm in proxmox_vm_qemu.k8s-kazan-controllers : k => vm.clone
}
}
# Worker outputs
output "worker_vm_id" {
description = "The VM Id"
value = {
for k, vm in proxmox_vm_qemu.k8s-kazan-workers : k => vm.id
}
}
output "worker_vm_name" {
description = "The VM name"
value = {
for k, vm in proxmox_vm_qemu.k8s-kazan-workers : k => vm.name
}
}
output "worker_clone" {
description = "Template name that this VM was cloned from"
value = {
for k, vm in proxmox_vm_qemu.k8s-kazan-workers : k => vm.clone
}
}