Some checks failed
CD - Deploy Infrastructure / Terraform Validation (push) Successful in 19s
CD - Deploy Infrastructure / Deploy on pve1 (push) Failing after 7s
CD - Deploy Infrastructure / Deploy on pve2 (push) Failing after 8s
CD - Deploy Infrastructure / Deploy on pve3 (push) Failing after 7s
CD - Deploy Infrastructure / Validate K3s Cluster (push) Has been skipped
CD - Deploy Infrastructure / Deployment Notification (push) Failing after 1s
LINSTOR has issues creating new resource definitions during full clone operations. Switching to linked clones (full_clone = false) should avoid this issue as it uses snapshots instead of creating new disk resources. Also removed replicate parameter as LINSTOR handles replication automatically through its resource groups.
65 lines
1.4 KiB
HCL
65 lines
1.4 KiB
HCL
terraform {
|
|
required_version = ">= 1.6.0"
|
|
|
|
required_providers {
|
|
proxmox = {
|
|
source = "telmate/proxmox"
|
|
version = "3.0.2-rc05"
|
|
}
|
|
local = {
|
|
source = "hashicorp/local"
|
|
version = "~> 2.1"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "proxmox" {
|
|
pm_api_url = var.proxmox_api_url
|
|
pm_api_token_id = var.proxmox_token_id
|
|
pm_api_token_secret = var.proxmox_token_secret
|
|
pm_tls_insecure = var.proxmox_tls_insecure
|
|
}
|
|
|
|
# K3s Server VM on elitedesk
|
|
resource "proxmox_vm_qemu" "k3s_server_2" {
|
|
name = "k3s-server-2"
|
|
target_node = "elitedesk"
|
|
clone = var.ubuntu_template
|
|
full_clone = false
|
|
|
|
cpu {
|
|
cores = var.k3s_server_2_config.cores
|
|
sockets = 1
|
|
}
|
|
|
|
memory = var.k3s_server_2_config.memory
|
|
agent = 1
|
|
|
|
boot = "order=scsi0"
|
|
scsihw = "virtio-scsi-single"
|
|
onboot = true
|
|
|
|
network {
|
|
id = 0
|
|
model = "virtio"
|
|
bridge = var.k3s_network_bridge
|
|
}
|
|
|
|
disk {
|
|
slot = "scsi0"
|
|
size = var.k3s_server_2_config.disk_size
|
|
type = "disk"
|
|
storage = var.storage_pool
|
|
iothread = true
|
|
}
|
|
|
|
ipconfig0 = "ip=${var.k3s_server_2_config.ip},gw=${var.k3s_gateway}"
|
|
cicustom = "user=${var.snippets_storage}:snippets/cloud-init-k3s-server-2.yaml"
|
|
nameserver = join(" ", var.k3s_dns)
|
|
|
|
lifecycle {
|
|
ignore_changes = [network]
|
|
}
|
|
|
|
depends_on = [local_file.k3s_server_cloud_init]
|
|
}
|