diff --git a/terraform/main.tf b/terraform/main.tf index 56a6051..1668341 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -1 +1,34 @@ -1 \ No newline at end of file +terraform { + required_providers { + proxmox = { + source = "bpg/proxmox" + version = "0.70.0" # Актуальная версия на 2025 + } + } +} + +provider "proxmox" { + endpoint = "https://192.168.1.10:8006/" + api_token = "user@pve!token_id=secret_uuid" + insecure = true +} + +resource "proxmox_virtual_machine" "k8s_node" { + count = 3 + name = "k8s-node-${count.index}" + node_name = "pve" + + cpu { cores = 4 } + memory { dedicated = 8192 } + + network_device { bridge = "vmbr0" } + + os { + debian_referencing_standard = true # Proxmox 9 базируется на Debian 13 + } + + backend "http" { + # Адрес формируется динамически в Semaphore + } + +}