From ebe6ddd63508ab2b805fa7374662927c9a605c99 Mon Sep 17 00:00:00 2001 From: ogrechko Date: Sat, 27 Dec 2025 23:25:10 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20terraform/main.tf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- terraform/main.tf | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) 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 + } + +}